Codestyle: rename helper_math.cu to vector.cu

This commit is contained in:
Philippe Tillet
2016-04-09 23:51:30 -04:00
parent 6bc5d9e1cb
commit 81139e0642
6 changed files with 12 additions and 9 deletions

View File

@@ -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));

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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, "

View File

@@ -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;
}

View File

@@ -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;