Commit 8f992e4a authored by Shucai Xiao's avatar Shucai Xiao
Browse files

add an additional check for the capture operator

parent eab3cafb
......@@ -32,7 +32,15 @@ struct capture
argument compute(const shape&, std::vector<argument> args) const
{
f(ins_index, args);
if (f)
{
f(ins_index, args);
}
else
{
MIGRAPHX_THROW("CAPTURE: callback function is not callable!");
}
return args.front();
}
};
......
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