Question

I'm trying to write a simple kernel for image processing; I was planning on storing the channel of image in the 'z' coordinate of an allocation. I think this should be possible based on the documentation:

A kernel may access the coordinates of the current execution using the x, y, and z arguments. These arguments are optional, but the type of the coordinate arguments must be uint32_t.

I tried to write an empty kernel which uses the 'z' coordinate:

#pragma version(1)
#pragma rs java_package_name(org.rjpower.testcompute)

rs_allocation data_in;
rs_allocation data_out;

void root(const float* src, float* dst, uint32_t x, uint32_t y, uint32_t z) {
}

But the compile fails with:

error: Unexpected kernel root() parameter 'z' of type 'uint32_t'

Are z-coordinates actually supported?

Was it helpful?

Solution

No, right now we don't support z coordinates when used with forEach.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top