简体   繁体   English

RenderScript分配中的调用单元格

[英]Call cell in RenderScript Allocation

可以说我有一个分配要更改单元格x_0,y_0处的值的方法,是否可以通过调用来设置或获取单元格的值或运行仅对一个单元格运行的内核函数?

You should probably use rsSetElementAt_uchar4() or whatever data type it is that you are setting. 您可能应该使用rsSetElementAt_uchar4()或您要设置的任何数据类型。 http://developer.android.com/guide/topics/renderscript/reference/rs_allocation_data.html#android_rs:rsSetElementAt is a guide for this. http://developer.android.com/guide/topics/renderscript/reference/rs_allocation_data.html#android_rs:rsSetElementAt是对此的指南。

Alternatively, you can do a single cell kernel call via Script.LaunchOptions (which should have a nice reflected interface in your ScriptC_* files). 另外,您可以通过Script.LaunchOptions(在ScriptC_ *文件中应该有一个漂亮的反映接口)进行单个单元内核调用。

http://developer.android.com/reference/android/renderscript/Script.LaunchOptions.html and http://developer.android.com/reference/android/renderscript/Script.html#forEach(int , android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.FieldPacker, android.renderscript.Script.LaunchOptions) http://developer.android.com/reference/android/renderscript/Script.LaunchOptions.htmlhttp://developer.android.com/reference/android/renderscript/Script.html#forEach(int,android.renderscript 。分配,android.renderscript。分配,android.renderscript.FieldPacker,android.renderscript.Script.LaunchOptions)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM