Skip to content

Commit

Permalink
VkFFT v1.3.3 release (bugfix)
Browse files Browse the repository at this point in the history
-bugfix for tempBuffer memory management in Vulkan API
-bugfix for tempBuffer stride management for multi upload even R2C algorithm
  • Loading branch information
DTolm committed Jan 9, 2024
1 parent d6f7ded commit ebb3cd3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
12 changes: 0 additions & 12 deletions vkFFT/vkFFT/vkFFT_AppManagement/vkFFT_InitializeApp.h
Original file line number Diff line number Diff line change
Expand Up @@ -1683,42 +1683,30 @@ static inline VkFFTResult initializeVkFFT(VkFFTApplication* app, VkFFTConfigurat
for (pfUINT i = 0; i < app->configuration.FFTdim; i++) {
for (pfUINT j = 0; j < app->localFFTPlan->numAxisUploads[i]; j++) {
app->localFFTPlan->axes[i][j].specializationConstants.performBufferSetUpdate = 1;
resFFT = VkFFTUpdateBufferSet(app, app->localFFTPlan, &app->localFFTPlan->axes[i][j], i, j, 0);
if (resFFT != VKFFT_SUCCESS) return resFFT;
}
if (app->useBluesteinFFT[i] && (app->localFFTPlan->numAxisUploads[i] > 1)) {
for (pfUINT j = 1; j < app->localFFTPlan->numAxisUploads[i]; j++) {
app->localFFTPlan->inverseBluesteinAxes[i][j].specializationConstants.performBufferSetUpdate = 1;
resFFT = VkFFTUpdateBufferSet(app, app->localFFTPlan, &app->localFFTPlan->inverseBluesteinAxes[i][j], i, j, 0);
if (resFFT != VKFFT_SUCCESS) return resFFT;
}
}
}
if (app->localFFTPlan->bigSequenceEvenR2C) {
app->localFFTPlan->R2Cdecomposition.specializationConstants.performBufferSetUpdate = 1;
resFFT = VkFFTUpdateBufferSetR2CMultiUploadDecomposition(app, app->localFFTPlan, &app->localFFTPlan->R2Cdecomposition, 0, 0, 0);
if (resFFT != VKFFT_SUCCESS) return resFFT;
}
}
if (!app->configuration.makeForwardPlanOnly) {
for (pfUINT i = 0; i < app->configuration.FFTdim; i++) {
for (pfUINT j = 0; j < app->localFFTPlan_inverse->numAxisUploads[i]; j++) {
app->localFFTPlan_inverse->axes[i][j].specializationConstants.performBufferSetUpdate = 1;
resFFT = VkFFTUpdateBufferSet(app, app->localFFTPlan_inverse, &app->localFFTPlan_inverse->axes[i][j], i, j, 1);
if (resFFT != VKFFT_SUCCESS) return resFFT;
}
if (app->useBluesteinFFT[i] && (app->localFFTPlan_inverse->numAxisUploads[i] > 1)) {
for (pfUINT j = 1; j < app->localFFTPlan_inverse->numAxisUploads[i]; j++) {
app->localFFTPlan_inverse->inverseBluesteinAxes[i][j].specializationConstants.performBufferSetUpdate = 1;
resFFT = VkFFTUpdateBufferSet(app, app->localFFTPlan_inverse, &app->localFFTPlan_inverse->inverseBluesteinAxes[i][j], i, j, 1);
if (resFFT != VKFFT_SUCCESS) return resFFT;
}
}
}
if (app->localFFTPlan_inverse->bigSequenceEvenR2C) {
app->localFFTPlan_inverse->R2Cdecomposition.specializationConstants.performBufferSetUpdate = 1;
resFFT = VkFFTUpdateBufferSetR2CMultiUploadDecomposition(app, app->localFFTPlan_inverse, &app->localFFTPlan_inverse->R2Cdecomposition, 0, 0, 1);
if (resFFT != VKFFT_SUCCESS) return resFFT;
}
}
}
Expand Down
10 changes: 8 additions & 2 deletions vkFFT/vkFFT/vkFFT_PlanManagement/vkFFT_Plans/vkFFT_Plan_FFT.h
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,10 @@ static inline VkFFTResult VkFFTPlanAxis(VkFFTApplication* app, VkFFTPlan* FFTPla

if (axis_id == 0) {
for (int i = 1; i < app->configuration.FFTdim; i++){
axisStride[i].data.i = prevStride * FFTPlan->actualFFTSizePerAxis[axis_id][i-1];
if (FFTPlan->bigSequenceEvenR2C && (i == 1))
axisStride[i].data.i = prevStride * (FFTPlan->actualFFTSizePerAxis[axis_id][i-1]+1);
else
axisStride[i].data.i = prevStride * FFTPlan->actualFFTSizePerAxis[axis_id][i-1];
prevStride = axisStride[i].data.i;
}
}else{
Expand Down Expand Up @@ -359,7 +362,10 @@ static inline VkFFTResult VkFFTPlanAxis(VkFFTApplication* app, VkFFTPlan* FFTPla

if (axis_id == 0) {
for (int i = 1; i < app->configuration.FFTdim; i++){
axisStride[i].data.i = prevStride * FFTPlan->actualFFTSizePerAxis[axis_id][i-1];
if (FFTPlan->bigSequenceEvenR2C && (i == 1))
axisStride[i].data.i = prevStride * (FFTPlan->actualFFTSizePerAxis[axis_id][i-1]+1);
else
axisStride[i].data.i = prevStride * FFTPlan->actualFFTSizePerAxis[axis_id][i-1];
prevStride = axisStride[i].data.i;
}
}else{
Expand Down

0 comments on commit ebb3cd3

Please sign in to comment.