You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
84 lines
2.4 KiB
84 lines
2.4 KiB
#pragma once
|
|
#include "Tests.h"
|
|
|
|
|
|
class LCG : public TestCase {
|
|
private:
|
|
size_t randomNumbers;
|
|
size_t threadCount;
|
|
std::vector<float> randomBuffer;
|
|
std::vector<float> seedBuffer;
|
|
std::string kernel_name;
|
|
public:
|
|
LCG(size_t _randomNumbers, size_t _threadCount);
|
|
void collect_results(cl::CommandQueue* queue);
|
|
void gpu_compute(cl::Context* context, cl::CommandQueue* queue, cl::Program* program, cl::Event* Event);
|
|
void cpu_compute();
|
|
bool validate_results();
|
|
std::string description();
|
|
};
|
|
|
|
class LFG : public TestCase {
|
|
private:
|
|
size_t randomNumbers;
|
|
size_t threadCount;
|
|
std::vector<float> randomBuffer;
|
|
std::vector<float> seedBuffer;
|
|
std::string kernel_name;
|
|
size_t randomStateSize;
|
|
public:
|
|
LFG(size_t _randomNumbers, size_t _threadCount, size_t _randomStateSize);
|
|
void collect_results(cl::CommandQueue* queue);
|
|
void gpu_compute(cl::Context* context, cl::CommandQueue* queue, cl::Program* program, cl::Event* Event);
|
|
void cpu_compute();
|
|
bool validate_results();
|
|
std::string description();
|
|
};
|
|
|
|
class CTG : public TestCase {
|
|
private:
|
|
size_t randomNumbers;
|
|
size_t threadCount;
|
|
std::vector<float> randomBuffer;
|
|
std::vector<float> seedBuffer;
|
|
std::string kernel_name;
|
|
public:
|
|
CTG(size_t _randomNumbers, size_t _threadCount);
|
|
void collect_results(cl::CommandQueue* queue);
|
|
void gpu_compute(cl::Context* context, cl::CommandQueue* queue, cl::Program* program, cl::Event* Event);
|
|
void cpu_compute();
|
|
bool validate_results();
|
|
std::string description();
|
|
};
|
|
|
|
class Hybrid : public TestCase {
|
|
private:
|
|
size_t randomNumbers;
|
|
size_t threadCount;
|
|
std::vector<float> randomBuffer;
|
|
std::vector<float> seedBuffer;
|
|
std::string kernel_name;
|
|
public:
|
|
Hybrid(size_t _randomNumbers, size_t _threadCount);
|
|
void collect_results(cl::CommandQueue* queue);
|
|
void gpu_compute(cl::Context* context, cl::CommandQueue* queue, cl::Program* program, cl::Event* Event);
|
|
void cpu_compute();
|
|
bool validate_results();
|
|
std::string description();
|
|
};
|
|
|
|
class Halton : public TestCase {
|
|
private:
|
|
size_t randomNumbers;
|
|
size_t threadCount;
|
|
size_t base;
|
|
std::vector<float> randomBuffer;
|
|
std::string kernel_name;
|
|
public:
|
|
Halton(size_t _randomNumbers, size_t _threadCount, size_t _base);
|
|
void collect_results(cl::CommandQueue* queue);
|
|
void gpu_compute(cl::Context* context, cl::CommandQueue* queue, cl::Program* program, cl::Event* Event);
|
|
void cpu_compute();
|
|
bool validate_results();
|
|
std::string description();
|
|
};
|