예제 #1
0
파일: base.cpp 프로젝트: ngaloppo/isaac
std::string base::generate(std::string const & suffix, expression_tree const  & expression, driver::Device const & device)
{
  int err = is_invalid(expression, device);
  if(err != 0)
    throw operation_not_supported_exception("The supplied parameters for this template are invalid : err " + tools::to_string(err));

  //Create mapping
  symbolic::symbols_table mapping = symbolic::symbolize(fusion_policy_, expression);
  return generate_impl(suffix, expression, device, mapping);
}
 std::vector<std::string> generate_impl(std::string const & kernel_prefix, statements_container const & statements, std::vector<mapping_type> const & mappings) const
 {
   std::vector<std::string> res;
   res.push_back(generate_impl(kernel_prefix, statements, mappings, 1));
   return res;
 }