文档机器人Renderscript先进rsForEach电话 [英] Documentation for Androids Renderscript advanced rsForEach call

查看:149
本文介绍了文档机器人Renderscript先进rsForEach电话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个关于机器人Renderscript rsForEach与rs_script_call_t *参数是如何工作的功能问题。在这些例子中只有其他(简单)rsForEach功能使用,因此并不能帮助我。我想改变我的阵列和实验XSTART和XEND的不同RS_FOR_EACH_STRATEGYs。我明白,我已经构建rs_script_call_t结构,并设置字段正确的价值观。但是,任何试图在SIGSEGV和核心转储使用此rsForEach调用结果。

I've a question about how Androids Renderscript rsForEach function with the rs_script_call_t* argument works. In the examples only the other (simple) rsForEach function is used, so that doesn't help me. I'd like to change the xStart and xEnd of my array and experiment with the different RS_FOR_EACH_STRATEGYs. I understand that I've to construct a rs_script_call_t struct and set the fields to the proper values. However, any attempt to use this rsForEach call result in a SIGSEGV and a coredump.

在rs_script_call结构(在rs_math.rsh):

In the rs_script_call struct (in rs_math.rsh):


  • 有哪些XSTART,XEND,yStart,YEND,zStart,Zend的值指的是?指数或指针?

  • 什么是arrayStart和arrayEnd值指的是?指数或指针?

  • 什么是这些默认值?

有没有解释如何正确使用与rs_script_call_t的rsForEach功能的更多文档(或例子)*参数?

Is there any more documentation (or examples) that explain how to properly use the rsForEach function with the rs_script_call_t* argument?

推荐答案

的X / Y / Z /开始/结束值指数,该计算脚本工作的内存分配。该结构可以限制rsForEach呼叫分配的分区。

The x/y/z/start/end values are indices to the memory allocation that the compute script is working on. The struct can limit a rsForEach call to a subregion of an allocation.

例如,对于分配是640×480,则可以定义XSTART = 100; XEND = 200; yStart = 100; YEND = 200.然后在foreach调用将发动对分配的100x100的区域。

For example, for an allocation that is 640x480, you could define xStart = 100; xEnd = 200; yStart = 100; yEnd = 200. Then the foreach call would launch on a 100x100 region of the allocation.

该arrayStart和arrayEnd现在目前没有使用,但在将来的版本将支持阵列尺寸分配中定义。

The arrayStart and arrayEnd right now are not used currently, but are defined for a future release that will support array dimensions in allocations.

默认值是不确定的,你需要在结构中定义自己的价值。如果你不使用结构中,rsForEach通话将工作在整个内存分配。

Default values are undefined, you need to define your own values in the struct. If you do not use the struct, the rsForEach call will work on the entire memory allocation.

有一个已知的bug在蜂窝使用这个时导致崩溃,所以这可能是您的问题。它已被固定在ICS。

There is a known bug that causes crashes when using this in Honeycomb, so this might be your issue. It has been fixed in ICS.

这篇关于文档机器人Renderscript先进rsForEach电话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆