Removed unused test kernels

This commit is contained in:
T.D. (Tongdong) Qiu
2020-07-06 11:03:47 +02:00
parent a164a57220
commit 4c037b0998
2 changed files with 1 additions and 31 deletions

View File

@@ -23,34 +23,6 @@
namespace bda namespace bda
{ {
const char* kernel_1 = R"(
__kernel void hello1(void)
{
printf("in the kernel 1\n");
}
)";
const char* kernel_2 = R"(
__kernel void hello2(
__global int *in1,
__global int *in2,
__global int *out)
{
printf("in the kernel 2\n");
int idx = get_global_id(0);
out[idx] = in1[idx];
for(int i = 0; i < 20000000; ++i){
out[idx] = in1[idx] - in2[idx] * out[idx];
if(out[idx] > 100000){
out[idx] -= 100000;
}
if(out[idx] < -100000){
out[idx] += 100000;
}
}
}
)";
const char* axpy_s = R"( const char* axpy_s = R"(
__kernel void axpy( __kernel void axpy(
__global double *in, __global double *in,

View File

@@ -443,9 +443,7 @@ void openclSolverBackend<block_size>::initialize(int N_, int nnz_, int dim, doub
OPM_THROW(std::logic_error, "Error chosen too high OpenCL device ID"); OPM_THROW(std::logic_error, "Error chosen too high OpenCL device ID");
} }
cl::Program::Sources source(1, std::make_pair(kernel_1, strlen(kernel_1))); // what does this '1' mean? cl::Program::Sources is of type 'std::vector<std::pair<const char*, long unsigned int> >' cl::Program::Sources source(1, std::make_pair(axpy_s, strlen(axpy_s))); // what does this '1' mean? cl::Program::Sources is of type 'std::vector<std::pair<const char*, long unsigned int> >'
source.emplace_back(std::make_pair(kernel_2, strlen(kernel_2)));
source.emplace_back(std::make_pair(axpy_s, strlen(axpy_s)));
source.emplace_back(std::make_pair(dot_1_s, strlen(dot_1_s))); source.emplace_back(std::make_pair(dot_1_s, strlen(dot_1_s)));
source.emplace_back(std::make_pair(norm_s, strlen(norm_s))); source.emplace_back(std::make_pair(norm_s, strlen(norm_s)));
source.emplace_back(std::make_pair(custom_s, strlen(custom_s))); source.emplace_back(std::make_pair(custom_s, strlen(custom_s)));