ngscopeclient 0.1-dev+51fbda87c
Public Types | Public Member Functions | Protected Attributes | List of all members

RAII wrapper around a VkFFTApplication and VkFFTConfiguration. More...

#include <VulkanFFTPlan.h>

Public Types

enum  VulkanFFTPlanDirection { DIRECTION_FORWARD , DIRECTION_REVERSE }
 Direction of a FFT. More...
 
enum  VulkanFFTDataType { TYPE_REAL , TYPE_COMPLEX }
 Data type of a FFT input or output. More...
 

Public Member Functions

 VulkanFFTPlan (size_t npoints, size_t nouts, VulkanFFTPlanDirection dir, size_t numBatches=1, VulkanFFTDataType timeDomainType=VulkanFFTPlan::TYPE_REAL)
 Creates a new FFT plan. More...
 
void AppendForward (AcceleratorBuffer< float > &dataIn, AcceleratorBuffer< float > &dataOut, vk::raii::CommandBuffer &cmdBuf)
 Appends a forward FFT to a command buffer. More...
 
void AppendReverse (AcceleratorBuffer< float > &dataIn, AcceleratorBuffer< float > &dataOut, vk::raii::CommandBuffer &cmdBuf)
 Appends an inverse FFT to a command buffer. More...
 
size_t size () const
 Return the number of points in the FFT.
 

Protected Attributes

VkFFTApplication m_app
 VkFFT application handle.
 
VkFFTConfiguration m_config
 VkFFT configuration state.
 
size_t m_size
 Number of points in the FFT.
 
VkPhysicalDevice m_physicalDevice
 Physical device the FFT is runnning on.
 
VkDevice m_device
 Device the FFT is runnning on.
 
VkPipelineCache m_pipelineCache
 Pipeline cache for precompiled shader binaries.
 
vk::raii::Fence m_fence
 Fence for synchronizing FFTs.
 
VkFence m_rawfence
 The underlying VkFence of m_fence (we need to be able to take a pointer to it)
 
uint64_t m_bsize
 Byte size of the output buffer (for forward) or input (for reverse)
 
uint64_t m_tsize
 Byte size of the temporary working buffer.
 
uint64_t m_isize
 Byte size of the input buffer (for forward) or output (for reverse)
 

Detailed Description

RAII wrapper around a VkFFTApplication and VkFFTConfiguration.

Member Enumeration Documentation

◆ VulkanFFTDataType

Data type of a FFT input or output.

Enumerator
TYPE_REAL 

Real float32 values.

TYPE_COMPLEX 

Complex float32 values.

◆ VulkanFFTPlanDirection

Direction of a FFT.

Enumerator
DIRECTION_FORWARD 

Normal FFT.

DIRECTION_REVERSE 

Inverse FFT.

Constructor & Destructor Documentation

◆ VulkanFFTPlan()

VulkanFFTPlan::VulkanFFTPlan ( size_t  npoints,
size_t  nouts,
VulkanFFTPlanDirection  dir,
size_t  numBatches = 1,
VulkanFFTDataType  timeDomainType = VulkanFFTPlan::TYPE_REAL 
)

Creates a new FFT plan.

Parameters
npointsNumber of points in the FFT
noutsNumber of output samples
dirDirection (forward or reverse)
numBatchesNumber of batched FFTs to perform (for spectrograms etc)
timeDomainTypeData type of the time-domain signal (real or complex)

Member Function Documentation

◆ AppendForward()

void VulkanFFTPlan::AppendForward ( AcceleratorBuffer< float > &  dataIn,
AcceleratorBuffer< float > &  dataOut,
vk::raii::CommandBuffer &  cmdBuf 
)

Appends a forward FFT to a command buffer.

Parameters
dataInTime domain input
dataOutFrequency domain output
cmdBufCommand buffer to append the FFT to

◆ AppendReverse()

void VulkanFFTPlan::AppendReverse ( AcceleratorBuffer< float > &  dataIn,
AcceleratorBuffer< float > &  dataOut,
vk::raii::CommandBuffer &  cmdBuf 
)

Appends an inverse FFT to a command buffer.

Parameters
dataInFrequency domain input
dataOutTime domain output
cmdBufCommand buffer to append the FFT to

The documentation for this class was generated from the following files: