|
|
@ -9,8 +9,11 @@ private: |
|
|
|
std::vector<float> randomBuffer; |
|
|
|
std::vector<float> seedBuffer; |
|
|
|
std::string kernel_name; |
|
|
|
cl::Buffer clHistoBuffer; |
|
|
|
std::vector<int> histoBuffer; |
|
|
|
size_t bucketNum; |
|
|
|
public: |
|
|
|
LCG(size_t _randomNumbers, size_t _threadCount); |
|
|
|
LCG(size_t _randomNumbers, size_t _threadCount, size_t _bucketNum); |
|
|
|
void collect_results(cl::CommandQueue* queue); |
|
|
|
void gpu_compute(cl::Context* context, cl::CommandQueue* queue, cl::Program* program, cl::Event* Event); |
|
|
|
void cpu_compute(); |
|
|
@ -26,8 +29,11 @@ private: |
|
|
|
std::vector<float> seedBuffer; |
|
|
|
std::string kernel_name; |
|
|
|
size_t randomStateSize; |
|
|
|
cl::Buffer clHistoBuffer; |
|
|
|
size_t bucketNum; |
|
|
|
std::vector<int> histoBuffer; |
|
|
|
public: |
|
|
|
LFG(size_t _randomNumbers, size_t _threadCount, size_t _randomStateSize); |
|
|
|
LFG(size_t _randomNumbers, size_t _threadCount, size_t _randomStateSize, size_t _bucketNum); |
|
|
|
void collect_results(cl::CommandQueue* queue); |
|
|
|
void gpu_compute(cl::Context* context, cl::CommandQueue* queue, cl::Program* program, cl::Event* Event); |
|
|
|
void cpu_compute(); |
|
|
@ -42,8 +48,11 @@ private: |
|
|
|
std::vector<float> randomBuffer; |
|
|
|
std::vector<float> seedBuffer; |
|
|
|
std::string kernel_name; |
|
|
|
cl::Buffer clHistoBuffer; |
|
|
|
size_t bucketNum; |
|
|
|
std::vector<int> histoBuffer; |
|
|
|
public: |
|
|
|
CTG(size_t _randomNumbers, size_t _threadCount); |
|
|
|
CTG(size_t _randomNumbers, size_t _threadCount, size_t _bucketNum); |
|
|
|
void collect_results(cl::CommandQueue* queue); |
|
|
|
void gpu_compute(cl::Context* context, cl::CommandQueue* queue, cl::Program* program, cl::Event* Event); |
|
|
|
void cpu_compute(); |
|
|
@ -58,8 +67,11 @@ private: |
|
|
|
std::vector<float> randomBuffer; |
|
|
|
std::vector<float> seedBuffer; |
|
|
|
std::string kernel_name; |
|
|
|
cl::Buffer clHistoBuffer; |
|
|
|
size_t bucketNum; |
|
|
|
std::vector<int> histoBuffer; |
|
|
|
public: |
|
|
|
Hybrid(size_t _randomNumbers, size_t _threadCount); |
|
|
|
Hybrid(size_t _randomNumbers, size_t _threadCount, size_t _bucketNum); |
|
|
|
void collect_results(cl::CommandQueue* queue); |
|
|
|
void gpu_compute(cl::Context* context, cl::CommandQueue* queue, cl::Program* program, cl::Event* Event); |
|
|
|
void cpu_compute(); |
|
|
@ -74,8 +86,11 @@ private: |
|
|
|
size_t base; |
|
|
|
std::vector<float> randomBuffer; |
|
|
|
std::string kernel_name; |
|
|
|
cl::Buffer clHistoBuffer; |
|
|
|
size_t bucketNum; |
|
|
|
std::vector<int> histoBuffer; |
|
|
|
public: |
|
|
|
Halton(size_t _randomNumbers, size_t _threadCount, size_t _base); |
|
|
|
Halton(size_t _randomNumbers, size_t _threadCount, size_t _base, size_t _bucketNum); |
|
|
|
void collect_results(cl::CommandQueue* queue); |
|
|
|
void gpu_compute(cl::Context* context, cl::CommandQueue* queue, cl::Program* program, cl::Event* Event); |
|
|
|
void cpu_compute(); |
|
|
|