Skip to content

Passing buffer as function arguments fails with: Eerror: cannot convert ‘Halide::Buffer<unsigned char, 2>’ to ‘halide_buffer_t*’ #8188

Answered by abadams
FabianSchuetze asked this question in Q&A
Discussion options

You must be logged in to vote

If you're using Halide as an AOT compiler, the file with the main function shouldn't be including Halide.h - that's the compiler, which you probably don't want to deploy in your app (unless you're using it as a JIT compiler). Instead of Halide.h, include HalideRuntime.h and HalideBuffer.h, and use a Halide::Runtime::Buffer instead of a Halide::Buffer.

Yes, the regions computed (and thus the range of the index values) get defined by starting from the size of the output buffer, which gives the size of the output Func. The compiler then works its way back up the pipeline, for each Func asking the question "to compute some region of this Func, how much of its input Funcs do I need?". This is …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@FabianSchuetze
Comment options

Answer selected by FabianSchuetze
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants