Codestyle: rename helper_math.cu to vector.cu
This commit is contained in:
@@ -61,7 +61,7 @@ Program::Program(Context const & context, std::string const & source) : backend_
|
||||
|
||||
nvrtcProgram prog;
|
||||
|
||||
const char * includes[] = {"helper_math.h"};
|
||||
const char * includes[] = {"vector.h"};
|
||||
const char * src[] = {helpers::cuda::vector};
|
||||
|
||||
check(dispatch::nvrtcCreateProgram(&prog, source.c_str(), NULL, 1, src, includes));
|
||||
|
@@ -63,7 +63,7 @@ std::string elementwise_1d::generate_impl(std::string const & suffix, expression
|
||||
switch(backend)
|
||||
{
|
||||
case driver::CUDA:
|
||||
stream << "#include \"helper_math.h\"" << std::endl; break;
|
||||
stream << "#include \"vector.h\"" << std::endl; break;
|
||||
case driver::OPENCL:
|
||||
stream << " __attribute__((reqd_work_group_size(" << p_.local_size_0 << "," << p_.local_size_1 << ",1)))" << std::endl; break;
|
||||
}
|
||||
|
@@ -65,7 +65,7 @@ std::string elementwise_2d::generate_impl(std::string const & suffix, expression
|
||||
switch(backend)
|
||||
{
|
||||
case driver::CUDA:
|
||||
stream << "#include \"helper_math.h\"" << std::endl; break;
|
||||
stream << "#include \"vector.h\"" << std::endl; break;
|
||||
case driver::OPENCL:
|
||||
stream << " __attribute__((reqd_work_group_size(" << p_.local_size_0 << "," << p_.local_size_1 << ",1)))" << std::endl; break;
|
||||
}
|
||||
|
@@ -157,10 +157,11 @@ matrix_product_parameters::matrix_product_parameters(unsigned int simd_width
|
||||
|
||||
switch(backend)
|
||||
{
|
||||
case driver::CUDA:
|
||||
stream << "#include \"helper_math.h\"" << std::endl; break;
|
||||
case driver::OPENCL:
|
||||
stream << " __attribute__((reqd_work_group_size(" << p_.local_size_0 << "," << p_.local_size_1 << ",1)))" << std::endl; break;
|
||||
stream << " __attribute__((reqd_work_group_size(" << p_.local_size_0 << "," << p_.local_size_1 << ",1)))" << std::endl;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
stream << "$KERNEL void matrix_product" << suffix << "($SIZE_T M, $SIZE_T N, $SIZE_T K, "
|
||||
|
@@ -120,7 +120,7 @@ std::string reduce_1d::generate_impl(std::string const & suffix, expression_tree
|
||||
switch(backend)
|
||||
{
|
||||
case driver::CUDA:
|
||||
stream << "#include \"helper_math.h\"" << std::endl; break;
|
||||
stream << "#include \"vector.h\"" << std::endl; break;
|
||||
case driver::OPENCL:
|
||||
stream << " __attribute__((reqd_work_group_size(" << p_.local_size_0 << ",1,1)))" << std::endl; break;
|
||||
}
|
||||
|
@@ -111,9 +111,11 @@ std::string reduce_2d::generate_impl(std::string const & suffix, expression_tree
|
||||
switch(backend)
|
||||
{
|
||||
case driver::CUDA:
|
||||
stream << "#include \"helper_math.h\"" << std::endl; break;
|
||||
stream << "#include \"vector.h\"" << std::endl;
|
||||
break;
|
||||
case driver::OPENCL:
|
||||
stream << " __attribute__((reqd_work_group_size(" << p_.local_size_0 << "," << p_.local_size_1 << ",1)))" << std::endl; break;
|
||||
stream << " __attribute__((reqd_work_group_size(" << p_.local_size_0 << "," << p_.local_size_1 << ",1)))" << std::endl;
|
||||
break;
|
||||
}
|
||||
stream << "$KERNEL void " << name[0] << "($SIZE_T M, $SIZE_T N, $GLOBAL char* tmp, " << tools::join(kernel_arguments(device, symbols, tree), ", ") << ")" << std::endl;
|
||||
stream << "{" << std::endl;
|
||||
|
Reference in New Issue
Block a user