Skip to content

Commit

Permalink
Merge pull request #2013 from alariq/master
Browse files Browse the repository at this point in the history
fix memset() arguments order in vkfftengine
  • Loading branch information
f4exb committed Mar 11, 2024
2 parents 2550f73 + 3aa3de0 commit 8c7cb89
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sdrbase/dsp/vkfftengine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ vkFFTEngine::vkFFTEngine() :
m_reuse(true)
{
vkGPU = new VkGPU();
memset(vkGPU, sizeof(VkGPU), 0);
memset(vkGPU, 0, sizeof(VkGPU));
vkGPU->device_id = 0; // Could be set in GUI to support multiple GPUs
}

Expand Down Expand Up @@ -64,9 +64,9 @@ void vkFFTEngine::configure(int n, bool inverse)

// Allocate and intialise plan
m_currentPlan->m_configuration = new VkFFTConfiguration();
memset(m_currentPlan->m_configuration, sizeof(VkFFTConfiguration), 0);
memset(m_currentPlan->m_configuration, 0, sizeof(VkFFTConfiguration));
m_currentPlan->m_app = new VkFFTApplication();
memset(m_currentPlan->m_app, sizeof(VkFFTApplication), 0);
memset(m_currentPlan->m_app, 0, sizeof(VkFFTApplication));
m_currentPlan->m_configuration->FFTdim = 1;
m_currentPlan->m_configuration->size[0] = n;
m_currentPlan->m_configuration->size[1] = 1;
Expand Down

0 comments on commit 8c7cb89

Please sign in to comment.