Android NDK开发详解RenderScript之RenderScript 分配数据访问函数

Android NDK开发详解RenderScript之RenderScript 分配数据访问函数

概览

以下函数可用于获取和设置构成分配的单元格。

您可以使用 rsGetElementAt* 和 rsSetElementAt 函数访问各个单元格。
您可以使用 rsAllocationCopy* 和 rsAllocationV* 函数复制多个单元格。
要通过采样器获取值,请使用 rsSample。
rsGetElementAt 和 rsSetElement* 函数命名有误。 它们不会获取或设置元素(类似于数据类型),而是会获取或设置单元格。将它们视为 rsGetCellAt 和 rsSetCellAt。

摘要

函数
rsAllocationCopy1DRange 在分配之间复制连续单元格
rsAllocationCopy2DRange 在分配之间复制单元格的矩形区域
rsAllocationVLoadX 从标量分配中获取矢量
rsAllocationVStoreX 将矢量存储在标量的分配中
rsGetElementAt 返回分配中的单元格
rsGetElementAtYuv_uchar_U 获取 YUV 分配的 U 分量
rsGetElementAtYuv_uchar_V 获取 YUV 分配的 V 分量
rsGetElementAtYuv_uchar_Y 获取 YUV 分配的 Y 分量
rsSample 对纹理分配中的值进行采样
rsSetElementAt 设置分配的单元格

函数

rsAllocationCopy1DRange :在分配之间复制连续单元格
void rsAllocationCopy1DRange(rs_allocation dstAlloc, uint32_t dstOff, uint32_t dstMip, uint32_t count, rs_allocation srcAlloc, uint32_t srcOff, uint32_t, uint32_t 在 API 级别 14 中引入

参数
dstAlloc	分配以将单元格复制到其中。
dstOff	第一个要复制到的单元格的目标单元格的偏移量。
dstMip	目标分配中的 mip 级别。如果未使用 mip 映射,则为 0。
count	要复制的单元格数。
srcAlloc	来源分配。
关闭	要复制的第一个单元格的源偏移量。
srcMip	来源分配中的 mip 级别。如果未使用 mip 映射,则为 0

将指定数量的单元格从一个分配复制到另一个分配。

这两个分配金额必须不同。使用此函数复制同一分配中的内容会产生未定义的结果。

该函数不会验证偏移加计数是否超出任一分配的大小。请注意!

此函数应仅在 1D 分配之间调用。未定义在其他分配中调用它。

不应从内核内部或可能从内核直接或间接调用的任何函数调用此函数。这样做会导致运行时错误。

rsAllocationCopy2DRange :在分配之间复制单元格的矩形区域
void_rsAllocationCopy2DRange(<br class="ph-01-01&hl=zh-CN&zippy1%2C-
1>。 在 API 级别 14 中引入

参数
dstAlloc	分配以将单元格复制到其中。
dstXoff	要设置的区域目的地中的 X 偏移量。
dstYoff	要设置的区域目的地中的 Y 偏移量。
dstMip	目标分配中的 mip 级别。如果未使用 mip 映射,则为 0。
DSTFace	目标分配的立方体贴图面。对于不是立方图的分配,系统会忽略此参数。
width	要更新的传入区域的宽度。
height	要更新的传入区域的高度。
srcAlloc	来源分配。
srcXoff	来源中的 X 偏移量。
srcYoff	来源中的 Y 偏移量。
srcMip	来源分配中的 mip 级别。如果未使用 mip 映射,则为 0

面孔 来源分配的立方体贴图面。对于不是立方图的分配,系统会忽略此参数。
将单元格的矩形区域从一个分配复制到另一个分配。 (宽度 * 高度)单元格复制。

这两个分配金额必须不同。使用此函数复制同一分配中的内容会产生未定义的结果。

该函数不会验证来源区域或目标区域是否超出其各自分配的大小。请注意!

此函数应仅在 2D 分配之间调用。未定义在其他分配中调用它。

不应从内核内部或可能从内核直接或间接调用的任何函数调用此函数。这样做会导致运行时错误。

rsAllocationVLoadX :从标量分配中获取矢量
char2 rsAllocationVLoadX_char2(rs_allocation a, uint32_t x); 在 API 级别 22 中引入
char2 rsAllocationVLoadX_char2(rs_allocation a, uint32_t x, uint32_t y); 在 API 级别 22 中引入
char2 rsAllocationVLoadX_char2(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
char3 rsAllocationVLoadX_char3(rs_allocation a, uint32_t x); 在 API 级别 22 中引入
char3 rsAllocationVLoadX_char3(rs_allocation a, uint32_t x, uint32_t y); 在 API 级别 22 中引入
char3 rsAllocationVLoadX_char3(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
char4 rsAllocationVLoadX_char4(rs_allocation a, uint32_t x); 在 API 级别 22 中引入
char4 rsAllocationVLoadX_char4(rs_allocation a, uint32_t x, uint32_t y); 在 API 级别 22 中引入
char4 rsAllocationVLoadX_char4(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
double2 rsAllocationVLoadX_double2(rs_allocation a, uint32_t x); 在 API 级别 22 中引入
double2 rsAllocationVLoadX_double2(rs_allocation a, uint32_t x, uint32_t y); 在 API 级别 22 中引入
double2 rsAllocationVLoadX_double2(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
double3 rsAllocationVLoadX_double3(rs_allocation a, uint32_t x); 在 API 级别 22 中引入
double3 rsAllocationVLoadX_double3(rs_allocation a, uint32_t x, uint32_t y); 在 API 级别 22 中引入
double3 rsAllocationVLoadX_double3(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
double4 rsAllocationVLoadX_double4(rs_allocation a, uint32_t x); 在 API 级别 22 中引入
double4 rsAllocationVLoadX_double4(rs_allocation a, uint32_t x, uint32_t y); 在 API 级别 22 中引入
double4 rsAllocationVLoadX_double4(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
float2 rsAllocationVLoadX_float2(rs_allocation a, uint32_t x); 在 API 级别 22 中引入
float2 rsAllocationVLoadX_float2(rs_allocation a, uint32_t x, uint32_t y); 在 API 级别 22 中引入
float2 rsAllocationVLoadX_float2(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
float3 rsAllocationVLoadX_float3(rs_allocation a, uint32_t x); 在 API 级别 22 中引入
float3 rsAllocationVLoadX_float3(rs_allocation a, uint32_t x, uint32_t y); 在 API 级别 22 中引入
float3 rsAllocationVLoadX_float3(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
float4 rsAllocationVLoadX_float4(rs_allocation a, uint32_t x); 在 API 级别 22 中引入
float4 rsAllocationVLoadX_float4(rs_allocation a, uint32_t x, uint32_t y); 在 API 级别 22 中引入
float4 rsAllocationVLoadX_float4(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
int2 rsAllocationVLoadX_int2(rs_allocation a, uint32_t x); 在 API 级别 22 中引入
int2 rsAllocationVLoadX_int2(rs_allocation a, uint32_t x, uint32_t y); 在 API 级别 22 中引入
int2 rsAllocationVLoadX_int2(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
int3 rsAllocationVLoadX_int3(rs_allocation a, uint32_t x); 在 API 级别 22 中引入
int3 rsAllocationVLoadX_int3(rs_allocation a, uint32_t x, uint32_t y); 在 API 级别 22 中引入
int3 rsAllocationVLoadX_int3(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
int4 rsAllocationVLoadX_int4(rs_allocation a, uint32_t x); 在 API 级别 22 中引入
int4 rsAllocationVLoadX_int4(rs_allocation a, uint32_t x, uint32_t y); 在 API 级别 22 中引入
int4 rsAllocationVLoadX_int4(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
long2 rsAllocationVLoadX_long2(rs_allocation a, uint32_t x); 在 API 级别 22 中引入
long2 rsAllocationVLoadX_long2(rs_allocation a, uint32_t x, uint32_t y); 在 API 级别 22 中引入
long2 rsAllocationVLoadX_long2(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
long3 rsAllocationVLoadX_long3(rs_allocation a, uint32_t x); 在 API 级别 22 中引入
long3 rsAllocationVLoadX_long3(rs_allocation a, uint32_t x, uint32_t y); 在 API 级别 22 中引入
long3 rsAllocationVLoadX_long3(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
long4 rsAllocationVLoadX_long4(rs_allocation a, uint32_t x); 在 API 级别 22 中引入
long4 rsAllocationVLoadX_long4(rs_allocation a, uint32_t x, uint32_t y); 在 API 级别 22 中引入
long4 rsAllocationVLoadX_long4(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
short2 rsAllocationVLoadX_short2(rs_allocation a, uint32_t x); 在 API 级别 22 中引入
short2 rsAllocationVLoadX_short2(rs_allocation a, uint32_t x, uint32_t y); 在 API 级别 22 中引入
short2 rsAllocationVLoadX_short2(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
short3 rsAllocationVLoadX_short3(rs_allocation a, uint32_t x); 在 API 级别 22 中引入
short3 rsAllocationVLoadX_short3(rs_allocation a, uint32_t x, uint32_t y); 在 API 级别 22 中引入
short3 rsAllocationVLoadX_short3(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
short4 rsAllocationVLoadX_short4(rs_allocation a, uint32_t x); 在 API 级别 22 中引入
short4 rsAllocationVLoadX_short4(rs_allocation a, uint32_t x, uint32_t y); 在 API 级别 22 中引入
short4 rsAllocationVLoadX_short4(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
uchar2 rsAllocationVLoadX_uchar2(rs_allocation a, uint32_t x); 在 API 级别 22 中引入
uchar2 rsAllocationVLoadX_uchar2(rs_allocation a, uint32_t x, uint32_t y); 在 API 级别 22 中引入
uchar2 rsAllocationVLoadX_uchar2(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
uchar3 rsAllocationVLoadX_uchar3(rs_allocation a, uint32_t x); 在 API 级别 22 中引入
uchar3 rsAllocationVLoadX_uchar3(rs_allocation a, uint32_t x, uint32_t y); 在 API 级别 22 中引入
uchar3 rsAllocationVLoadX_uchar3(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
uchar4 rsAllocationVLoadX_uchar4(rs_allocation a, uint32_t x); 在 API 级别 22 中引入
uchar4 rsAllocationVLoadX_uchar4(rs_allocation a, uint32_t x, uint32_t y); 在 API 级别 22 中引入
uchar4 rsAllocationVLoadX_uchar4(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
uint2 rsAllocationVLoadX_uint2(rs_allocation a, uint32_t x); 在 API 级别 22 中引入
uint2 rsAllocationVLoadX_uint2(rs_allocation a, uint32_t x, uint32_t y); 在 API 级别 22 中引入
uint2 rsAllocationVLoadX_uint2(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
uint3 rsAllocationVLoadX_uint3(rs_allocation a, uint32_t x); 在 API 级别 22 中引入
uint3 rsAllocationVLoadX_uint3(rs_allocation a, uint32_t x, uint32_t y); 在 API 级别 22 中引入
uint3 rsAllocationVLoadX_uint3(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
uint4 rsAllocationVLoadX_uint4(rs_allocation a, uint32_t x); 在 API 级别 22 中引入
uint4 rsAllocationVLoadX_uint4(rs_allocation a, uint32_t x, uint32_t y); 在 API 级别 22 中引入
uint4 rsAllocationVLoadX_uint4(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
ulong2 rsAllocationVLoadX_ulong2(rs_allocation a, uint32_t x); 在 API 级别 22 中引入
ulong2 rsAllocationVLoadX_ulong2(rs_allocation a, uint32_t x, uint32_t y); 在 API 级别 22 中引入
ulong2 rsAllocationVLoadX_ulong2(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
ulong3 rsAllocationVLoadX_ulong3(rs_allocation a, uint32_t x); 在 API 级别 22 中引入
ulong3 rsAllocationVLoadX_ulong3(rs_allocation a, uint32_t x, uint32_t y); 在 API 级别 22 中引入
ulong3 rsAllocationVLoadX_ulong3(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
ulong4 rsAllocationVLoadX_ulong4(rs_allocation a, uint32_t x); 在 API 级别 22 中引入
ulong4 rsAllocationVLoadX_ulong4(rs_allocation a, uint32_t x, uint32_t y); 在 API 级别 22 中引入
ulong4 rsAllocationVLoadX_ulong4(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
ushort2 rsAllocationVLoadX_ushort2(rs_allocation a, uint32_t x); 在 API 级别 22 中引入
ushort2 rsAllocationVLoadX_ushort2(rs_allocation a, uint32_t x, uint32_t y); 在 API 级别 22 中引入
ushort2 rsAllocationVLoadX_ushort2(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
ushort3 rsAllocationVLoadX_ushort3(rs_allocation a, uint32_t x); 在 API 级别 22 中引入
ushort3 rsAllocationVLoadX_ushort3(rs_allocation a, uint32_t x, uint32_t y); 在 API 级别 22 中引入
ushort3 rsAllocationVLoadX_ushort3(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
ushort4 rsAllocationVLoadX_ushort4(rs_allocation a, uint32_t x); 在 API 级别 22 中引入
ushort4 rsAllocationVLoadX_ushort4(rs_allocation a, uint32_t x, uint32_t y); 在 API 级别 22 中引入
ushort4 rsAllocationVLoadX_ushort4(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入

参数
一个	用于从中获取数据的分配。
x	要复制的第一个单元格的分配中的 X 偏移量。
y	要复制的第一个单元格在分配中的 Y 偏移量。
z	要复制的第一个单元格的分配中的 Z 偏移量。

此函数会返回由分配的连续单元格组成的向量。它假定分配包含标量。

名称中的“X”表示通过增加 X 索引提取连续值。目前没有函数可用于获取递增其他维度的连续值。请改用对 rsGetElementAt() 的多次调用。

例如,调用 rsAllocationVLoadX_int4(a, 20, 30) 时,系统会返回由 a[20, 30]、a[21, 30]、a[22, 30] 和 a[23, 30] 组成的 int4。

从三维分配中检索时,请使用 x、y、z 变体。同样,对于二维分配,使用 x、y 变体;对于单维分配,请使用 x。

为了提高效率,此函数不验证输入。如果尝试封装 X 索引、超过分配大小,或使用与分配维度不兼容的索引,则会产生未定义的结果。

另请参阅 rsAllocationVStoreX()。

rsAllocationVStoreX :将向量存储到标量的分配中
void rsAllocationVStoreX_char2(rs_allocation a, char2 val, uint32_t x); 在 API 级别 22 中引入
void rsAllocationVStoreX_char2(rs_allocation a, char2 val, uint32_t x, uint32_t y); 在 API 级别 22 中引入
void rsAllocationVStoreX_char2(rs_allocation a, char2 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
void rsAllocationVStoreX_char3(rs_allocation a, char3 val, uint32_t x); 在 API 级别 22 中引入
void rsAllocationVStoreX_char3(rs_allocation a, char3 val, uint32_t x, uint32_t y); 在 API 级别 22 中引入
void rsAllocationVStoreX_char3(rs_allocation a, char3 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
void rsAllocationVStoreX_char4(rs_allocation a, char4 val, uint32_t x); 在 API 级别 22 中引入
void rsAllocationVStoreX_char4(rs_allocation a, char4 val, uint32_t x, uint32_t y); 在 API 级别 22 中引入
void rsAllocationVStoreX_char4(rs_allocation a, char4 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
void rsAllocationVStoreX_double2(rs_allocation a, double2 val, uint32_t x); 在 API 级别 22 中引入
void rsAllocationVStoreX_double2(rs_allocation a, double2 val, uint32_t x, uint32_t y); 在 API 级别 22 中引入
void rsAllocationVStoreX_double2(rs_allocation a, double2 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
void rsAllocationVStoreX_double3(rs_allocation a, double3 val, uint32_t x); 在 API 级别 22 中引入
void rsAllocationVStoreX_double3(rs_allocation a, double3 val, uint32_t x, uint32_t y); 在 API 级别 22 中引入
void rsAllocationVStoreX_double3(rs_allocation a, double3 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
void rsAllocationVStoreX_double4(rs_allocation a, double4 val, uint32_t x); 在 API 级别 22 中引入
void rsAllocationVStoreX_double4(rs_allocation a, double4 val, uint32_t x, uint32_t y); 在 API 级别 22 中引入
void rsAllocationVStoreX_double4(rs_allocation a, double4 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
void rsAllocationVStoreX_float2(rs_allocation a, float2 val, uint32_t x); 在 API 级别 22 中引入
void rsAllocationVStoreX_float2(rs_allocation a, float2 val, uint32_t x, uint32_t y); 在 API 级别 22 中引入
void rsAllocationVStoreX_float2(rs_allocation a, float2 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
void rsAllocationVStoreX_float3(rs_allocation a, float3 val, uint32_t x); 在 API 级别 22 中引入
void rsAllocationVStoreX_float3(rs_allocation a, float3 val, uint32_t x, uint32_t y); 在 API 级别 22 中引入
void rsAllocationVStoreX_float3(rs_allocation a, float3 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
void rsAllocationVStoreX_float4(rs_allocation a, float4 val, uint32_t x); 在 API 级别 22 中引入
void rsAllocationVStoreX_float4(rs_allocation a, float4 val, uint32_t x, uint32_t y); 在 API 级别 22 中引入
void rsAllocationVStoreX_float4(rs_allocation a, float4 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
void rsAllocationVStoreX_int2(rs_allocation a, int2 val, uint32_t x); 在 API 级别 22 中引入
void rsAllocationVStoreX_int2(rs_allocation a, int2 val, uint32_t x, uint32_t y); 在 API 级别 22 中引入
void rsAllocationVStoreX_int2(rs_allocation a, int2 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
void rsAllocationVStoreX_int3(rs_allocation a, int3 val, uint32_t x); 在 API 级别 22 中引入
void rsAllocationVStoreX_int3(rs_allocation a, int3 val, uint32_t x, uint32_t y); 在 API 级别 22 中引入
void rsAllocationVStoreX_int3(rs_allocation a, int3 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
void rsAllocationVStoreX_int4(rs_allocation a, int4 val, uint32_t x); 在 API 级别 22 中引入
void rsAllocationVStoreX_int4(rs_allocation a, int4 val, uint32_t x, uint32_t y); 在 API 级别 22 中引入
void rsAllocationVStoreX_int4(rs_allocation a, int4 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
void rsAllocationVStoreX_long2(rs_allocation a, long2 val, uint32_t x); 在 API 级别 22 中引入
void rsAllocationVStoreX_long2(rs_allocation a, long2 val, uint32_t x, uint32_t y); 在 API 级别 22 中引入
void rsAllocationVStoreX_long2(rs_allocation a, long2 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
void rsAllocationVStoreX_long3(rs_allocation a, long3 val, uint32_t x); 在 API 级别 22 中引入
void rsAllocationVStoreX_long3(rs_allocation a, long3 val, uint32_t x, uint32_t y); 在 API 级别 22 中引入
void rsAllocationVStoreX_long3(rs_allocation a, long3 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
void rsAllocationVStoreX_long4(rs_allocation a, long4 val, uint32_t x); 在 API 级别 22 中引入
void rsAllocationVStoreX_long4(rs_allocation a, long4 val, uint32_t x, uint32_t y); 在 API 级别 22 中引入
void rsAllocationVStoreX_long4(rs_allocation a, long4 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
void rsAllocationVStoreX_short2(rs_allocation a, short2 val, uint32_t x); 在 API 级别 22 中引入
void rsAllocationVStoreX_short2(rs_allocation a, short2 val, uint32_t x, uint32_t y); 在 API 级别 22 中引入
void rsAllocationVStoreX_short2(rs_allocation a, short2 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
void rsAllocationVStoreX_short3(rs_allocation a, short3 val, uint32_t x); 在 API 级别 22 中引入
void rsAllocationVStoreX_short3(rs_allocation a, short3 val, uint32_t x, uint32_t y); 在 API 级别 22 中引入
void rsAllocationVStoreX_short3(rs_allocation a, short3 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
void rsAllocationVStoreX_short4(rs_allocation a, short4 val, uint32_t x); 在 API 级别 22 中引入
void rsAllocationVStoreX_short4(rs_allocation a, short4 val, uint32_t x, uint32_t y); 在 API 级别 22 中引入
void rsAllocationVStoreX_short4(rs_allocation a, short4 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
void rsAllocationVStoreX_uchar2(rs_allocation a, uchar2 val, uint32_t x); 在 API 级别 22 中引入
void rsAllocationVStoreX_uchar2(rs_allocation a, uchar2 val, uint32_t x, uint32_t y); 在 API 级别 22 中引入
void rsAllocationVStoreX_uchar2(rs_allocation a, uchar2 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
void rsAllocationVStoreX_uchar3(rs_allocation a, uchar3 val, uint32_t x); 在 API 级别 22 中引入
void rsAllocationVStoreX_uchar3(rs_allocation a, uchar3 val, uint32_t x, uint32_t y); 在 API 级别 22 中引入
void rsAllocationVStoreX_uchar3(rs_allocation a, uchar3 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
void rsAllocationVStoreX_uchar4(rs_allocation a, uchar4 val, uint32_t x); 在 API 级别 22 中引入
void rsAllocationVStoreX_uchar4(rs_allocation a, uchar4 val, uint32_t x, uint32_t y); 在 API 级别 22 中引入
void rsAllocationVStoreX_uchar4(rs_allocation a, uchar4 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
void rsAllocationVStoreX_uint2(rs_allocation a, uint2 val, uint32_t x); 在 API 级别 22 中引入
void rsAllocationVStoreX_uint2(rs_allocation a, uint2 val, uint32_t x, uint32_t y); 在 API 级别 22 中引入
void rsAllocationVStoreX_uint2(rs_allocation a, uint2 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
void rsAllocationVStoreX_uint3(rs_allocation a, uint3 val, uint32_t x); 在 API 级别 22 中引入
void rsAllocationVStoreX_uint3(rs_allocation a, uint3 val, uint32_t x, uint32_t y); 在 API 级别 22 中引入
void rsAllocationVStoreX_uint3(rs_allocation a, uint3 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
void rsAllocationVStoreX_uint4(rs_allocation a, uint4 val, uint32_t x); 在 API 级别 22 中引入
void rsAllocationVStoreX_uint4(rs_allocation a, uint4 val, uint32_t x, uint32_t y); 在 API 级别 22 中引入
void rsAllocationVStoreX_uint4(rs_allocation a, uint4 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
void rsAllocationVStoreX_ulong2(rs_allocation a, ulong2 val, uint32_t x); 在 API 级别 22 中引入
void rsAllocationVStoreX_ulong2(rs_allocation a, ulong2 val, uint32_t x, uint32_t y); 在 API 级别 22 中引入
void rsAllocationVStoreX_ulong2(rs_allocation a, ulong2 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
void rsAllocationVStoreX_ulong3(rs_allocation a, ulong3 val, uint32_t x); 在 API 级别 22 中引入
void rsAllocationVStoreX_ulong3(rs_allocation a, ulong3 val, uint32_t x, uint32_t y); 在 API 级别 22 中引入
void rsAllocationVStoreX_ulong3(rs_allocation a, ulong3 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
void rsAllocationVStoreX_ulong4(rs_allocation a, ulong4 val, uint32_t x); 在 API 级别 22 中引入
void rsAllocationVStoreX_ulong4(rs_allocation a, ulong4 val, uint32_t x, uint32_t y); 在 API 级别 22 中引入
void rsAllocationVStoreX_ulong4(rs_allocation a, ulong4 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
void rsAllocationVStoreX_ushort2(rs_allocation a, ushort2 val, uint32_t x); 在 API 级别 22 中引入
void rsAllocationVStoreX_ushort2(rs_allocation a, ushort2 val, uint32_t x, uint32_t y); 在 API 级别 22 中引入
void rsAllocationVStoreX_ushort2(rs_allocation a, ushort2 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
void rsAllocationVStoreX_ushort3(rs_allocation a, ushort3 val, uint32_t x); 在 API 级别 22 中引入
void rsAllocationVStoreX_ushort3(rs_allocation a, ushort3 val, uint32_t x, uint32_t y); 在 API 级别 22 中引入
void rsAllocationVStoreX_ushort3(rs_allocation a, ushort3 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入
void rsAllocationVStoreX_ushort4(rs_allocation a, ushort4 val, uint32_t x); 在 API 级别 22 中引入
void rsAllocationVStoreX_ushort4(rs_allocation a, ushort4 val, uint32_t x, uint32_t y); 在 API 级别 22 中引入
void rsAllocationVStoreX_ushort4(rs_allocation a, ushort4 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 22 中引入

参数
一个	用于存储数据的分配。
瓦尔	要存储的值。
x	要复制到的第一个单元格的分配中的 X 偏移量。
y	要复制到的第一个单元格的分配中的 Y 偏移量。
z	要复制到的第一个单元格的分配中的 Z 偏移量。

此函数将向量的条目存储到分配的连续单元中。它假定分配包含标量。

名称中的“X”表示通过增加 X 索引来存储连续值。目前没有函数可用于存储递增其他维度的连续值。请改用对 rsSetElementAt() 的多次调用。

例如,调用 rsAllocationVStoreX_int3(a, v, 20, 30) 时,v.x 的存储位置为 a[20, 30]、v.y 的 a[21, 30] 和 v.z 的 a[22, 30]。

存储到三维分配时,使用 x、y、z 变体。同样,对于二维分配,使用 x、y 变体;对于单维分配,请使用 x。

为了提高效率,此函数不验证输入。如果尝试封装 X 索引、超过分配大小,或者使用与分配维度不兼容的索引,则会产生未定义的结果。

另请参阅 rsAllocationVLoadX()。

rsGetElementAt :返回分配中的单元格
char rsGetElementAt_char(rs_allocation a, uint32_t x);
char rsGetElementAt_char(rs_allocation a, uint32_t x, uint32_t y);
char rsGetElementAt_char(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
char2 rsGetElementAt_char2(rs_allocation a, uint32_t x);
char2 rsGetElementAt_char2(rs_allocation a, uint32_t x, uint32_t y);
char2 rsGetElementAt_char2(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
char3 rsGetElementAt_char3(rs_allocation a, uint32_t x);
char3 rsGetElementAt_char3(rs_allocation a, uint32_t x, uint32_t y);
char3 rsGetElementAt_char3(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
char4 rsGetElementAt_char4(rs_allocation a, uint32_t x);
char4 rsGetElementAt_char4(rs_allocation a, uint32_t x, uint32_t y);
char4 rsGetElementAt_char4(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
const void* rsGetElementAt(rs_allocation a, uint32_t x);
const void* rsGetElementAt(rs_allocation a, uint32_t x, uint32_t y);
Cont void* rsGetElementAt(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
double rsGetElementAt_double(rs_allocation a, uint32_t x);
double rsGetElementAt_double(rs_allocation a, uint32_t x, uint32_t y);
double rsGetElementAt_double(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
double2 rsGetElementAt_double2(rs_allocation a, uint32_t x);
double2 rsGetElementAt_double2(rs_allocation a, uint32_t x, uint32_t y);
double2 rsGetElementAt_double2(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
double3 rsGetElementAt_double3(rs_allocation a, uint32_t x);
double3 rsGetElementAt_double3(rs_allocation a, uint32_t x, uint32_t y);
double3 rsGetElementAt_double3(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
double4 rsGetElementAt_double4(rs_allocation a, uint32_t x);
double4 rsGetElementAt_double4(rs_allocation a, uint32_t x, uint32_t y);
double4 rsGetElementAt_double4(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
float rsGetElementAt_float(rs_allocation a, uint32_t x);
float rsGetElementAt_float(rs_allocation a, uint32_t x, uint32_t y);
float rsGetElementAt_float(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
float2 rsGetElementAt_float2(rs_allocation a, uint32_t x);
float2 rsGetElementAt_float2(rs_allocation a, uint32_t x, uint32_t y);
float2 rsGetElementAt_float2(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
float3 rsGetElementAt_float3(rs_allocation a, uint32_t x);
float3 rsGetElementAt_float3(rs_allocation a, uint32_t x, uint32_t y);
float3 rsGetElementAt_float3(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
float4 rsGetElementAt_float4(rs_allocation a, uint32_t x);
float4 rsGetElementAt_float4(rs_allocation a, uint32_t x, uint32_t y);
float4 rsGetElementAt_float4(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
half rsGetElementAt_half(rs_allocation a, uint32_t x); 在 API 级别 23 中引入
half rsGetElementAt_half(rs_allocation a, uint32_t x, uint32_t y); 在 API 级别 23 中引入
half rsGetElementAt_half(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 23 中引入
half2 rsGetElementAt_half2(rs_allocation a, uint32_t x); 在 API 级别 23 中引入
half2 rsGetElementAt_half2(rs_allocation a, uint32_t x, uint32_t y); 在 API 级别 23 中引入
half2 rsGetElementAt_half2(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 23 中引入
half3 rsGetElementAt_half3(rs_allocation a, uint32_t x); 在 API 级别 23 中引入
half3 rsGetElementAt_half3(rs_allocation a, uint32_t x, uint32_t y); 在 API 级别 23 中引入
half3 rsGetElementAt_half3(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 23 中引入
half4 rsGetElementAt_half4(rs_allocation a, uint32_t x); 在 API 级别 23 中引入
half4 rsGetElementAt_half4(rs_allocation a, uint32_t x, uint32_t y); 在 API 级别 23 中引入
half4 rsGetElementAt_half4(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 23 中引入
int rsGetElementAt_int(rs_allocation a, uint32_t x);
int rsGetElementAt_int(rs_allocation a, uint32_t x, uint32_t y);
int rsGetElementAt_int(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
int2 rsGetElementAt_int2(rs_allocation a, uint32_t x);
int2 rsGetElementAt_int2(rs_allocation a, uint32_t x, uint32_t y);
int2 rsGetElementAt_int2(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
int3 rsGetElementAt_int3(rs_allocation a, uint32_t x);
int3 rsGetElementAt_int3(rs_allocation a, uint32_t x, uint32_t y);
int3 rsGetElementAt_int3(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
int4 rsGetElementAt_int4(rs_allocation a, uint32_t x);
int4 rsGetElementAt_int4(rs_allocation a, uint32_t x, uint32_t y);
int4 rsGetElementAt_int4(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
long rsGetElementAt_long(rs_allocation a, uint32_t x);
long rsGetElementAt_long(rs_allocation a, uint32_t x, uint32_t y);
long rsGetElementAt_long(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
long2 rsGetElementAt_long2(rs_allocation a, uint32_t x);
long2 rsGetElementAt_long2(rs_allocation a, uint32_t x, uint32_t y);
long2 rsGetElementAt_long2(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
long3 rsGetElementAt_long3(rs_allocation a, uint32_t x);
long3 rsGetElementAt_long3(rs_allocation a, uint32_t x, uint32_t y);
long3 rsGetElementAt_long3(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
long4 rsGetElementAt_long4(rs_allocation a, uint32_t x);
long4 rsGetElementAt_long4(rs_allocation a, uint32_t x, uint32_t y);
long4 rsGetElementAt_long4(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
Shorts rsGetElementAt_short(rs_allocation a, uint32_t x);
Shorts rsGetElementAt_short(rs_allocation a, uint32_t x, uint32_t y);
Shorts rsGetElementAt_short(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
short2 rsGetElementAt_short2(rs_allocation a, uint32_t x);
short2 rsGetElementAt_short2(rs_allocation a, uint32_t x, uint32_t y);
short2 rsGetElementAt_short2(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
short3 rsGetElementAt_short3(rs_allocation a, uint32_t x);
short3 rsGetElementAt_short3(rs_allocation a, uint32_t x, uint32_t y);
short3 rsGetElementAt_short3(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
short4 rsGetElementAt_short4(rs_allocation a, uint32_t x);
short4 rsGetElementAt_short4(rs_allocation a, uint32_t x, uint32_t y);
short4 rsGetElementAt_short4(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
uchar rsGetElementAt_uchar(rs_allocation a, uint32_t x);
uchar rsGetElementAt_uchar(rs_allocation a, uint32_t x, uint32_t y);
uchar rsGetElementAt_uchar(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
uchar2 rsGetElementAt_uchar2(rs_allocation a, uint32_t x);
uchar2 rsGetElementAt_uchar2(rs_allocation a, uint32_t x, uint32_t y);
uchar2 rsGetElementAt_uchar2(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
uchar3 rsGetElementAt_uchar3(rs_allocation a, uint32_t x);
uchar3 rsGetElementAt_uchar3(rs_allocation a, uint32_t x, uint32_t y);
uchar3 rsGetElementAt_uchar3(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
uchar4 rsGetElementAt_uchar4(rs_allocation a, uint32_t x);
uchar4 rsGetElementAt_uchar4(rs_allocation a, uint32_t x, uint32_t y);
uchar4 rsGetElementAt_uchar4(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
uint rsGetElementAt_uint(rs_allocation a, uint32_t x);
uint rsGetElementAt_uint(rs_allocation a, uint32_t x, uint32_t y);
uint rsGetElementAt_uint(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
uint2 rsGetElementAt_uint2(rs_allocation a, uint32_t x);
uint2 rsGetElementAt_uint2(rs_allocation a, uint32_t x, uint32_t y);
uint2 rsGetElementAt_uint2(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
uint3 rsGetElementAt_uint3(rs_allocation a, uint32_t x);
uint3 rsGetElementAt_uint3(rs_allocation a, uint32_t x, uint32_t y);
uint3 rsGetElementAt_uint3(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
uint4 rsGetElementAt_uint4(rs_allocation a, uint32_t x);
uint4 rsGetElementAt_uint4(rs_allocation a, uint32_t x, uint32_t y);
uint4 rsGetElementAt_uint4(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
ulong rsGetElementAt_ulong(rs_allocation a, uint32_t x);
ulong rsGetElementAt_ulong(rs_allocation a, uint32_t x, uint32_t y);
ulong rsGetElementAt_ulong(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
ulong2 rsGetElementAt_ulong2(rs_allocation a, uint32_t x);
ulong2 rsGetElementAt_ulong2(rs_allocation a, uint32_t x, uint32_t y);
ulong2 rsGetElementAt_ulong2(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
ulong3 rsGetElementAt_ulong3(rs_allocation a, uint32_t x);
ulong3 rsGetElementAt_ulong3(rs_allocation a, uint32_t x, uint32_t y);
ulong3 rsGetElementAt_ulong3(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
ulong4 rsGetElementAt_ulong4(rs_allocation a, uint32_t x);
ulong4 rsGetElementAt_ulong4(rs_allocation a, uint32_t x, uint32_t y);
ulong4 rsGetElementAt_ulong4(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
ushort rsGetElementAt_ushort(rs_allocation a, uint32_t x);
ushort rsGetElementAt_ushort(rs_allocation a, uint32_t x, uint32_t y);
ushort rsGetElementAt_ushort(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
ushort2 rsGetElementAt_ushort2(rs_allocation a, uint32_t x);
ushort2 rsGetElementAt_ushort2(rs_allocation a, uint32_t x, uint32_t y);
ushort2 rsGetElementAt_ushort2(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
ushort3 rsGetElementAt_ushort3(rs_allocation a, uint32_t x);
ushort3 rsGetElementAt_ushort3(rs_allocation a, uint32_t x, uint32_t y);
ushort3 rsGetElementAt_ushort3(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
ushort4 rsGetElementAt_ushort4(rs_allocation a, uint32_t x);
ushort4 rsGetElementAt_ushort4(rs_allocation a, uint32_t x, uint32_t y);
ushort4 rsGetElementAt_ushort4(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
此函数会从分配中提取单个单元格。

从三维分配中检索时,请使用 x、y、z 变体。同样,对于二维分配,使用 x、y 变体;对于单维分配,请使用 x。

此函数有两种样式。其中一个使用 void* 返回值的地址,另一个返回实际值,例如 rsGetElementAt() 和 rsGetElementAt_int4()。 对于基元类型,请始终使用后者,因为它效率更高。

rsGetElementAtYuv_uchar_U :获取 YUV 分配的 U 分量

uchar rsGetElementAtYuv_uchar_U(rs_allocation a, uint32_t x, uint32_t y);	在 API 级别 18 中引入

从 YUV 的二维分配中提取单个 YUV 值的 U 分量。

在分配内,如果平面不同且分辨率不同,则可以存储 Y、U 和 V 分量。此处提供的 x、y 坐标采用 Y 平面的尺寸。

请参阅 rsGetElementAtYuv_uchar_Y()。

rsGetElementAtYuv_uchar_V :获取 YUV 分配的 V 分量

uchar rsGetElementAtYuv_uchar_V(rs_allocation a, uint32_t x, uint32_t y);	在 API 级别 18 中引入

从 YUV 的二维分配中提取单个 YUV 值的 V 分量。

在分配内,如果平面不同且分辨率不同,则可以存储 Y、U 和 V 分量。此处提供的 x、y 坐标采用 Y 平面的尺寸。

请参阅 rsGetElementAtYuv_uchar_Y()。

rsGetElementAtYuv_uchar_Y :获取 YUV 分配的 Y 分量

uchar rsGetElementAtYuv_uchar_Y(rs_allocation a, uint32_t x, uint32_t y);	在 API 级别 18 中引入

从 YUV 的二维分配中提取单个 YUV 值的 Y 分量。

在分配内,如果平面不同且分辨率不同,则可以存储 Y、U 和 V 分量。此处提供的 x、y 坐标采用 Y 平面的尺寸。

请参阅 rsGetElementAtYuv_uchar_U() 和 rsGetElementAtYuv_uchar_V()。

rsSample :对纹理分配中的值进行采样
float4 rsSample(rs_allocation a, rs_sampler s, float location); 在 API 级别 16 中引入
float4 rsSample(rs_allocation a, rs_sampler s, float location, float lod); 在 API 级别 16 中引入
float4 rsSample(rs_allocation a, rs_sampler s, float2 location); 在 API 级别 16 中引入
float4 rsSample(rs_allocation a, rs_sampler s, float2 location, float lod); 在 API 级别 16 中引入

参数
一个	样本分配。
s	采样器状态。
地理位置	采样位置。
LOD	如果使用 RS_SAMPLER_LINEAR_MIP_LINEAR,则要采样的 mip 级别对于小数值,将插入 mip 级别。

以采样器所述的方式从纹理分配中提取值。

如果您的分配是 1D,请使用包含浮点数的变体作为位置。对于 2D 图形,请使用 float2 变体。

如需了解详情,请参阅 android.renderscript.Sampler。

rsSetElementAt :设置分配的单元格
void rsSetElementAt(rs_allocation a, void* ptr, uint32_t x); 在 API 级别 18 中引入
void rsSetElementAt(rs_allocation a, void* ptr, uint32_t x, uint32_t y); 在 API 级别 18 中引入
void rsSetElementAt_char(rs_allocation a, char val, uint32_t x); 在 API 级别 18 中引入
void rsSetElementAt_char(rs_allocation a, char val, uint32_t x, uint32_t y); 在 API 级别 18 中引入
void rsSetElementAt_char(rs_allocation a, char val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 18 中引入
void rsSetElementAt_char2(rs_allocation a, char2 val, uint32_t x); 在 API 级别 18 中引入
void rsSetElementAt_char2(rs_allocation a, char2 val, uint32_t x, uint32_t y); 在 API 级别 18 中引入
void rsSetElementAt_char2(rs_allocation a, char2 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 18 中引入
void rsSetElementAt_char3(rs_allocation a, char3 val, uint32_t x); 在 API 级别 18 中引入
void rsSetElementAt_char3(rs_allocation a, char3 val, uint32_t x, uint32_t y); 在 API 级别 18 中引入
void rsSetElementAt_char3(rs_allocation a, char3 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 18 中引入
void rsSetElementAt_char4(rs_allocation a, char4 val, uint32_t x); 在 API 级别 18 中引入
void rsSetElementAt_char4(rs_allocation a, char4 val, uint32_t x, uint32_t y); 在 API 级别 18 中引入
void rsSetElementAt_char4(rs_allocation a, char4 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 18 中引入
void rsSetElementAt_double(rs_allocation a, double val, uint32_t x); 在 API 级别 18 中引入
void rsSetElementAt_double(rs_allocation a, double val, uint32_t x, uint32_t y); 在 API 级别 18 中引入
void rsSetElementAt_double(rs_allocation a, double val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 18 中引入
void rsSetElementAt_double2(rs_allocation a, double2 val, uint32_t x); 在 API 级别 18 中引入
void rsSetElementAt_double2(rs_allocation a, double2 val, uint32_t x, uint32_t y); 在 API 级别 18 中引入
void rsSetElementAt_double2(rs_allocation a, double2 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 18 中引入
void rsSetElementAt_double3(rs_allocation a, double3 val, uint32_t x); 在 API 级别 18 中引入
void rsSetElementAt_double3(rs_allocation a, double3 val, uint32_t x, uint32_t y); 在 API 级别 18 中引入
void rsSetElementAt_double3(rs_allocation a, double3 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 18 中引入
void rsSetElementAt_double4(rs_allocation a, double4 val, uint32_t x); 在 API 级别 18 中引入
void rsSetElementAt_double4(rs_allocation a, double4 val, uint32_t x, uint32_t y); 在 API 级别 18 中引入
void rsSetElementAt_double4(rs_allocation a, double4 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 18 中引入
void rsSetElementAt_float(rs_allocation a, float val, uint32_t x); 在 API 级别 18 中引入
void rsSetElementAt_float(rs_allocation a, float val, uint32_t x, uint32_t y); 在 API 级别 18 中引入
void rsSetElementAt_float(rs_allocation a, float val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 18 中引入
void rsSetElementAt_float2(rs_allocation a, float2 val, uint32_t x); 在 API 级别 18 中引入
void rsSetElementAt_float2(rs_allocation a, float2 val, uint32_t x, uint32_t y); 在 API 级别 18 中引入
void rsSetElementAt_float2(rs_allocation a, float2 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 18 中引入
void rsSetElementAt_float3(rs_allocation a, float3 val, uint32_t x); 在 API 级别 18 中引入
void rsSetElementAt_float3(rs_allocation a, float3 val, uint32_t x, uint32_t y); 在 API 级别 18 中引入
void rsSetElementAt_float3(rs_allocation a, float3 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 18 中引入
void rsSetElementAt_float4(rs_allocation a, float4 val, uint32_t x); 在 API 级别 18 中引入
void rsSetElementAt_float4(rs_allocation a, float4 val, uint32_t x, uint32_t y); 在 API 级别 18 中引入
void rsSetElementAt_float4(rs_allocation a, float4 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 18 中引入
void rsSetElementAt_half(rs_allocation a, half val, uint32_t x); 在 API 级别 23 中引入
void rsSetElementAt_half(rs_allocation a, half val, uint32_t x, uint32_t y); 在 API 级别 23 中引入
void rsSetElementAt_half(rs_allocation a, half val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 23 中引入
void rsSetElementAt_half2(rs_allocation a, half2 val, uint32_t x); 在 API 级别 23 中引入
void rsSetElementAt_half2(rs_allocation a, half2 val, uint32_t x, uint32_t y); 在 API 级别 23 中引入
void rsSetElementAt_half2(rs_allocation a, half2 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 23 中引入
void rsSetElementAt_half3(rs_allocation a, half3 val, uint32_t x); 在 API 级别 23 中引入
void rsSetElementAt_half3(rs_allocation a, half3 val, uint32_t x, uint32_t y); 在 API 级别 23 中引入
void rsSetElementAt_half3(rs_allocation a, half3 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 23 中引入
void rsSetElementAt_half4(rs_allocation a, half4 val, uint32_t x); 在 API 级别 23 中引入
void rsSetElementAt_half4(rs_allocation a, half4 val, uint32_t x, uint32_t y); 在 API 级别 23 中引入
void rsSetElementAt_half4(rs_allocation a, half4 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 23 中引入
void rsSetElementAt_int(rs_allocation a, int val, uint32_t x); 在 API 级别 18 中引入
void rsSetElementAt_int(rs_allocation a, int val, uint32_t x, uint32_t y); 在 API 级别 18 中引入
void rsSetElementAt_int(rs_allocation a, int val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 18 中引入
void rsSetElementAt_int2(rs_allocation a, int2 val, uint32_t x); 在 API 级别 18 中引入
void rsSetElementAt_int2(rs_allocation a, int2 val, uint32_t x, uint32_t y); 在 API 级别 18 中引入
void rsSetElementAt_int2(rs_allocation a, int2 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 18 中引入
void rsSetElementAt_int3(rs_allocation a, int3 val, uint32_t x); 在 API 级别 18 中引入
void rsSetElementAt_int3(rs_allocation a, int3 val, uint32_t x, uint32_t y); 在 API 级别 18 中引入
void rsSetElementAt_int3(rs_allocation a, int3 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 18 中引入
void rsSetElementAt_int4(rs_allocation a, int4 val, uint32_t x); 在 API 级别 18 中引入
void rsSetElementAt_int4(rs_allocation a, int4 val, uint32_t x, uint32_t y); 在 API 级别 18 中引入
void rsSetElementAt_int4(rs_allocation a, int4 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 18 中引入
void rsSetElementAt_long(rs_allocation a, long val, uint32_t x); 在 API 级别 18 中引入
void rsSetElementAt_long(rs_allocation a, long val, uint32_t x, uint32_t y); 在 API 级别 18 中引入
void rsSetElementAt_long(rs_allocation a, long val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 18 中引入
void rsSetElementAt_long2(rs_allocation a, long2 val, uint32_t x); 在 API 级别 18 中引入
void rsSetElementAt_long2(rs_allocation a, long2 val, uint32_t x, uint32_t y); 在 API 级别 18 中引入
void rsSetElementAt_long2(rs_allocation a, long2 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 18 中引入
void rsSetElementAt_long3(rs_allocation a, long3 val, uint32_t x); 在 API 级别 18 中引入
void rsSetElementAt_long3(rs_allocation a, long3 val, uint32_t x, uint32_t y); 在 API 级别 18 中引入
void rsSetElementAt_long3(rs_allocation a, long3 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 18 中引入
void rsSetElementAt_long4(rs_allocation a, long4 val, uint32_t x); 在 API 级别 18 中引入
void rsSetElementAt_long4(rs_allocation a, long4 val, uint32_t x, uint32_t y); 在 API 级别 18 中引入
void rsSetElementAt_long4(rs_allocation a, long4 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 18 中引入
void rsSetElementAt_short(rs_allocation a, short val, uint32_t x); 在 API 级别 18 中引入
void rsSetElementAt_short(rs_allocation a, short val, uint32_t x, uint32_t y); 在 API 级别 18 中引入
void rsSetElementAt_short(rs_allocation a, short val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 18 中引入
void rsSetElementAt_short2(rs_allocation a, short2 val, uint32_t x); 在 API 级别 18 中引入
void rsSetElementAt_short2(rs_allocation a, short2 val, uint32_t x, uint32_t y); 在 API 级别 18 中引入
void rsSetElementAt_short2(rs_allocation a, short2 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 18 中引入
void rsSetElementAt_short3(rs_allocation a, short3 val, uint32_t x); 在 API 级别 18 中引入
void rsSetElementAt_short3(rs_allocation a, short3 val, uint32_t x, uint32_t y); 在 API 级别 18 中引入
void rsSetElementAt_short3(rs_allocation a, short3 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 18 中引入
void rsSetElementAt_short4(rs_allocation a, short4 val, uint32_t x); 在 API 级别 18 中引入
void rsSetElementAt_short4(rs_allocation a, short4 val, uint32_t x, uint32_t y); 在 API 级别 18 中引入
void rsSetElementAt_short4(rs_allocation a, short4 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 18 中引入
void rsSetElementAt_uchar(rs_allocation a, uchar val, uint32_t x); 在 API 级别 18 中引入
void rsSetElementAt_uchar(rs_allocation a, uchar val, uint32_t x, uint32_t y); 在 API 级别 18 中引入
void rsSetElementAt_uchar(rs_allocation a, uchar val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 18 中引入
void rsSetElementAt_uchar2(rs_allocation a, uchar2 val, uint32_t x); 在 API 级别 18 中引入
void rsSetElementAt_uchar2(rs_allocation a, uchar2 val, uint32_t x, uint32_t y); 在 API 级别 18 中引入
void rsSetElementAt_uchar2(rs_allocation a, uchar2 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 18 中引入
void rsSetElementAt_uchar3(rs_allocation a, uchar3 val, uint32_t x); 在 API 级别 18 中引入
void rsSetElementAt_uchar3(rs_allocation a, uchar3 val, uint32_t x, uint32_t y); 在 API 级别 18 中引入
void rsSetElementAt_uchar3(rs_allocation a, uchar3 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 18 中引入
void rsSetElementAt_uchar4(rs_allocation a, uchar4 val, uint32_t x); 在 API 级别 18 中引入
void rsSetElementAt_uchar4(rs_allocation a, uchar4 val, uint32_t x, uint32_t y); 在 API 级别 18 中引入
void rsSetElementAt_uchar4(rs_allocation a, uchar4 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 18 中引入
void rsSetElementAt_uint(rs_allocation a, uint val, uint32_t x); 在 API 级别 18 中引入
void rsSetElementAt_uint(rs_allocation a, uint val, uint32_t x, uint32_t y); 在 API 级别 18 中引入
void rsSetElementAt_uint(rs_allocation a, uint val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 18 中引入
void rsSetElementAt_uint2(rs_allocation a, uint2 val, uint32_t x); 在 API 级别 18 中引入
void rsSetElementAt_uint2(rs_allocation a, uint2 val, uint32_t x, uint32_t y); 在 API 级别 18 中引入
void rsSetElementAt_uint2(rs_allocation a, uint2 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 18 中引入
void rsSetElementAt_uint3(rs_allocation a, uint3 val, uint32_t x); 在 API 级别 18 中引入
void rsSetElementAt_uint3(rs_allocation a, uint3 val, uint32_t x, uint32_t y); 在 API 级别 18 中引入
void rsSetElementAt_uint3(rs_allocation a, uint3 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 18 中引入
void rsSetElementAt_uint4(rs_allocation a, uint4 val, uint32_t x); 在 API 级别 18 中引入
void rsSetElementAt_uint4(rs_allocation a, uint4 val, uint32_t x, uint32_t y); 在 API 级别 18 中引入
void rsSetElementAt_uint4(rs_allocation a, uint4 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 18 中引入
void rsSetElementAt_ulong(rs_allocation a, ulong val, uint32_t x); 在 API 级别 18 中引入
void rsSetElementAt_ulong(rs_allocation a, ulong val, uint32_t x, uint32_t y); 在 API 级别 18 中引入
void rsSetElementAt_ulong(rs_allocation a, ulong val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 18 中引入
void rsSetElementAt_ulong2(rs_allocation a, ulong2 val, uint32_t x); 在 API 级别 18 中引入
void rsSetElementAt_ulong2(rs_allocation a, ulong2 val, uint32_t x, uint32_t y); 在 API 级别 18 中引入
void rsSetElementAt_ulong2(rs_allocation a, ulong2 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 18 中引入
void rsSetElementAt_ulong3(rs_allocation a, ulong3 val, uint32_t x); 在 API 级别 18 中引入
void rsSetElementAt_ulong3(rs_allocation a, ulong3 val, uint32_t x, uint32_t y); 在 API 级别 18 中引入
void rsSetElementAt_ulong3(rs_allocation a, ulong3 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 18 中引入
void rsSetElementAt_ulong4(rs_allocation a, ulong4 val, uint32_t x); 在 API 级别 18 中引入
void rsSetElementAt_ulong4(rs_allocation a, ulong4 val, uint32_t x, uint32_t y); 在 API 级别 18 中引入
void rsSetElementAt_ulong4(rs_allocation a, ulong4 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 18 中引入
void rsSetElementAt_ushort(rs_allocation a, ushort val, uint32_t x); 在 API 级别 18 中引入
void rsSetElementAt_ushort(rs_allocation a, ushort val, uint32_t x, uint32_t y); 在 API 级别 18 中引入
void rsSetElementAt_ushort(rs_allocation a, ushort val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 18 中引入
void rsSetElementAt_ushort2(rs_allocation a, ushort2 val, uint32_t x); 在 API 级别 18 中引入
void rsSetElementAt_ushort2(rs_allocation a, ushort2 val, uint32_t x, uint32_t y); 在 API 级别 18 中引入
void rsSetElementAt_ushort2(rs_allocation a, ushort2 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 18 中引入
void rsSetElementAt_ushort3(rs_allocation a, ushort3 val, uint32_t x); 在 API 级别 18 中引入
void rsSetElementAt_ushort3(rs_allocation a, ushort3 val, uint32_t x, uint32_t y); 在 API 级别 18 中引入
void rsSetElementAt_ushort3(rs_allocation a, ushort3 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 18 中引入
void rsSetElementAt_ushort4(rs_allocation a, ushort4 val, uint32_t x); 在 API 级别 18 中引入
void rsSetElementAt_ushort4(rs_allocation a, ushort4 val, uint32_t x, uint32_t y); 在 API 级别 18 中引入
void rsSetElementAt_ushort4(rs_allocation a, ushort4 val, uint32_t x, uint32_t y, uint32_t z); 在 API 级别 18 中引入
此函数将值存储到分配的单个单元格中。

存储到三维分配时,使用 x、y、z 变体。同样,对于二维分配,使用 x、y 变体;对于单维分配,请使用 x。

此函数有两种样式。一个函数使用 void* 传递要存储的值,另一个将实际值作为参数,例如 rsSetElementAt() 和 rsSetElementAt_int4()。对于基元类型,请始终使用后者,因为它更高效。

另请参阅 rsGetElementAt()。

本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。

最后更新时间 (UTC):2023-10-18。

  • 22
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

五一编程

程序之路有我与你同行

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值