문제

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?

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top