racket/collects/math/private/parameters.rkt
Neil Toronto 5a43f2c6bc Finished array documentation!
Cleaned up other docs in preparation for alpha-testing announcement

Created `math/utils' module for stuff that doesn't go anywhere else (e.g.
FFT scaling convention, max-math-threads parameters)

Reduced the number of macros that expand to applications of `array-map'

Added `flvector-sum', defined `flsum' in terms of it

Reduced the number of pointwise `flvector', `flarray' and `fcarray' operations

Reworked `inline-build-flvector' and `inline-flvector-map' to be faster and
expand to less code in both typed and untyped Racket

Redefined conversions like `list->flvector' in terms of for loops (can do
it now that TR has working `for/flvector:', etc.)
2012-11-29 15:45:17 -07:00

21 lines
537 B
Racket

#lang typed/racket/base
(require racket/future)
(provide max-math-threads
dft-convention
dft-inverse-convention)
(: max-math-threads (Parameterof Positive-Integer))
(define max-math-threads (make-parameter (max 1 (processor-count))))
(: dft-convention (Parameterof (List Real Real)))
(define dft-convention (make-parameter (list 1 -1)))
(: dft-inverse-convention (-> (List Real Real)))
(define (dft-inverse-convention)
(define c (dft-convention))
(define a (car c))
(define b (cadr c))
(list (- a) (- b)))