mirror of
https://github.com/jkl1337/SwiftPFFFT.git
synced 2026-01-06 13:44:33 -06:00
initial commit
This commit is contained in:
15
Sources/PFFFT/Setup.swift
Normal file
15
Sources/PFFFT/Setup.swift
Normal file
@@ -0,0 +1,15 @@
|
||||
internal import PFFFTLib
|
||||
|
||||
public class Setup {
|
||||
let ptr: OpaquePointer
|
||||
let n: Int
|
||||
|
||||
init<T: FFTElement>(n: Int, type: T.Type) throws {
|
||||
ptr = try type.pffftSetup(n, .real)
|
||||
self.n = n
|
||||
}
|
||||
|
||||
deinit {
|
||||
pffft_destroy_setup(ptr)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user