Openholo  v2.1
Open Source Digital Holographic Library
ophTriMesh_GPU.h File Reference
#include "ophTriMesh.h"
#include "sys.h"
#include <stdio.h>
#include <cuda_runtime.h>
#include <cufft.h>
#include <curand.h>
#include <math_constants.h>
Include dependency graph for ophTriMesh_GPU.h:

Go to the source code of this file.

Macros

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

Functions

void call_cudaKernel_refAS (cufftDoubleComplex *output, int nx, int ny, double px, double py, unsigned int SHADING_FLAG, int idx, double waveLength, double pi, double shadingFactor, double av0, double av1, double av2, double glRot0, double glRot1, double glRot2, double glRot3, double glRot4, double glRot5, double glRot6, double glRot7, double glRot8, double loRot0, double loRot1, double loRot2, double loRot3, double glShiftX, double glShiftY, double glShiftZ, double carrierWaveX, double carrierWaveY, double carrierWaveZ, double min_double, double tolerence, CUstream_st *streamTriMesh)
 
void call_cudaKernel_refASf (cuFloatComplex *output, int nx, int ny, float px, float py, unsigned int sflag, int idx, float waveLength, float pi, float shadingFactor, float av0, float av1, float av2, float glRot0, float glRot1, float glRot2, float glRot3, float glRot4, float glRot5, float glRot6, float glRot7, float glRot8, float loRot0, float loRot1, float loRot2, float loRot3, float glShiftX, float glShiftY, float glShiftZ, float carrierWaveX, float carrierWaveY, float carrierWaveZ, float min_double, float tolerence, CUstream_st *streamTriMesh)
 
void call_fftGPU (int nx, int ny, cufftDoubleComplex *input, cufftDoubleComplex *output, CUstream_st *streamTriMesh)
 
void call_fftGPUf (int nx, int ny, cuFloatComplex *input, cuFloatComplex *output, CUstream_st *streamTriMesh)
 

Variables

cufftDoubleComplex * angularSpectrum_GPU
 
cufftDoubleComplex * ffttemp
 
cudaStream_t streamTriMesh
 

Macro Definition Documentation

◆ CUDA_CALL

#define CUDA_CALL (   x)
Value:
{ if((x)!=cudaSuccess) { \
printf("Error at %s:%d\n",__FILE__,__LINE__);\
exit( EXIT_FAILURE ); }}

Definition at line 75 of file ophTriMesh_GPU.h.

◆ CURAND_CALL

#define CURAND_CALL (   x)
Value:
{ if((x)!=CURAND_STATUS_SUCCESS) { \
printf("Error at %s:%d\n",__FILE__,__LINE__);\
exit( EXIT_FAILURE ); }}

Definition at line 78 of file ophTriMesh_GPU.h.

◆ HANDLE_ERROR

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

Definition at line 68 of file ophTriMesh_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 71 of file ophTriMesh_GPU.h.

Function Documentation

◆ call_cudaKernel_refAS()

void call_cudaKernel_refAS ( cufftDoubleComplex *  output,
int  nx,
int  ny,
double  px,
double  py,
unsigned int  SHADING_FLAG,
int  idx,
double  waveLength,
double  pi,
double  shadingFactor,
double  av0,
double  av1,
double  av2,
double  glRot0,
double  glRot1,
double  glRot2,
double  glRot3,
double  glRot4,
double  glRot5,
double  glRot6,
double  glRot7,
double  glRot8,
double  loRot0,
double  loRot1,
double  loRot2,
double  loRot3,
double  glShiftX,
double  glShiftY,
double  glShiftZ,
double  carrierWaveX,
double  carrierWaveY,
double  carrierWaveZ,
double  min_double,
double  tolerence,
CUstream_st *  streamTriMesh 
)

◆ call_cudaKernel_refASf()

void call_cudaKernel_refASf ( cuFloatComplex *  output,
int  nx,
int  ny,
float  px,
float  py,
unsigned int  sflag,
int  idx,
float  waveLength,
float  pi,
float  shadingFactor,
float  av0,
float  av1,
float  av2,
float  glRot0,
float  glRot1,
float  glRot2,
float  glRot3,
float  glRot4,
float  glRot5,
float  glRot6,
float  glRot7,
float  glRot8,
float  loRot0,
float  loRot1,
float  loRot2,
float  loRot3,
float  glShiftX,
float  glShiftY,
float  glShiftZ,
float  carrierWaveX,
float  carrierWaveY,
float  carrierWaveZ,
float  min_double,
float  tolerence,
CUstream_st *  streamTriMesh 
)

◆ call_fftGPU()

void call_fftGPU ( int  nx,
int  ny,
cufftDoubleComplex *  input,
cufftDoubleComplex *  output,
CUstream_st *  streamTriMesh 
)

◆ call_fftGPUf()

void call_fftGPUf ( int  nx,
int  ny,
cuFloatComplex *  input,
cuFloatComplex *  output,
CUstream_st *  streamTriMesh 
)

Variable Documentation

◆ angularSpectrum_GPU

cufftDoubleComplex* angularSpectrum_GPU

Definition at line 82 of file ophTriMesh_GPU.h.

◆ ffttemp

cufftDoubleComplex* ffttemp

Definition at line 83 of file ophTriMesh_GPU.h.

◆ streamTriMesh

cudaStream_t streamTriMesh

Definition at line 85 of file ophTriMesh_GPU.h.