1
커널 완료시 Java로 다시 전달할 목적으로 RS의 전역 값을 증가시킵니다. rsDebug는 각 반복에서 값이 상승하는 것을 보여 주지만, mScript.get_var()는 초기 값 1을 반환합니다. MAX의 마지막 값을 얻는 올바른 방법은 무엇입니까?RenderScript 전역에서 다시 Java로 값 가져 오기
RS :
int MAX = 1;
void root(const input* in, float* out){
MAX = MAX+1;
rsDebug("MAX",MAX);
*out = atan2(in->first, in->second);
}
자바 :
float[] out = new float[100000];
mScript.forEach_root(mInAllocation, mOutAllocation);
mOutAllocation.copyTo(out);
Log.i("Max Count...", Integer.toString(mScript.get_MAX()));
빠른 답변 감사드립니다. 내 핵심 문제를 해결하기 위해 후속 조치를 게시하겠습니다. – sarwar