Blame view

grids/grid_data.cuh 703 Bytes
1d08c377   David Mayerich   added grids subdi...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
  #ifndef STIM_GRID_DATA_CUH
  #define STIM_GRID_DATA_CUH
  
  #include <vector>
  #include <string>
  #include <sstream>
  
  #include "../cuda/threads.h"
  #include "../cuda/error.h"
  #include "../cuda/devices.h"
  
  
  namespace stim{
  
  //This object describes a generic D-dimensional grid containing data of type T
  	// data can be stored on the GPU or CPU (and transferred between the two)
  	// data can be loaded in the form of images
  	// data can be saved in the form of binary files
  template<typename T, unsigned int D = 1>
  class grid_data{
  
  protected:
  
  	unsigned long R[D];		//elements in each dimension
  	T* ptr;					//pointer to the data (on the GPU or CPU)
  	bool gpu;				//true if the data is on the GPU
  
  };
  
  }
  
  
  #endif