How to pass array values to and from Android RenderScript using Allocations

后端 未结 3 1700
盖世英雄少女心
盖世英雄少女心 2021-01-11 19:39

I\'ve been working with RenderScript recently with the intent of creating an API that a programmer can use with ease, similar to the way that Microsoft Accelerator works.

3条回答
  •  不知归路
    2021-01-11 19:56

    I had the same problem. The problem with your program is that doesn't know when the add function in rs file should run ,try this it should work

    public void setNewValues(Script script, int A, int B) {
    mScript.set_numberA(A);
    mScript.set_numberB(B);
    mscript.invoke_intAdd();
    
    }
    

自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题