|
ngscopeclient v0.2
|
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. | |
| void | AppendForward (AcceleratorBuffer< float > &dataIn, AcceleratorBuffer< float > &dataOut, vk::raii::CommandBuffer &cmdBuf) |
| Appends a forward FFT to a command buffer. | |
| void | AppendReverse (AcceleratorBuffer< float > &dataIn, AcceleratorBuffer< float > &dataOut, vk::raii::CommandBuffer &cmdBuf) |
| Appends an inverse FFT to a command buffer. | |
| 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) | |
RAII wrapper around a VkFFTApplication and VkFFTConfiguration.
| VulkanFFTPlan::VulkanFFTPlan | ( | size_t | npoints, |
| size_t | nouts, | ||
| VulkanFFTPlanDirection | dir, | ||
| size_t | numBatches = 1, |
||
| VulkanFFTDataType | timeDomainType = VulkanFFTPlan::TYPE_REAL |
||
| ) |
Creates a new FFT plan.
| npoints | Number of points in the FFT |
| nouts | Number of output samples |
| dir | Direction (forward or reverse) |
| numBatches | Number of batched FFTs to perform (for spectrograms etc) |
| timeDomainType | Data type of the time-domain signal (real or complex) |
| void VulkanFFTPlan::AppendForward | ( | AcceleratorBuffer< float > & | dataIn, |
| AcceleratorBuffer< float > & | dataOut, | ||
| vk::raii::CommandBuffer & | cmdBuf | ||
| ) |
Appends a forward FFT to a command buffer.
| dataIn | Time domain input |
| dataOut | Frequency domain output |
| cmdBuf | Command buffer to append the FFT to |
| void VulkanFFTPlan::AppendReverse | ( | AcceleratorBuffer< float > & | dataIn, |
| AcceleratorBuffer< float > & | dataOut, | ||
| vk::raii::CommandBuffer & | cmdBuf | ||
| ) |
Appends an inverse FFT to a command buffer.
| dataIn | Frequency domain input |
| dataOut | Time domain output |
| cmdBuf | Command buffer to append the FFT to |