Skip to content

Commit

Permalink
Discrete Cosine Transforms - II, III and IV support
Browse files Browse the repository at this point in the history
-Added support for Discrete Cosine Transforms (DCT) of types II, III and IV in VkFFT. Performance is well-optimized to be on the same level as DFT transforms. Single upload only (length < 8192 in FP32 for 64KB of shared memory). DCT-IV is for even sequences only. FP32 and FP64, multidimensional systems are supported
-Added option to perform calculations in FP64 precision, while storing data in FP32 (doublePrecisionFloatMemory).
-OpenCL has issues with local memory synchronization in DCT-4 (Other backends work fine).
-Cleaned code for management of transforms with a different logical size
  • Loading branch information
DTolm committed Jun 19, 2021
1 parent 4083840 commit 723d121
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vkFFT/vkFFT.h
Original file line number Diff line number Diff line change
Expand Up @@ -17528,7 +17528,7 @@ static inline VkFFTResult VkFFTPlanAxis(VkFFTApplication* app, VkFFTPlan* FFTPla
tempLUT[2 * axis->specializationConstants.startDCT3LUT + 2 * j + 1] = sin(angle);
}
}
if ((app->configuration.performDCT == 4)) {
if (app->configuration.performDCT == 4) {
for (uint64_t j = 0; j < axis->specializationConstants.fftDim / 2 + 2; j++) {
double angle = (double_PI / 2.0 / (double)(axis->specializationConstants.fftDim)) * j;
tempLUT[2 * axis->specializationConstants.startDCT3LUT + 2 * j] = cos(angle);
Expand Down Expand Up @@ -17705,7 +17705,7 @@ static inline VkFFTResult VkFFTPlanAxis(VkFFTApplication* app, VkFFTPlan* FFTPla
tempLUT[2 * axis->specializationConstants.startDCT3LUT + 2 * j + 1] = (float)sin(angle);
}
}
if ((app->configuration.performDCT == 4)) {
if (app->configuration.performDCT == 4) {
for (uint64_t j = 0; j < axis->specializationConstants.fftDim / 2 + 2; j++) {
double angle = (double_PI / 2.0 / (double)(axis->specializationConstants.fftDim)) * j;
tempLUT[2 * axis->specializationConstants.startDCT3LUT + 2 * j] = (float)cos(angle);
Expand Down

0 comments on commit 723d121

Please sign in to comment.