| 20 | |
| 21 | BOLT_FUNCTOR(saxpy_functor, |
| 22 | struct saxpy_functor |
| 23 | { |
| 24 | float _a; |
| 25 | saxpy_functor(float a) : _a(a) {}; |
| 26 | |
| 27 | float operator() (const float &x, const float &y) const |
| 28 | { |
| 29 | return _a * x + y; |
| 30 | }; |
| 31 | }; |
| 32 | ) |
| 33 | |
| 34 | int main(int argc, char *argv[]) |