Oh sorry about that. Yes It should be allocated, however the program keeps throwing me an exception anyways, the exception is :
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::compute::opencl_error> >'
what(): Invalid Memory Object
Aborted (core dumped)It happens on the compute
::transform() callThe code is:
(formatted here)#include <vector>
#include <algorithm>
#include <iostream>
#include <boost/compute/algorithm/transform.hpp>
#include <boost/compute/container/vector.hpp>
#include <boost/compute/functional/math.hpp>
#include <boost/compute/functional/geometry.hpp>
// #include </boost/compute/functional/geometry.hpp>
namespace compute = boost::compute;
int main()
{
// get default device and setup context
compute::device device = compute::system::default_device();
compute::context context(device);
compute::command_queue queue(context, device);
compute::vector <compute::float4_> vector_a = {(compute::float4_)(0.0f, 0.0f ,12.0f ,0.0f)};
compute::vector <compute::float4_> vector_b = {(compute::float4_)(1.0f, 3.0f ,-2.0f ,0.0f)};
compute::vector <compute::float_ > vector_c = {(compute::float_)(1.0f)};
std::cout << "/* message */" << '\n';