פונקציות גישה לנתוני הקצאה ב-RenderScript

סקירה כללית

אפשר להשתמש בפונקציות הבאות כדי לקבל ולהגדיר את התאים שמרכיבים את ההקצאה.

  • כדי לגשת לתאים ספציפיים, משתמשים בפונקציות rsGetElementAt* ‏ ו-rsSetElementAt.
  • אפשר להעתיק כמה תאים באמצעות הפונקציות rsAllocationCopy* ו-rsAllocationV*.
  • כדי לקבל ערכים באמצעות Sampler, משתמשים ב-rsSample.
השם של הפונקציות rsGetElementAt ו-rsSetElement* שגוי במקצת. הם לא מקבלים או מגדירים רכיבים, שדומים לסוגי נתונים, אלא מקבלים או מגדירים תאים. אפשר להתייחס אליהן כאל rsGetCellAt ו-rsSetCellAt.

סיכום

פונקציות
rsAllocationCopy1DRange העתקת תאים רצופים בין הקצאות
rsAllocationCopy2DRange העתקת אזור מלבני של תאים בין הקצאות
rsAllocationVLoadX אחזור וקטור מהקצאה של סקלרים
rsAllocationVStoreX אחסון וקטור בהקצאה של סקלר
rsGetElementAt החזרת תא מהקצאה
rsGetElementAtYuv_uchar_U אחזור של רכיב U בהקצאה של רכיבי YUV
rsGetElementAtYuv_uchar_V אחזור הרכיב V של הקצאה של רכיבי YUV
rsGetElementAtYuv_uchar_Y אחזור הרכיב Y של הקצאה של רכיבי YUV
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 srcMip); נוספה ב-רמת API 14
פרמטרים
dstAllocהקצאה להעתקת תאים.
dstOffהזזה ביעד של התא הראשון שאליו רוצים להעתיק.
dstMipרמת ה-Mip בהקצאת היעד. 0 אם לא נעשה שימוש במיפוי mip.
ספורמספר התאים שרוצים להעתיק.
srcAllocהקצאת מקור.
srcOffהזזה במקור של התא הראשון שיש להעתיק.
srcMipרמת ה-MIP בהקצאת המקור. 0 אם לא נעשה שימוש במיפוי mip.

מעתיק את מספר התאים שצוין מהקצאה אחת לאחרת.

שתי ההקצאות צריכות להיות שונות. שימוש בפונקציה הזו להעתקה בתוך אותה הקצאה יניב תוצאות לא מוגדרות.

הפונקציה לא מאמתת אם ההיסט ועוד המספר חורגים מהגודל של אף אחת מההקצאות. זהירות!

צריך לקרוא לפונקציה הזו רק בין הקצאות של מאפיין אחד. קריאה ל-allocate על הקצאות אחרות לא מוגדרת.

אסור להפעיל את הפונקציה הזו מתוך ליבה, או מכל פונקציה שעשויה להפעיל אותה ישירות או בעקיפין מליבה. הפעולה הזו תגרום לשגיאה בזמן הריצה.

rsAllocationCopy2DRange : העתקה של אזור מרובע של תאים בין הקצאות

void rsAllocationCopy2DRange(rs_allocation dstAlloc, uint32_t dstXoff, uint32_t dstYoff, uint32_t dstMip, rs_allocation_cubemap_face dstFace, uint32_t width, uint32_t height, rs_allocation srcAlloc, uint32_t srcXoff, uint32_t srcYoff, uint32_t srcMip, rs_allocation_cubemap_face srcFace); נוספה ב-רמת API 14
פרמטרים
dstAllocהקצאה להעתקת תאים.
dstXoffשינוי X ביעד של האזור שרוצים להגדיר.
dstYoffשינוי Y ביעד של האזור שרוצים להגדיר.
dstMipרמת ה-Mip בהקצאת היעד. 0 אם לא נעשה שימוש במיפוי mip.
dstFaceפני ה-Cubemap של הקצאת היעד. המערכת מתעלמת מהאפשרות הזו להקצאות שאינן מפות קוביות.
רוחברוחב האזור הנכנס שרוצים לעדכן.
גובההגובה של האזור הנכנס שרוצים לעדכן.
srcAllocהקצאת מקור.
srcXoffהיסט X במקור.
srcYoffהיסט Y במקור.
srcMipרמת ה-MIP בהקצאת המקור. 0 אם לא נעשה שימוש במיפוי mip.
srcFaceפני ה-Cubemap של הקצאת המקור. המערכת מתעלמת מהאפשרות הזו להקצאות שאינן מפות קוביות.

העתקה של אזור מלבני של תאים מקצאה אחת לאחרת. מתבצעת העתקה של (רוחב * גובה) תאים.

שתי ההקצאות צריכות להיות שונות. שימוש בפונקציה הזו להעתקה בתוך אותה הקצאה יניב תוצאות לא מוגדרות.

הפונקציה לא מאמתת אם אזור המקור או היעד חורג מהקצאה המתאימה שלו. זהירות!

צריך לקרוא לפונקציה הזו רק בין הקצאות דו-מימדיות. קריאה ל-allocate על הקצאות אחרות לא מוגדרת.

אסור להפעיל את הפונקציה הזו מתוך ליבה, או מכל פונקציה שעשויה להפעיל אותה ישירות או בעקיפין מליבה. הפעולה הזו תגרום לשגיאה בזמן הריצה.

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
פרמטרים
aההקצאה שממנה מקבלים את הנתונים.
xההיסט ב-X במיקום של התא הראשון שממנו מתבצע ההעתקה.
yשינוי Y במיקום של התא הראשון שיש להעתיק ממנו.
zהזזה בכיוון Z במיקום של התא הראשון שממנו מתבצע ההעתקה.

הפונקציה הזו מחזירה וקטור שמורכב מתאים עוקבים של ההקצאה. ההנחה היא שההקצאה מכילה ערכים סקלריים.

האות X בשם מציינת שהערכים הבאים מופקים על ידי הגדלת אינדקס X. בשלב זה אין פונקציות לקבלת ערכים עוקבים שמגדילים מאפיינים אחרים. במקום זאת, צריך להשתמש בכמה קריאות ל-rsGetElementAt()‎.

לדוגמה, כשקוראים ל-rsAllocationVLoadX_int4(a, 20, 30), מוחזר ערך int4 שמורכב מ-a[20, 30],‏ a[21, 30],‏ a[22, 30] ו-a[23, 30].

כשמאחזרים מתוך הקצאות תלת-ממדיות, צריך להשתמש באפשרות 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
פרמטרים
aהקצאה לאחסון הנתונים.
valהערך שרוצים לשמור.
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);
const 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);
short rsGetElementAt_short(rs_allocation a, uint32_t x);
short rsGetElementAt_short(rs_allocation a, uint32_t x, uint32_t y);
short 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 : אחזור הרכיב U של הקצאה של YUV

uchar rsGetElementAtYuv_uchar_U(rs_allocation a, uint32_t x, uint32_t y); נוספה ב-רמת API 18

הפונקציה מחלצת את רכיב ה-U של ערך YUV יחיד מקצאת 2D של ערכים של YUV.

בתוך הקצאה, רכיבי Y,‏ U ו-V עשויים להיות מאוחסנים בפלחים שונים וברזולוציות שונות. הקואורדינטות x ו-y שצוינו כאן הן בממדים של מישור ה-Y.

ראו rsGetElementAtYuv_uchar_Y().

rsGetElementAtYuv_uchar_V : אחזור הרכיב V של הקצאה של YUV

uchar rsGetElementAtYuv_uchar_V(rs_allocation a, uint32_t x, uint32_t y); נוספה ב-רמת API 18

הפונקציה מחלצת את רכיב ה-V של ערך YUV יחיד מקצאת 2D של ערכים של YUV.

בתוך הקצאה, רכיבי Y,‏ U ו-V עשויים להיות מאוחסנים בפלחים שונים וברזולוציות שונות. הקואורדינטות x ו-y שצוינו כאן הן בממדים של מישור ה-Y.

ראו rsGetElementAtYuv_uchar_Y().

rsGetElementAtYuv_uchar_Y : אחזור הרכיב Y של הקצאה של YUVs

uchar rsGetElementAtYuv_uchar_Y(rs_allocation a, uint32_t x, uint32_t y); נוספה ב-רמת API 18

חילוץ הרכיב Y של ערך YUV יחיד מהקצאה דו-מימדית של ערכים של YUV.

בתוך הקצאה, רכיבי 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
פרמטרים
aהקצאה לדגימה.
sמצב הסמפלר.
מיקום המכשירהמיקום שממנו רוצים לדגום.
lodרמת ה-mip שממנה מתבצעת הדגימה. לערכים עשרוניים, רמות ה-mip ישוחזרו אם נעשה שימוש ב-RS_SAMPLER_LINEAR_MIP_LINEAR.

אחזור ערך מהקצאת טקסטורה באופן שמתואר על ידי ה-sampler.

אם ההקצאה היא 1D, צריך להשתמש בווריאנט עם float למיקום. למרחב דו-מימדי, משתמשים באפשרות 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().