Esempio n. 1
0
inline void execute(template_base const & T, statements_container const & statements, viennacl::ocl::context & ctx = viennacl::ocl::current_context(), bool force_compilation = false)
{
  //Generate program name
  std::string program_name = tree_parsing::statements_representation(statements, BIND_TO_HANDLE);
  execution_handler handler(program_name, ctx, ctx.current_device(), force_compilation);
  handler.add(program_name, T, statements);
  handler.execute(program_name, statements);
}
Esempio n. 2
0
 inline void append_double_precision_pragma<double>(viennacl::ocl::context const & ctx, std::string & source)
 {
   source.append("#pragma OPENCL EXTENSION " + ctx.current_device().double_support_extension() + " : enable\n\n");
 }
Esempio n. 3
0
 static void apply(viennacl::ocl::context const & ctx)
 {
   if (!ctx.current_device().double_support())
     throw viennacl::ocl::double_precision_not_provided_error();
 }