ATS-GPU-OCT Programmer’s guide
License Agreement
Copyright (c) 2008-2022 Alazar Technologies, Inc.
Important
CAREFULLY READ THIS SOFTWARE LICENSE AGREEMENT. BY CLICKING THE APPLICABLE BUTTON TO COMPLETE THE INSTALLATION PROCESS, YOU AGREE TO BE BOUND BY THE TERMS OF THIS AGREEMENT. IF YOU DO NOT WISH TO BECOME A PARTY TO THIS AGREEMENT AND BE BOUND BY ITS TERMS AND CONDITIONS, DO NOT INSTALL OR USE THE SOFTWARE, AND RETURN THE SOFTWARE (WITH ANY ACCOMPANYING MEDIA) WITHIN THIRTY (30) DAYS OF RECEIPT. ALL RETURNS TO ALAZAR TECHNOLOGIES INC. (“ALAZARTECH”) WILL BE SUBJECT TO ALAZARTECH’S THEN-CURRENT POLICY. IF YOU ARE ACCEPTING THESE TERMS ON BEHALF OF AN ENTITY, YOU AGREE THAT YOU HAVE AUTHORITY TO BIND THE ENTITY TO THESE TERMS.
Ownership
AlazarTech retains the ownership of ATS-GPU software (“Software”). It is licensed to you for use under the following conditions:
Grant of License
You may only concurrently use the Software on the computers that have an AlazarTech waveform digitizer card plugged in (for example, if you have purchased one AlazarTech card, you have a license for one concurrent usage). If the number of users of the Software exceeds the number of AlazarTech cards you have purchased, you must have a reasonable process in place to assure that the number of persons concurrently using the Software does not exceed the number of AlazarTech cards purchased.
This license is non-transferable.
Restrictions
You may not copy the documentation or Software except as described in the installation section of the Software manual. You may not distribute, rent, sub-lease or lease the Software or documentation, including translating or decomposing. You may not modify, reverse-engineer, decompile, or disassemble any part of the Software or documentation, or produce any derivative work other than software applications that communicate with AlazarTech hardware using the published Application Programming Interface (API).
You may not remove, block, or modify any titles, logos, trademarks, copyright and/or patent notices, digital watermarks, disclaimers, or other legal notices that are included in the Software.
Termination
This license and your right to use this Software automatically terminates if you fail to comply with any provision of this license agreement.
Rights
AlazarTech retains all rights not expressly granted. Nothing in this agreement constitutes a waiver of AlazarTech’s rights under the Canadian and U.S. copyright laws or any other Federal or State law.
Limited Warranty
Although AlazarTech has tested the Software and reviewed the documentation, ALAZARTECH MAKES NO WARRANTY OF REPRESENTATION, EITHER EXPRESSED OR IMPLIED, WITH RESPECT TO THIS SOFTWARE OR DOCUMENTATION, ITS QUALITY, PERFORMANCE, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. AS A RESULT, THIS SOFTWARE AND DOCUMENTATION IS LICENSED “as is” AND YOU, THE LICENSEE, ARE ASSUMING THE ENTIRE RISK AS TO ITS QUALITY AND PERFORMANCE. IN NO EVENT WILL ALAZARTECH BE LIABLE FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THIS SOFTWARE OR DOCUMENTATION, even if advised of the possibility of such damages. In particular, AlazarTech shall have no liability for any data acquired, stored or processed with this Software, including the costs of recovering such data.
THE WARRANTY AND REMEDIES SET FORTH ABOVE ARE EXCLUSIVE AND IN LIEU OF ALL OTHERS, ORAL OR WRITTEN, EXPRESSED OR IMPLIED. No AlazarTech dealer, agent or employee is authorized to make any modifications or additions to this warranty.
Information in this document is subject to change without notice and does not represent a commitment on the part of AlazarTech. The Software described in this document is furnished under this license agreement. The Software may be used or copied only in accordance with the terms of the agreement.
Some jurisdictions do not allow the exclusion of implied warranties or liability for incidental or consequential damages, so the above limitation or exclusion may not apply to you. This warranty gives you specific legal rights, and you may also have other rights, which vary from jurisdiction to jurisdiction.
Introduction
ATS-GPU-OCT provides a framework to allow real-time OCT data processing from AlazarTech PCIe digitizers on a CUDA compatible GPU.
ATS-GPU-OCT internally calls ATS-CUDA-OCT, which is a low-level library that performs all the necessary operations to perform the Fourier Transform. ATS-CUDA-OCT is described in later in this guide in the section ATS-CUDA-OCT.
This document assumes that the reader is familiar with ATS-SDK, the standard interface for programming AlazarTech digitizers. Having a copy of the ATS-SDK manual available can be helpful, since many references to ATSApi functions are done here. The latest version of the ATS-SDK manual can be downloaded free of charge from AlazarTech’s website.
Prerequisites
System requirements
This software requires a PC with a CUDA-enabled GPU, and sufficient CPU resources to supply data to the GPU at the desired data acquisition rate. It also requires a working installation of the same version of ATS-GPU-BASE. It was tested with GeForce GTX Titan X (Maxwell), GeForce GTX980 and Quadro P5000. DDR4 memory and a modern chipset (X99, X299) will greatly improve transfer speed and overall performance.
- Supported operating systems
Windows and Linux operating systems are supported. Please verify that your Linux distribution is supported by NVIDIA which supplies the CUDA toolkit required to use ATS-GPU.
- Compiler support
CMake is required to build C/C++ code. CMake files are provided. On Linux, a C++11 compiler is required to build the library. On older Red Hat distributions, a devtoolset can be obtained to use a more recent version of gcc that supports C++11. NVCC is required to compile the example code, this compiler is included with CUDA toolkit.
- CUDA driver requirements
In order to use ATS-GPU, you must install the appropriate driver for your CUDA-enabled GPU. Drivers can be downloaded at https://www.nvidia.com/Download/index.aspx.
Note
Under Windows operating systems, dynamic link libraries releated to ATS-GPU-OCT are installed by default in %WINDIR%System32. For applications to link approripately to them, %WINDIR%System32 must be added to the Windows PATH Environment Variable.
ATS-GPU-OCT
ATS-GPU-OCT leverages ATS-GPU-BASE to transfer data from an ATS PCIe digitizer to a GPU in a highly efficient manner. It then takes care of doing OCT processing on the data before sending it back to the host computer’s RAM.
Usage
ATS-GPU-OCT acquisitions are very similar to standard ATSApi acquisitions. Only the differences are listed here for brevity.
The central function of the ATS-GPU-OCT interface is
ATS_GPU_OCT_Setup()
. This function calls its ATS-GPU-BASE
counterpart ATS_GPU_Setup()
internally, which in turns calls
AlazarBeforeAsyncRead()
. It takes a few extra parameters:
OCTFlags
: Used to define which data type, such as amplitude and phase, to obtain from the acquisition.
FFTLength
: This is used to select the length of the Fourier transform done on the GPU. This value must be a power of two, and it also must be equal to or larger than the record length.
rc = ATS_GPU_OCT_Setup(
boardHandle, channelMask, -(int) preTriggerSamples,
samplesPerRecordPerChannel, recordsPerBuffer,
buffersPerAcquisition * recordsPerBuffer, autoDMAFlags,
OCTOptions, FFTLength, NULL, &fftBytesPerBuffer);
We then choose the window function applied to the acquired data before the FFT
processing phase. The most common usage pattern is to first generate a window
function using ATS_GPU_OCT_GenerateWindowFunction()
, then to
download it to the board using ATS_GPU_OCT_SetWindowFunction()
. It
is possible however to use entirely custom window functions instead of the ones
generated by the API. It is also possible to use complex window functions by way
of downloading two arrays of points: the first for the real part of the window
and the other for the imaginary one.
rc = ATS_GPU_OCT_GenerateWindowFunction(
FFT_WINDOW_HANNING, &window[0],
samplesPerRecordPerChannel);
// Error handling
rc = ATS_GPU_OCT_SetWindowFunction(
boardHandle, samplesPerRecordPerChannel,
&window[0], NULL);
// Error handling
We then allocate memory on the GPU and CPU for data to be transferred to, and
we post those buffers to the board. For this purpose, we use
ATS_GPU_OCT_AllocBuffer()
. This function allocates buffers on the
GPU, and sets up all the intermediary state necessary for ATS-GPU-OCT to
successfully transfer data. It also allocates data on the CPU to receive the
processed OCT data.
for (int i = 0; i < numberOfBuffers; i++)
{
buffers[i] = (float*) ATS_GPU_OCT_AllocBuffer(
boardHandle, bytesPerResultBuffer, NULL);
rc = ATS_GPU_OCT_PostBuffer(
boardHandle, buffers[i], bytesPerResultBuffer);
// Error handling
}
We can then start the acquisition with ATS_GP_OCT_StartCapture()
.
Once acquisition is started, ATS_GPU_OCT_GetBuffer()
must be called as
often as possible to retrieve a buffer containing processed data on the CPU. The
data can then be used by the calling application. When no longer needed, the
buffer needs to be posted back.
for (size_t i; i < buffers_per_acquisition; i++)
{
rc = ATS_GPU_OCT_GetBuffer(
boardHandle, buffers[bufferIndex],timeout_ms);
// Error handling
// TODO: Process sample data in this buffer.
rc = ATS_GPU_OCT_PostBuffer(
boardHandle, buffers[bufferIndex], bytesPerResultBuffer);
// Error handling
}
When acquisition is complete, ATS_GPU_OCT_AbortCapture()
must be
called. Buffers allocated with ATS_GPU_OCT_AllocBuffer()
should then
be freed with ATS_GPU_OCT_FreeBuffer()
.
ATS_GPU_OCT_AbortCapture(boardHandle);
if (gpuFile != NULL)
fclose(gpuFile);
// Free buffers
for (int i = 0; i < numberOfBuffers; i++) {
ATS_GPU_OCT_FreeBuffer(boardHandle, buffers[i]);
}
LabVIEW Programming
LabVIEW applications must use the managed interface which allows the API to
allocate and manage a list of buffers available to be filled by the board. These
applications should call ATS_GPU_OCT_Setup()
with the
AMDA_ALLOC_BUFFERS option selected in the “autoDMAFlags” parameter. This option
will cause the API to allocate and manage a list of buffers available to be
filled by the board. It is therefore not necessary for the application to call
ATS_GPU_OCT_AllocBuffer()
or ATS_GPU_OCT_FreeBuffer()
.
The application must call ATS_GPU_OCT_ManageGetBuffer()
to wait for
a buffer to be filled. When the board receives sufficient trigger events to fill
a buffer, the API will copy the data from the internal buffer to the
user-supplied buffer. ATS_GPU_OCT_ManageGetBuffer()
internally calls
ATS_GPU_OCT_GetBuffer()
and ATS_GPU_OCT_PostBuffer()
so
applcation should not use these API calls when using the managed interface.
LabVIEW users might find it convenient to edit the VI search paths to locate the appropriate subVIs for the different ATS-GPU packages and ATS-SDK. The VI Search Path can be set in the “Tools” menu under “Options”, in the “Path” category. Then select the “VI Search Path” from the drop down list. By unselecting “Use default” custom VI search paths can be added.
API Reference
Note
Errors from ATS-GPU-OCT will be logged in ATS_GPU.log. Relevant information about the error will be logged here and can be useful for debugging. For Windows users log file is located in %TEMP%. For Linux users log file is located in /tmp/.
-
enum ATS_GPU_OCT_OPTIONS
Types of data output that are generated by the acquisition. This is used in ATS_GPU_OCT_Setup()
Values:
-
enumerator ATS_GPU_OCT_LOG_OUTPUT
-
enumerator ATS_GPU_OCT_AMPLITUDE_OUTPUT
-
enumerator ATS_GPU_OCT_PHASE_OUTPUT
-
enumerator ATS_GPU_OCT_REAL_OUTPUT
-
enumerator ATS_GPU_OCT_IMAG_OUTPUT
-
enumerator ATS_GPU_OCT_SQRT_OUTPUT
-
enumerator ATS_GPU_OCT_RAWDATA_OUTPUT
-
enumerator ATS_GPU_OCT_LOG_OUTPUT
-
enum ATS_GPU_OCT_WINDOWS
Window functions that can be generated by ATS_GPU_OCT_GenerateWindowFunction()
Values:
-
enumerator FFT_WINDOW_NONE
-
enumerator FFT_WINDOW_HANNING
-
enumerator FFT_WINDOW_HAMMING
-
enumerator FFT_WINDOW_BLACKMAN
-
enumerator FFT_WINDOW_BLACKMAN_HARRIS
-
enumerator FFT_WINDOW_BARTLETT
-
enumerator NUM_FFT_WINDOW_ITEMS
-
enumerator FFT_WINDOW_NONE
-
RETURN_CODE ATS_GPU_OCT_AbortCapture(HANDLE boardHandle)
Stops the acquisition.
Aborts an acquisition, stops data processing, and releases allocated resources.
- Parameters
boardHandle – Handle to the board
- Returns
ApiSuccess
-
void *ATS_GPU_OCT_AllocBuffer(HANDLE boardHandle, U32 bytesPerBuffer, void *reserved)
Allocates page-aligned pinned memory for ATS and GPU boards.
This function must be called after ATS_GPU_OCT_Setup() to perform the necessary memory allocations. This function returns a CPU result buffer pointer.
- Parameters
boardHandle – Handle to the board
bytesPerBuffer – Total number of bytes to allocate per buffer
reserved – Pass NULL.
-
RETURN_CODE ATS_GPU_OCT_EnableVerificationMode(BOOL enable, U32 boardType)
Enable verification mode to supply already acquired data.
- Parameters
enable – Pass 1 to enable
boardType – Board identifier used to perform the acquisition.
-
RETURN_CODE ATS_GPU_OCT_FreeBuffer(HANDLE boardHandle, void *buffer)
Free buffers allocated with ATS_GPU_OCT_AllocBuffer();.
- Parameters
boardHandle – Handle to the board
buffer – Buffer pointer allocated by ATS_GPU_OCT_AllocBuffer()
-
RETURN_CODE ATS_GPU_OCT_GenerateWindowFunction(U32 windowType, float *window, U32 windowLength_samples)
Generate a window function for FFT.
- Parameters
windowType – A member of the ATS_GPU_OCT_WINDOWS enum
window – A pointer to a preallocated array where the window will be written.
windowLength_samples – Number of points in the window
-
RETURN_CODE ATS_GPU_OCT_GetBuffer(HANDLE boardHandle, void *buffer, U32 timeout_ms)
Get processed buffer.
This function must be called at average rate that is equal to or greater than the rate at which DMA buffers complete. This function returns the GPU-processed buffer.
- Parameters
boardHandle – Handle to the board
buffer – Pointer to the buffer
timeout_ms – Time the board will wait for a trigger before throwing an error.
- Returns
ApiSuccess
(512) if the board received sufficient triggers to fill a DMA buffer.- Returns
ApiNotInitialized
if ATS_GPU_OCT_StartCapture() was not called before calling this function, or it was called and failed.- Returns
ApiInvalidHandle
if theboardHandle
parameter is not valid.- Returns
ApiBufferOverflow
if the board filled all the available DMA buffers and its on-board memory. This may happen if the acquisition rate exceeds the bus bandwidth or the GPU processing bandwidth.- Returns
ApiWaitTimeout
if the timeout interval expired before the board received a sufficient number of triggers to fill a buffer.- Returns
ApiFailed
if a system of internal error occurred.
-
RETURN_CODE ATS_GPU_OCT_GetVersion(U8 *major, U8 *minor, U8 *revision)
Get ATS-GPU-OCT version number.
- Parameters
major – ATS-GPU-OCT major version number.
minor – ATS-GPU-OCT minor version number.
revision – ATS-GPU-OCT revision number.
-
RETURN_CODE ATS_GPU_OCT_ManageGetBuffer(HANDLE boardHandle, void *buffer, U32 bytesToCopy, U32 timeout_ms)
Query a buffer through the managed DMA buffer API. For LabVIEW programmers view LabVIEW Programming section.
- Parameters
boardHandle – Handle to the board
buffer – Pointer to a user-allocated buffer to receive data
bytesToCopy – Number of bytes to copy to the user buffer
timeout_ms – Maximum time to wait for data to be ready to be copied to
buffer
before returningApiWaitTimeout
.
-
RETURN_CODE ATS_GPU_OCT_PostBuffer(HANDLE boardHandle, void *buffer, U32 bytesPerBuffer)
Signal the library a particular buffer can be used for data transfer.
This function is the equivalent of AlazarPostAsyncBuffer for ATS-GPU-OCT. Buffers posted must have previously been allocated with ATS_GPU_OCT_AllocBuffer().
- Parameters
boardHandle – Handle to the board
buffer – Pointer to a previously allocated buffer
bytesPerBuffer – Size in bytes of the buffer, must be the same size as setup for the acquisition.
-
RETURN_CODE ATS_GPU_OCT_SetBuffer(void *dataInputBuffer, void *CPUResultBuffer, U32 samplesPerBuffer)
Supply a buffer for verification mode.
- Parameters
dataInputBuffer – Pointer to data buffer to be processed
CPUResultBuffer – Pointer to data buffer to contain result data
samplesPerBuffer – Size in samples of the buffer
-
RETURN_CODE ATS_GPU_OCT_SetWindowFunction(HANDLE boardHandle, U32 samplesPerRecord, float *realWindowArray, float *imagWindowArray)
Set window function used in FFT calculation.
- Parameters
boardHandle – Handle to the board
samplesPerRecord – Length of the window, equal to the number of samples per FFT.
realWindowArray – Pointer to array of size samplesPerRecord that contains the real part of the window. Passing
null
is equivalent to passing an array filled with ones.imagWindowArray – Pointer to array of size samplesPerRecord that contains the imaginary part of the window. Passing
null
is equivalent to passing an array filled with zeros.
-
RETURN_CODE ATS_GPU_OCT_Setup(HANDLE boardHandle, U32 channelSelect, long transferOffset, U32 samplesPerFFT, U32 FFTsPerBuffer, U32 FFTsPerAcquisition, U32 autoDMAFlags, U32 OCTFlags, U32 FFTLength, void *reserved, U32 *bytesPerResultBuffer)
Prepares the ATS board and GPU for acquisition.
This function calls
ATS_GPU_Setup()
internally and most parameters are passed directly to it. In addition, it sets up the GPU for DMA transfers and receives options specific to OCT processing.- Parameters
boardHandle – Handle to the board. Set to
NULL
for data validation mode.channelSelect – Channel mask with each channel identifier OR’d
transferOffset – Pass a negative integer for pretrigger samples
samplesPerFFT – Number of samples in a record or transfer
FFTsPerBuffer – Number of records in a buffer, 1 for triggered streaming and continuous streaming modes.
FFTsPerAcquisition – In this version of the library, it is required to pass
0x7FFFFFFF
to this parameter, which stands for an infinite acquisition. It is possible to interrupt the acquisition at any time using ATS_GPU_OCT_AbortCapture()autoDMAFlags – ATSApi flags for
AlazarBeforeAsyncRead
OCTFlags – Defines the types of data outputs to be obtained from the OCT acquisition. This parameter can receive one or more elements of ATS_GPU_OCT_OPTIONS and ATS_GPU_PSOCT_OPTIONS, OR’d with the binary OR operator.
FFTLength – Length of FFT, should be a power of 2.
reserved – Pass NULL
bytesPerResultBuffer – Returns the size of a result buffer
-
RETURN_CODE ATS_GPU_OCT_StartCapture(HANDLE boardHandle)
Start the acquisition.
Use this function in replacement of AlazarStartCapture(). It starts the acquisition. The application must be ready to call ATS_GPU_OCT_GetBuffer() to prevent data overflows
- Parameters
boardHandle – Handle to the board
ATS-CUDA-OCT
ATS-CUDA-OCT provides a framework to allow OCT data processing on a CUDA-enabled GPU. ATS-CUDA-OCT should be used with ATS-CUDA for buffer and stream manipulation. ATS-CUDA-OCT requires an AlazarTech board on the system in order to be used.
API Reference
Note
Errors from ATS-CUDA-OCT will be logged in ATS_GPU.log. Relevant information about the error will be logged here and can be useful for debugging. For Windows users log file is located in %TEMP%. For Linux users log file is located in /tmp/.
-
cudaFFTPlan *ATS_CUDA_OCT_CreateFFTPlan(U32 FFTLength, U32 recordsPerBuffer, U32 channelCount, cudaStream_t stream)
Creates an FFT plan and associates it with a CUDA stream. Requires an AlazarTech board on the system in order to succeed.
This function is used to configure a GPU kernel to perform FFT processing. It also associates the newly created FFT plan with a CUDA stream. All kernel executed with this plan are to be run on this stream.
- Parameters
FFTLength – Length of the data on which to perform an FFT
recordsPerBuffer – Number of FFTs to perform per active channel.
channelCount – Number of input signals.
stream – The CUDA stream to run the FFT plan with.
- Returns
This function returns a pointer to the created FFT plan.
-
RETURN_CODE ATS_CUDA_OCT_DestroyFFTPlan(cudaFFTPlan *FFTPlan)
Destroy an FFT plan.
Frees all GPU resources associated with an FFT plan.
- Parameters
FFTPlan – Pointer to the FFT plan to be destroyed.
-
void *ATS_CUDA_OCT_GenerateGPUWindowFunction(U32 samplesPerRecordPerChannel, float *realWindowArray, float *imagWindowArray)
Generates a window function on the GPU for FFT processing.
- Parameters
samplesPerRecordPerChannel – Length of the window, equal to the number of samples per record per channel.
realWindowArray – Pointer to array of size samplesPerRecord that contains the real part of the window. Passing
null
is equivalent to passing an array filled with ones.imagWindowArray – Pointer to array of size samplesPerRecord that contains the imaginary part of the window. Passing
null
is equivalent to passing an array filled with zeros.
- Returns
Pointer to an array of complex floating point elements that contains the window generated on the GPU.
-
RETURN_CODE ATS_CUDA_OCT_FFT(cudaFFTPlan *FFTPlan, void *GPUFFTIn, void *GPUFFTOut)
Launches on the GPU a kernel to perform the Fast Fourier Transform.
- Parameters
FFTPlan – Pointer to a FFT plan created with ATS_CUDA_OCT_CreateFFTPlan().
GPUFFTIn – Pointer to a GPU buffer on which FFT is to be performed. Input buffer has complex float32 precision.
GPUFFTOut – Pointer to a GPU FFT result buffer. Output buffer has complex float32 precision.
-
RETURN_CODE ATS_CUDA_OCT_GetVersion(U8 *major, U8 *minor, U8 *revision)
Get ATS-CUDA-OCT version number.
- Parameters
major – ATS-CUDA-OCT major version number.
minor – ATS-CUDA-OCT minor version number.
revision – ATS-CUDA-OCT revision number.
-
RETURN_CODE ATS_CUDA_OCT_PostFFT(void *GPUFFTOutput, void *GPUResultBuffer, cudaStream_t stream, U32 FFTLength, U32 recordsPerBuffer, U32 channelCount, U32 OCTFlags)
Launches on the GPU a kernel to extract relevant output information from the FFT.
- Parameters
GPUFFTOutput – Pointer to a GPU buffer in Fourier domain from which outputs are to de extracted. This buffer has complex float32 precision.
GPUResultBuffer – Pointer to a GPU buffer where data is to be output. Output buffer has float32 precision.
stream – Stream identifier on which processing is to take place.
FFTLength – length of the FFT to perform. Equal to the sum of
samplesPerRecordPerChannel
and the length of zero padding.recordsPerBuffer – records per buffer per channel.
channelCount – number of input signals.
OCTFlags – Defines the types of data outputs to be obtained. This parameter can receive one or more elements of ATS_GPU_OCT_OPTIONS, OR’d with the binary OR operator.
-
RETURN_CODE ATS_CUDA_OCT_PreFFT(void *GPUBuffer, void *GPUFFTIn, cudaStream_t stream, void *GPUWindow, U32 samplesPerRecordPerChannel, U32 FFTLength, U32 recordsPerBuffer, U32 channelCount, U32 inputDataType)
Launches on the GPU a kernel to perform preliminary windowing of the data and zero padding (if required) before doing the FFT.
- Parameters
GPUBuffer – Pointer to a GPU buffer to on which to apply PreFFT kernel. This buffer should have 8 bits or 16 bits data packing and remain interleaved if multiple channels were acquired with an AlazarTech digitizer.
GPUFFTIn – Pointer to a GPU buffer where data is to be output. Output buffer has complex float32 precision.
stream – Stream identifier on which processing is to take place
GPUWindow – Pointer to a GPU window buffer allocated with ATS_CUDA_OCT_GenerateGPUWindowFunction()
samplesPerRecordPerChannel – Samples per record per channel
FFTLength – length of the FFT to perform. Equal to the sum of samplesPerRecordPerChannel and the length of zero padding.
recordsPerBuffer – records per buffer per channel.
channelCount – number of input signals.
inputDataType. – Data type of the input data. This parameter must receive one element of ATS_CUDA_Input_DataType.
ATS-CUDA-PSOCT
ATS-CUDA-PSOCT is an add-on library to ATS-GPU-OCT that allows to output the signals of interest in polarization sensitive OCT. Using ATS-CUDA-PSOCT requires a seperate license.
API Reference
-
enum ATS_GPU_PSOCT_OPTIONS
Types of data output that are generated by the acquisition. This is used in ATS_GPU_OCT_Setup() or ATS_GPU_NUFFT_Setup()
Values:
-
enumerator ATS_GPU_PSOCT_REFLECTIVITY_OUTPUT
-
enumerator ATS_GPU_PSOCT_LOG_OUTPUT
-
enumerator ATS_GPU_PSOCT_RETARDATION_OUTPUT
-
enumerator ATS_GPU_PSOCT_AXIS_ORIENTATION_OUTPUT
-
enumerator ATS_GPU_PSOCT_REFLECTIVITY_OUTPUT
-
RETURN_CODE ATS_CUDA_PSOCT_PostFFT(void *GPUVerticalFFTOutput, void *GPUHoriozontalFFTOutput, void *GPUResultBuffer, cudaStream_t stream, U32 FFTLength, U32 recordsPerBuffer, U32 OCTFlags)
Launches on the GPU a kernel to extract relevant output information from the FFT.
- Parameters
GPUVerticalFFTOutput – Pointer to a GPU buffer of the vertical polarization state in Fourier domain from which outputs are to be extracted. This buffer has complex float32 precision.
GPUHoriozontalFFTOutput – Pointer to a GPU buffer of the horizontal polarization state in Fourier domain from which outputs are to be extracted. This buffer has complex float32 precision.
GPUResultBuffer – Pointer to a GPU buffer where data is to be output. Output buffer has float32 precision.
stream – Stream identifier on which processing is to take place.
FFTLength – length of the FFT to perform. Equal to the sum of
samplesPerRecordPerChannel
and the length of zero padding.recordsPerBuffer – records per buffer per channel.
OCTFlags – Defines the types of data outputs to be obtained. This parameter can receive one or more elements of ATS_GPU_PSOCT_OPTIONS, OR’d with the binary OR operator.