#pragma once #include "Tests.h" class Square : public TestCase { private: std::vector gpuResult; std::vector sourceData; std::vector 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 gpuResult; std::vector sourceData; std::vector 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 gpuResult; std::vector 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 gpuResult; std::vector sourceData; std::vector 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 gpuResult; std::vector sourceData; std::vector 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(); };