Commit e6174b8f authored by Paul's avatar Paul
Browse files

Formatting

parent 697dcb06
...@@ -56,8 +56,8 @@ struct compiler ...@@ -56,8 +56,8 @@ struct compiler
{ {
loader l; loader l;
bool gpu = true; bool gpu = true;
void parse(argument_parser& ap) void parse(argument_parser& ap)
{ {
l.parse(ap); l.parse(ap);
ap(gpu, {"--gpu"}, ap.help("Compile on the gpu"), ap.set_value(true)); ap(gpu, {"--gpu"}, ap.help("Compile on the gpu"), ap.set_value(true));
ap(gpu, {"--cpu"}, ap.help("Compile on the cpu"), ap.set_value(false)); ap(gpu, {"--cpu"}, ap.help("Compile on the cpu"), ap.set_value(false));
...@@ -70,10 +70,7 @@ struct compiler ...@@ -70,10 +70,7 @@ struct compiler
return p; return p;
} }
auto params(const program& p) auto params(const program& p) { return create_param_map(p, gpu); }
{
return create_param_map(p, gpu);
}
}; };
struct read : command<read> struct read : command<read>
...@@ -129,8 +126,8 @@ struct perf : command<perf> ...@@ -129,8 +126,8 @@ struct perf : command<perf>
{ {
compiler c; compiler c;
unsigned n = 100; unsigned n = 100;
void parse(argument_parser& ap) void parse(argument_parser& ap)
{ {
c.parse(ap); c.parse(ap);
ap(n, {"--iterations", "-n"}, ap.help("Number of iterations to run for perf report")); ap(n, {"--iterations", "-n"}, ap.help("Number of iterations to run for perf report"));
} }
......
...@@ -28,14 +28,13 @@ program::parameter_map create_param_map(const program& p, bool gpu) ...@@ -28,14 +28,13 @@ program::parameter_map create_param_map(const program& p, bool gpu)
void compile_program(program& p, bool gpu) void compile_program(program& p, bool gpu)
{ {
if (gpu) if(gpu)
{ {
#ifdef HAVE_GPU #ifdef HAVE_GPU
p.compile(gpu::target{}); p.compile(gpu::target{});
#else #else
MIGRAPHX_THROW("Gpu not supported."); MIGRAPHX_THROW("Gpu not supported.");
#endif #endif
} }
else else
{ {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment