11 std::size_t in_elements, std::size_t on_elements, std::size_t in_nsamples,
12 std::size_t on_nsamples,
char const* function_name) {
13 if (in_nsamples != on_nsamples) {
14 std::ostringstream os;
15 os <<
"mismatched number of samples (" << in_nsamples
16 <<
" != " << on_nsamples <<
") in " << function_name;
17 throw std::invalid_argument(os.str());
19 if (in_elements != on_elements) {
20 std::ostringstream os;
21 os <<
"mismatched element count (" << in_elements <<
" != " << on_elements
22 <<
") in " << function_name;
23 throw std::invalid_argument(os.str());
25 if (in_nsamples == 0) {
26 std::ostringstream os;
27 os <<
"nsamples must be non-zero in " << function_name;
28 throw std::invalid_argument(os.str());
void check_plan_inputs(std::size_t in_elements, std::size_t on_elements, std::size_t in_nsamples, std::size_t on_nsamples, char const *function_name)
Helper function to check the inputs to a create_*_plan_*()
The top-level namespace for the JayBeams library.