summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Luc Brouillet <jeanluc@google.com>2015-08-07 16:58:38 -0700
committerJean-Luc Brouillet <jeanluc@google.com>2015-08-10 15:05:04 -0700
commit0f58590ec91ac945548d589f2fafa05ba789dd71 (patch)
tree45d1c1ecf23c08ce84f8b99544ecdea623f16901
parent0c905c882fb351eb754a630d18339c14392fdbcb (diff)
downloadrs-0f58590ec91ac945548d589f2fafa05ba789dd71.tar.gz
Rename ctxt to context.
Rename ctxt to context to be consistent with documentation and our coding standards that asks us to eschew abbreviations. b/21647353 Change-Id: Ic8c1c2720276aae60c5d2e3782f4336488ecb61e
-rw-r--r--api/GenerateStubsWhiteList.cpp4
-rw-r--r--api/rs_for_each.spec42
-rw-r--r--scriptc/rs_for_each.rsh42
3 files changed, 44 insertions, 44 deletions
diff --git a/api/GenerateStubsWhiteList.cpp b/api/GenerateStubsWhiteList.cpp
index 428dd710..ea18eedb 100644
--- a/api/GenerateStubsWhiteList.cpp
+++ b/api/GenerateStubsWhiteList.cpp
@@ -430,7 +430,7 @@ static void generateTestCall(GeneratedFile* file, ostringstream* calls,
*calls << separator;
// Special case for the kernel context, as it has a special existence.
if (p->rsType == "rs_kernel_context") {
- *calls << "ctxt";
+ *calls << "context";
} else if (p->isOutParameter) {
*calls << "(" << p->rsType << "*) " << addVariable(file, variableNumber);
} else {
@@ -498,7 +498,7 @@ static bool generateApiTesterFile(const string& slangTestDirectory, int apiLevel
// Modify the style of kernel as required by the API level.
if (apiLevel >= 23) {
- file << "void RS_KERNEL test(int in, rs_kernel_context ctxt) {\n";
+ file << "void RS_KERNEL test(int in, rs_kernel_context context) {\n";
} else if (apiLevel >= 17) {
file << "void RS_KERNEL test(int in) {\n";
} else {
diff --git a/api/rs_for_each.spec b/api/rs_for_each.spec
index 9206d021..bf5ede27 100644
--- a/api/rs_for_each.spec
+++ b/api/rs_for_each.spec
@@ -54,8 +54,8 @@ description:
A kernel may be executed in parallel over multiple threads. Each thread will have its
own context.
- You can access the context by adding a rs_kernel_context argument to your kernel
- function. See @rsGetDimX() and @rsGetArray0() for examples.
+ You can access the context by adding a special parameter named "context" and of type
+ rs_kernel_context to your kernel function. See @rsGetDimX() and @rsGetArray0() for examples.
end:
type: rs_script_call_t
@@ -162,7 +162,7 @@ end:
function: rsGetArray0
version: 23
ret: uint32_t
-arg: rs_kernel_context ctxt
+arg: rs_kernel_context context
summary: Index in the Array0 dimension for the specified context
description:
Returns the index in the Array0 dimension of the cell being processed, as specified
@@ -172,8 +172,8 @@ description:
It contains common characteristics of the allocations being iterated over and rarely
used indexes, like the Array0 index.
- You can access the context by adding a rs_kernel_context argument to your kernel
- function. E.g.<br/>
+ You can access the context by adding a special parameter named "context" and of
+ type rs_kernel_context to your kernel function. E.g.<br/>
<code>short RS_KERNEL myKernel(short value, uint32_t x, rs_kernel_context context) {<br/>
&nbsp;&nbsp;// The current index in the common x, y, z, w dimensions are accessed by<br/>
&nbsp;&nbsp;// adding these variables as arguments. For the more rarely used indexes<br/>
@@ -189,7 +189,7 @@ end:
function: rsGetArray1
version: 23
ret: uint32_t
-arg: rs_kernel_context ctxt
+arg: rs_kernel_context context
summary: Index in the Array1 dimension for the specified context
description:
Returns the index in the Array1 dimension of the cell being processed, as specified
@@ -202,7 +202,7 @@ end:
function: rsGetArray2
version: 23
ret: uint32_t
-arg: rs_kernel_context ctxt
+arg: rs_kernel_context context
summary: Index in the Array2 dimension for the specified context
description:
Returns the index in the Array2 dimension of the cell being processed,
@@ -216,7 +216,7 @@ end:
function: rsGetArray3
version: 23
ret: uint32_t
-arg: rs_kernel_context ctxt
+arg: rs_kernel_context context
summary: Index in the Array3 dimension for the specified context
description:
Returns the index in the Array3 dimension of the cell being processed, as specified
@@ -229,7 +229,7 @@ end:
function: rsGetDimArray0
version: 23
ret: uint32_t
-arg: rs_kernel_context ctxt
+arg: rs_kernel_context context
summary: Size of the Array0 dimension for the specified context
description:
Returns the size of the Array0 dimension for the specified context.
@@ -244,7 +244,7 @@ end:
function: rsGetDimArray1
version: 23
ret: uint32_t
-arg: rs_kernel_context ctxt
+arg: rs_kernel_context context
summary: Size of the Array1 dimension for the specified context
description:
Returns the size of the Array1 dimension for the specified context.
@@ -257,7 +257,7 @@ end:
function: rsGetDimArray2
version: 23
ret: uint32_t
-arg: rs_kernel_context ctxt
+arg: rs_kernel_context context
summary: Size of the Array2 dimension for the specified context
description:
Returns the size of the Array2 dimension for the specified context.
@@ -270,7 +270,7 @@ end:
function: rsGetDimArray3
version: 23
ret: uint32_t
-arg: rs_kernel_context ctxt
+arg: rs_kernel_context context
summary: Size of the Array3 dimension for the specified context
description:
Returns the size of the Array3 dimension for the specified context.
@@ -283,7 +283,7 @@ end:
function: rsGetDimHasFaces
version: 23
ret: bool, "Returns true if more than one face is present, false otherwise."
-arg: rs_kernel_context ctxt
+arg: rs_kernel_context context
summary: Presence of more than one face for the specified context
description:
If the context refers to a cubemap, this function returns true if there's more than
@@ -297,7 +297,7 @@ end:
function: rsGetDimLod
version: 23
ret: uint32_t
-arg: rs_kernel_context ctxt
+arg: rs_kernel_context context
summary: Number of levels of detail for the specified context
description:
Returns the number of levels of detail for the specified context. This is useful
@@ -313,7 +313,7 @@ end:
function: rsGetDimX
version: 23
ret: uint32_t
-arg: rs_kernel_context ctxt
+arg: rs_kernel_context context
summary: Size of the X dimension for the specified context
description:
Returns the size of the X dimension for the specified context.
@@ -322,8 +322,8 @@ description:
characteristics of the allocations being iterated over by the kernel in
a very efficient structure. It also contains rarely used indexes.
- You can access it by adding a rs_kernel_context argument to your kernel
- function. E.g.<br/>
+ You can access it by adding a special parameter named "context" and of
+ type rs_kernel_context to your kernel function. E.g.<br/>
<code>int4 RS_KERNEL myKernel(int4 value, rs_kernel_context context) {<br/>
&nbsp;&nbsp;uint32_t size = rsGetDimX(context); //...<br/></code>
@@ -334,7 +334,7 @@ end:
function: rsGetDimY
version: 23
ret: uint32_t
-arg: rs_kernel_context ctxt
+arg: rs_kernel_context context
summary: Size of the Y dimension for the specified context
description:
Returns the size of the X dimension for the specified context.
@@ -349,7 +349,7 @@ end:
function: rsGetDimZ
version: 23
ret: uint32_t
-arg: rs_kernel_context ctxt
+arg: rs_kernel_context context
summary: Size of the Z dimension for the specified context
description:
Returns the size of the Z dimension for the specified context.
@@ -364,7 +364,7 @@ end:
function: rsGetFace
version: 23
ret: rs_allocation_cubemap_face
-arg: rs_kernel_context ctxt
+arg: rs_kernel_context context
summary: Coordinate of the Face for the specified context
description:
Returns the face on which the cell being processed is found, as specified by the
@@ -378,7 +378,7 @@ end:
function: rsGetLod
version: 23
ret: uint32_t
-arg: rs_kernel_context ctxt
+arg: rs_kernel_context context
summary: Index in the Levels of Detail dimension for the specified context
description:
Returns the index in the Levels of Detail dimension of the cell being processed,
diff --git a/scriptc/rs_for_each.rsh b/scriptc/rs_for_each.rsh
index 1bbcf9f5..9507c0c0 100644
--- a/scriptc/rs_for_each.rsh
+++ b/scriptc/rs_for_each.rsh
@@ -57,8 +57,8 @@ typedef enum rs_for_each_strategy {
* A kernel may be executed in parallel over multiple threads. Each thread will have its
* own context.
*
- * You can access the context by adding a rs_kernel_context argument to your kernel
- * function. See rsGetDimX() and rsGetArray0() for examples.
+ * You can access the context by adding a special parameter named "context" and of type
+ * rs_kernel_context to your kernel function. See rsGetDimX() and rsGetArray0() for examples.
*/
#if (defined(RS_VERSION) && (RS_VERSION >= 23))
typedef const struct rs_kernel_context_t * rs_kernel_context;
@@ -161,8 +161,8 @@ extern void __attribute__((overloadable))
* It contains common characteristics of the allocations being iterated over and rarely
* used indexes, like the Array0 index.
*
- * You can access the context by adding a rs_kernel_context argument to your kernel
- * function. E.g.
+ * You can access the context by adding a special parameter named "context" and of
+ * type rs_kernel_context to your kernel function. E.g.
* short RS_KERNEL myKernel(short value, uint32_t x, rs_kernel_context context) {
* // The current index in the common x, y, z, w dimensions are accessed by
* // adding these variables as arguments. For the more rarely used indexes
@@ -175,7 +175,7 @@ extern void __attribute__((overloadable))
*/
#if (defined(RS_VERSION) && (RS_VERSION >= 23))
extern uint32_t __attribute__((overloadable))
- rsGetArray0(rs_kernel_context ctxt);
+ rsGetArray0(rs_kernel_context context);
#endif
/*
@@ -188,7 +188,7 @@ extern uint32_t __attribute__((overloadable))
*/
#if (defined(RS_VERSION) && (RS_VERSION >= 23))
extern uint32_t __attribute__((overloadable))
- rsGetArray1(rs_kernel_context ctxt);
+ rsGetArray1(rs_kernel_context context);
#endif
/*
@@ -202,7 +202,7 @@ extern uint32_t __attribute__((overloadable))
*/
#if (defined(RS_VERSION) && (RS_VERSION >= 23))
extern uint32_t __attribute__((overloadable))
- rsGetArray2(rs_kernel_context ctxt);
+ rsGetArray2(rs_kernel_context context);
#endif
/*
@@ -215,7 +215,7 @@ extern uint32_t __attribute__((overloadable))
*/
#if (defined(RS_VERSION) && (RS_VERSION >= 23))
extern uint32_t __attribute__((overloadable))
- rsGetArray3(rs_kernel_context ctxt);
+ rsGetArray3(rs_kernel_context context);
#endif
/*
@@ -228,7 +228,7 @@ extern uint32_t __attribute__((overloadable))
*/
#if (defined(RS_VERSION) && (RS_VERSION >= 23))
extern uint32_t __attribute__((overloadable))
- rsGetDimArray0(rs_kernel_context ctxt);
+ rsGetDimArray0(rs_kernel_context context);
#endif
/*
@@ -241,7 +241,7 @@ extern uint32_t __attribute__((overloadable))
*/
#if (defined(RS_VERSION) && (RS_VERSION >= 23))
extern uint32_t __attribute__((overloadable))
- rsGetDimArray1(rs_kernel_context ctxt);
+ rsGetDimArray1(rs_kernel_context context);
#endif
/*
@@ -254,7 +254,7 @@ extern uint32_t __attribute__((overloadable))
*/
#if (defined(RS_VERSION) && (RS_VERSION >= 23))
extern uint32_t __attribute__((overloadable))
- rsGetDimArray2(rs_kernel_context ctxt);
+ rsGetDimArray2(rs_kernel_context context);
#endif
/*
@@ -267,7 +267,7 @@ extern uint32_t __attribute__((overloadable))
*/
#if (defined(RS_VERSION) && (RS_VERSION >= 23))
extern uint32_t __attribute__((overloadable))
- rsGetDimArray3(rs_kernel_context ctxt);
+ rsGetDimArray3(rs_kernel_context context);
#endif
/*
@@ -283,7 +283,7 @@ extern uint32_t __attribute__((overloadable))
*/
#if (defined(RS_VERSION) && (RS_VERSION >= 23))
extern bool __attribute__((overloadable))
- rsGetDimHasFaces(rs_kernel_context ctxt);
+ rsGetDimHasFaces(rs_kernel_context context);
#endif
/*
@@ -299,7 +299,7 @@ extern bool __attribute__((overloadable))
*/
#if (defined(RS_VERSION) && (RS_VERSION >= 23))
extern uint32_t __attribute__((overloadable))
- rsGetDimLod(rs_kernel_context ctxt);
+ rsGetDimLod(rs_kernel_context context);
#endif
/*
@@ -311,8 +311,8 @@ extern uint32_t __attribute__((overloadable))
* characteristics of the allocations being iterated over by the kernel in
* a very efficient structure. It also contains rarely used indexes.
*
- * You can access it by adding a rs_kernel_context argument to your kernel
- * function. E.g.
+ * You can access it by adding a special parameter named "context" and of
+ * type rs_kernel_context to your kernel function. E.g.
* int4 RS_KERNEL myKernel(int4 value, rs_kernel_context context) {
* uint32_t size = rsGetDimX(context); //...
*
@@ -320,7 +320,7 @@ extern uint32_t __attribute__((overloadable))
*/
#if (defined(RS_VERSION) && (RS_VERSION >= 23))
extern uint32_t __attribute__((overloadable))
- rsGetDimX(rs_kernel_context ctxt);
+ rsGetDimX(rs_kernel_context context);
#endif
/*
@@ -335,7 +335,7 @@ extern uint32_t __attribute__((overloadable))
*/
#if (defined(RS_VERSION) && (RS_VERSION >= 23))
extern uint32_t __attribute__((overloadable))
- rsGetDimY(rs_kernel_context ctxt);
+ rsGetDimY(rs_kernel_context context);
#endif
/*
@@ -350,7 +350,7 @@ extern uint32_t __attribute__((overloadable))
*/
#if (defined(RS_VERSION) && (RS_VERSION >= 23))
extern uint32_t __attribute__((overloadable))
- rsGetDimZ(rs_kernel_context ctxt);
+ rsGetDimZ(rs_kernel_context context);
#endif
/*
@@ -364,7 +364,7 @@ extern uint32_t __attribute__((overloadable))
*/
#if (defined(RS_VERSION) && (RS_VERSION >= 23))
extern rs_allocation_cubemap_face __attribute__((overloadable))
- rsGetFace(rs_kernel_context ctxt);
+ rsGetFace(rs_kernel_context context);
#endif
/*
@@ -378,7 +378,7 @@ extern rs_allocation_cubemap_face __attribute__((overloadable))
*/
#if (defined(RS_VERSION) && (RS_VERSION >= 23))
extern uint32_t __attribute__((overloadable))
- rsGetLod(rs_kernel_context ctxt);
+ rsGetLod(rs_kernel_context context);
#endif
#endif // RENDERSCRIPT_RS_FOR_EACH_RSH