utils
Structs
Functions
reverse_bits_simd
reverse_bits_simd(x: SIMD[uint32, nelts[::DType]()]) -> SIMD[uint32, nelts[::DType]()]
Reverse the bits of a 32-bit integer.
bit_reversal
bit_reversal(n: Int, reordered_arr_data: UnsafePointer[SIMD[uint32, 1]])
Generate a bit reversal permutation for integers from 0 to n-1. Works for any positive integer n.
copy_complex_and_cast
copy_complex_and_cast[dst_type: DType, src_type: DType](dst: UnsafePointer[SIMD[dst_type, 1]], src: UnsafePointer[SIMD[src_type, 1]], size: Int, conjugate_and_divide: Bool = False, divisor: SIMD[dst_type, 1] = SIMD(1))
Copy complex data from one buffer to another and cast the data to a different type. Optionally conjugate and divide by a scalar (usefule for inverse FFT).
get_workload
get_workload(n: Int, divisions: Int, num_workers: Int) -> Int
list_swap
list_swap(arg: List[Int], i: Int, j: Int) -> List[Int]
determine_num_workers
determine_num_workers(size: Int) -> Int
fft_op_array
fft_op_array(arg0: Array, name: String, fwd: fn(mut Array, List[Array]) raises -> None, jvp: fn(List[Array], List[Array]) raises -> Array, vjp: fn(List[Array], Array, Array) raises -> List[Array], dims: List[Int], norm: String) -> Array
more details
encode_fft_params
encode_fft_params(dims: List[Int], norm: String) -> List[Int]
get_dims_from_encoded_params
get_dims_from_encoded_params(params: List[Int]) -> List[Int]
get_norm_from_encoded_params
get_norm_from_encoded_params(params: List[Int]) -> String
Last updated on