Openholo  v1.0
Open Source Digital Holographic Library
ophLightField_GPU.h File Reference
#include "ophLightField.h"
#include <cuda_runtime.h>
#include <cufft.h>
#include <math_constants.h>
Include dependency graph for ophLightField_GPU.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define HANDLE_ERROR(err)   (HandleError( err, __FILE__, __LINE__ ))
 
#define HANDLE_NULL(a)
 

Functions

void cudaConvertLF2ComplexField_Kernel (CUstream_st *stream, int nx, int ny, int rx, int ry, uchar1 **LF, cufftDoubleComplex *output)
 
void cudaFFT_LF (cufftHandle *plan, CUstream_st *stream, int nx, int ny, cufftDoubleComplex *in_field, cufftDoubleComplex *output_field, int direction)
 
void procMultiplyPhase (CUstream_st *stream, int nx, int ny, int rx, int ry, cufftDoubleComplex *input, cufftDoubleComplex *output, double PI)
 
void procMoveToin2x (CUstream_st *streamLF, int Nx, int Ny, cufftDoubleComplex *in, cufftDoubleComplex *out)
 
void procMultiplyProp (CUstream_st *stream, int Nx, int Ny, cufftDoubleComplex *inout, double PI, double dist, double wavelength, double ppx, double ppy)
 
void procCopyToOut (CUstream_st *stream, int Nx, int Ny, cufftDoubleComplex *in, cufftDoubleComplex *out)
 

Variables

cufftDoubleComplex * RSplane_complex_field_gpu
 
uchar1 ** LF_gpu
 
uchar ** LFData_gpu
 
cudaStream_t streamLF
 

Macro Definition Documentation

◆ HANDLE_ERROR

#define HANDLE_ERROR (   err)    (HandleError( err, __FILE__, __LINE__ ))

Definition at line 64 of file ophLightField_GPU.h.

◆ HANDLE_NULL

#define HANDLE_NULL (   a)
Value:
{if (a == NULL) { \
printf( "Host memory failed in %s at line %d\n", \
__FILE__, __LINE__ ); \
exit( EXIT_FAILURE );}}

Definition at line 67 of file ophLightField_GPU.h.

Function Documentation

◆ cudaConvertLF2ComplexField_Kernel()

void cudaConvertLF2ComplexField_Kernel ( CUstream_st *  stream,
int  nx,
int  ny,
int  rx,
int  ry,
uchar1 **  LF,
cufftDoubleComplex *  output 
)

◆ cudaFFT_LF()

void cudaFFT_LF ( cufftHandle *  plan,
CUstream_st *  stream,
int  nx,
int  ny,
cufftDoubleComplex *  in_field,
cufftDoubleComplex *  output_field,
int  direction 
)

◆ procCopyToOut()

void procCopyToOut ( CUstream_st *  stream,
int  Nx,
int  Ny,
cufftDoubleComplex *  in,
cufftDoubleComplex *  out 
)

◆ procMoveToin2x()

void procMoveToin2x ( CUstream_st *  streamLF,
int  Nx,
int  Ny,
cufftDoubleComplex *  in,
cufftDoubleComplex *  out 
)

◆ procMultiplyPhase()

void procMultiplyPhase ( CUstream_st *  stream,
int  nx,
int  ny,
int  rx,
int  ry,
cufftDoubleComplex *  input,
cufftDoubleComplex *  output,
double  PI 
)

◆ procMultiplyProp()

void procMultiplyProp ( CUstream_st *  stream,
int  Nx,
int  Ny,
cufftDoubleComplex *  inout,
double  PI,
double  dist,
double  wavelength,
double  ppx,
double  ppy 
)

Variable Documentation

◆ LF_gpu

uchar1** LF_gpu

Definition at line 75 of file ophLightField_GPU.h.

◆ LFData_gpu

uchar** LFData_gpu

Definition at line 76 of file ophLightField_GPU.h.

◆ RSplane_complex_field_gpu

cufftDoubleComplex* RSplane_complex_field_gpu

Definition at line 73 of file ophLightField_GPU.h.

◆ streamLF

cudaStream_t streamLF

Definition at line 77 of file ophLightField_GPU.h.