#include <Gaussian.h>
Definition at line 160 of file Gaussian.h.
◆ create()
std::unique_ptr< DataChef > souschef::GaussianFloat16DataChefFactory::create |
( |
const Arguments & |
args | ) |
const |
|
virtual |
Implements souschef::DataChefFactory.
Definition at line 236 of file Gaussian.cpp.
237{
238 if (
args.count() != 2)
239 {
240 throw std::runtime_error{"invalid argument count: two arguments (mean/stddev) are expected"};
241 }
242
243 auto const mean = to_number<float>(
args.value(0));
244 auto const stddev = to_number<float>(
args.value(1));
245
246 return std::unique_ptr<DataChef>{new GaussianFloat16DataChef{mean, stddev}};
247}
The documentation for this struct was generated from the following files: