
in the original GitHub fork: https://github.com/ntoronto/racket Some things about this are known to be broken (most egregious is that the array tests DO NOT RUN because of a problem in typed/rackunit), about half has no coverage in the tests, and half has no documentation. Fixes and docs are coming. This is committed now to allow others to find errors and inconsistency in the things that appear to be working, and to give the author a (rather incomplete) sense of closure.
21 lines
537 B
Racket
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)))
|