Openholo  v4.0
Open Source Digital Holographic Library
ophTriMesh_GPU.h File Reference
#include "ophTriMesh.h"
#include "sys.h"
#include <stdio.h>
#include <cuda_runtime_api.h>
#include <cufft.h>
#include <curand.h>
#include <math_constants.h>
Include dependency graph for ophTriMesh_GPU.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  MeshKernelConfig
 

Macros

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

Typedefs

typedef struct MeshKernelConfig MeshKernelConfig
 

Functions

void cudaMesh_Flat (const int &nBlocks, const int &nThreads, cufftDoubleComplex *output, const MeshKernelConfig *config, double shading_factor, const geometric *geom, double carrierWaveX, double carrierWaveY, double carrierWaveZ, CUstream_st *stream)
 
void cudaMesh_Continuous (const int &nBlocks, const int &nThreads, cufftDoubleComplex *output, const MeshKernelConfig *config, const geometric *geom, double av0, double av1, double av2, double carrierWaveX, double carrierWaveY, double carrierWaveZ, CUstream_st *stream)
 
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)
 

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.

Typedef Documentation

◆ MeshKernelConfig

Function Documentation

◆ 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 
)

◆ cudaMesh_Continuous()

void cudaMesh_Continuous ( const int &  nBlocks,
const int &  nThreads,
cufftDoubleComplex *  output,
const MeshKernelConfig config,
const geometric geom,
double  av0,
double  av1,
double  av2,
double  carrierWaveX,
double  carrierWaveY,
double  carrierWaveZ,
CUstream_st *  stream 
)

◆ cudaMesh_Flat()

void cudaMesh_Flat ( const int &  nBlocks,
const int &  nThreads,
cufftDoubleComplex *  output,
const MeshKernelConfig config,
double  shading_factor,
const geometric geom,
double  carrierWaveX,
double  carrierWaveY,
double  carrierWaveZ,
CUstream_st *  stream 
)