Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "thrust/device_ptr.h"
- #include "thrust/extrema.h"
- #include "thrust/system_error.h"
- #include <iostream>
- exern "C" int min_float_wrapper( float *data, int N)
- {
- try {
- thrust::device_ptr <float> dev_ptr(data);
- return thrust::min_element(dev_ptr, dev_ptr + N) - dev_ptr;
- }
- catch(thrust::system_error &e) {
- std::cerr << "min_float_wrapper error " << e.what() << std::endl;
- return -1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement