dct#
Perform a Direct Cosine Transform (DCT)
Note
These functions are currently not supported with host-based executors (CPU)
-
template<typename OutputTensor, typename InputTensor>
void matx::dct(OutputTensor &out, const InputTensor &in, const cudaStream_t stream = 0)# Discrete Cosine Transform
Computes the DCT of input sequence “in”. The input and output ranks must be 1, and the sizes must match. This implementation uses the 2N padded version of Makhoul’s method which offloads the complex processing to cuFFT.
- Template Parameters:
T – Input data type
RANK – Rank of input and output tensor. Must be 1
- Parameters:
out – Output tensor
in – Input tensor
stream – CUDA stream
Examples#
auto out = make_tensor<float>({sig_size});
// Perform a DCT from input "xv" into output "out"
dct(out, xv);