grid_data.cuh
703 Bytes
#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