#include <iostream>
#include <boost/compute/core.hpp>
namespace compute = boost::compute;
int main()
{
compute::device device = compute::system::default_device();
std::cout << "hello from " <<
device.name() << std::endl;
return 0;
}
compiler outputs: c:\program files (x86)\microsoft visual studio 14.0\vc\include\xutility(2372): error C4996: 'std::copy::_Unchecked_iterators::_Deprecate': Call to 'std::copy' with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
but sample opencl program:
#include<stdio.h>
#include<CL/cl.h>
int main(void)
{
cl_int err;
cl_uint numPlatforms;
err = clGetPlatformIDs(0, NULL, &numPlatforms);
if (CL_SUCCESS == err)
printf("\nDetected OpenCL platforms: %d", numPlatforms);
else
printf("\nError calling clGetPlatformIDs. Error code: %d", err);
return 0;
}
Works just fine.
How to run boost::compute on windows?
Any tips? Or help?
Regards