Code Quality: Removed useless/buggy fetch_type tuning parameter
This commit is contained in:
@@ -152,25 +152,24 @@ std::shared_ptr<templates::base> profiles::create(std::string const & op, std::s
|
||||
|
||||
std::shared_ptr<templates::base> profiles::create(std::string const & template_name, std::vector<int> const & x)
|
||||
{
|
||||
templates::fetch_type fetch[] = {templates::FETCH_FROM_LOCAL, templates::FETCH_FROM_GLOBAL_STRIDED, templates::FETCH_FROM_GLOBAL_CONTIGUOUS};
|
||||
if(template_name=="elementwise_1d")
|
||||
return std::shared_ptr<templates::base>(new templates::elementwise_1d(x[0], x[1], x[2], fetch[x[3]]));
|
||||
return std::shared_ptr<templates::base>(new templates::elementwise_1d(x[0], x[1], x[2]));
|
||||
else if(template_name=="reduce_1d")
|
||||
return std::shared_ptr<templates::base>(new templates::reduce_1d(x[0], x[1], x[2], fetch[x[3]]));
|
||||
return std::shared_ptr<templates::base>(new templates::reduce_1d(x[0], x[1], x[2]));
|
||||
else if(template_name=="elementwise_2d")
|
||||
return std::shared_ptr<templates::base>(new templates::elementwise_2d(x[0], x[1], x[2], x[3], x[4], fetch[x[5]]));
|
||||
return std::shared_ptr<templates::base>(new templates::elementwise_2d(x[0], x[1], x[2], x[3], x[4]));
|
||||
else if(template_name.find("reduce_2d_rows")!=std::string::npos)
|
||||
return std::shared_ptr<templates::base>(new templates::reduce_2d_rows(x[0], x[1], x[2], x[3], x[4], fetch[x[5]]));
|
||||
return std::shared_ptr<templates::base>(new templates::reduce_2d_rows(x[0], x[1], x[2], x[3], x[4]));
|
||||
else if(template_name.find("reduce_2d_cols")!=std::string::npos)
|
||||
return std::shared_ptr<templates::base>(new templates::reduce_2d_cols(x[0], x[1], x[2], x[3], x[4], fetch[x[5]]));
|
||||
return std::shared_ptr<templates::base>(new templates::reduce_2d_cols(x[0], x[1], x[2], x[3], x[4]));
|
||||
else if(template_name.find("gemm_nn")!=std::string::npos)
|
||||
return std::shared_ptr<templates::base>(new templates::gemm_nn(x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7], fetch[x[8]], fetch[x[9]], x[10], x[11]));
|
||||
return std::shared_ptr<templates::base>(new templates::gemm_nn(x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7], x[8], x[9]));
|
||||
else if(template_name.find("gemm_tn")!=std::string::npos)
|
||||
return std::shared_ptr<templates::base>(new templates::gemm_tn(x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7], fetch[x[8]], fetch[x[9]], x[10], x[11]));
|
||||
return std::shared_ptr<templates::base>(new templates::gemm_tn(x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7], x[8], x[9]));
|
||||
else if(template_name.find("gemm_nt")!=std::string::npos)
|
||||
return std::shared_ptr<templates::base>(new templates::gemm_nt(x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7], fetch[x[8]], fetch[x[9]], x[10], x[11]));
|
||||
return std::shared_ptr<templates::base>(new templates::gemm_nt(x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7], x[8], x[9]));
|
||||
else if(template_name.find("gemm_tt")!=std::string::npos)
|
||||
return std::shared_ptr<templates::base>(new templates::gemm_tt(x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7], fetch[x[8]], fetch[x[9]], x[10], x[11]));
|
||||
return std::shared_ptr<templates::base>(new templates::gemm_tt(x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7], x[8], x[9]));
|
||||
else
|
||||
throw std::invalid_argument("Invalid expression: " + template_name);
|
||||
}
|
||||
|
Reference in New Issue
Block a user