Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <boost/config.hpp>
- #include <MaxSLiCInterface.h>
- #include "vexcl_dfe_kernel.h"
- struct kernel_api {
- virtual void execute(char*) const = 0;
- };
- #define KERNEL_PARAMETER(type, name) \
- type name = *reinterpret_cast<type*>(_p); _p+= sizeof(type)
- struct simple_t : public kernel_api {
- void execute(char*) const;
- };
- extern "C" BOOST_SYMBOL_EXPORT simple_t simple;
- simple_t simple;
- void simple_t::execute(char *_p) const {
- KERNEL_PARAMETER(int, n);
- KERNEL_PARAMETER(const float *, x);
- KERNEL_PARAMETER(float *, y);
- vexcl_dfe_kernel(n, x, y);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement