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.
76 lines
2.1 KiB
76 lines
2.1 KiB
#pragma once
|
|
#include "Tests.h"
|
|
|
|
class Square : public TestCase {
|
|
private:
|
|
std::vector<float> gpuResult;
|
|
std::vector<float> sourceData;
|
|
std::vector<float> cpuResult;
|
|
public:
|
|
Square();
|
|
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 Histogram : public TestCase {
|
|
private:
|
|
bool global;
|
|
size_t valueSet;
|
|
std::vector<int> gpuResult;
|
|
std::vector<int> sourceData;
|
|
std::vector<int> cpuResult;
|
|
public:
|
|
Histogram(bool _global, int _valueSet, int _data_size);
|
|
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 ReduceAdd : public TestCase {
|
|
private:
|
|
std::vector<float> gpuResult;
|
|
std::vector<float> sourceData;
|
|
float cpuResult;
|
|
public:
|
|
ReduceAdd(size_t max_size);
|
|
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 ExclusiveScan : public TestCase {
|
|
private:
|
|
std::vector<int> gpuResult;
|
|
std::vector<int> sourceData;
|
|
std::vector<int> cpuResult;
|
|
public:
|
|
ExclusiveScan(size_t max_size);
|
|
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 Compact : public TestCase {
|
|
private:
|
|
std::vector<int> gpuResult;
|
|
std::vector<int> sourceData;
|
|
std::vector<int> cpuResult;
|
|
int limit;
|
|
int result_size;
|
|
public:
|
|
Compact(size_t _data_size);
|
|
void gpu_compute(cl::Context* context, cl::CommandQueue* queue, cl::Program* program, cl::Event* Event);
|
|
void cpu_compute();
|
|
void collect_results(cl::CommandQueue* queue);
|
|
bool validate_results();
|
|
std::string description();
|
|
};
|
|
|