I'm trying to initialize Halide Buffer with a C++ 1D array. Given some other posts online, this is what I've got so far:
Image<float> in(Buffer(type_of<float>(), size_x, 0, 0, 0, NULL, in_ptr));
Where in_ptr is a pointer to my C++ array. When I run this I get the following error:
error: missing template arguments before ‘(’ token Image in(Buffer(type_of(), padded_size * (jb + 1), 0, 0, 0, NULL, d_In));
So I changed my code to:
Image<float> in(Buffer<float>(type_of<float>(), size_x, 0, 0, 0, NULL, in_ptr));
But that doesn't match any of the constructors either but I couldn't find any good documentations on how to initialize a Buffer.
Is it even possible to do something like this? How can I use a C++ 1D or 2D array to initialize Halide buffer?