Depth of Field  0.1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
globals.h
Go to the documentation of this file.
1 #ifndef __GLOBALS_H
2 #define __GLOBALS_H
3 
5 //extern "C" void launch_kernel(uchar4*, unsigned int, unsigned int, int);
6 extern "C" void init_cuda(void *h_volume, cudaExtent volumeSize, int dataset_nr);
7 extern "C" void freeCudaBuffers();
11 extern "C" void launch_volren(dim3 gridSize, dim3 blockSize, dim3 volumeSize, uint *d_output, uint imageW, uint imageH,
12  float density, float brightness, float transferOffset, float transferScale);
13 extern "C" void copyInvViewMatrix(float *invViewMatrix, size_t sizeofMatrix);
17 extern "C" void launch_DepthOfField(dim3 gridSize, dim3 blockSize, dim3 volumeSize, uint *d_output, uint imageW, uint imageH,
18  float density, float brightness, float transferOffset, float transferScale, float alpha, bool viewChanged,
19  float4 focusPoint, float4 camPos, float tstep);
20 extern "C" void init_Cuda_DoF(int image_width, int image_height);
21 extern "C" void freeCudaDofBuffers();
22 
23 typedef unsigned char VolumeType;
24 typedef unsigned int uint;
25 typedef unsigned char uchar;
26 
27 
28 
29 // --------------------------------------------------------------------------
39 static void HandleError( cudaError_t err,
40  const char *file,
41  int line ) {
42  if (err != cudaSuccess) {
43  printf( "%s (%d) in %s at line %d\n", cudaGetErrorString( err ), err,
44  file, line );
45  exit( EXIT_FAILURE );
46  }
47 }
48 
49 // macro for error handling cuda functions
50 #define HANDLE_ERROR( err ) (HandleError( err, __FILE__, __LINE__ ))
51 
52 #endif