Lines Matching refs:context

27     Element element = context->elementCreate(DataType::UNSIGNED_8, DataKind::USER, false, 1);  in TEST_P()
30 Script script = context->scriptIntrinsicCreate(ScriptIntrinsicID::ID_BLUR, element); in TEST_P()
33 context->scriptSetTimeZone(script, "UTF-8"); in TEST_P()
47 Script script = context->scriptCCreate("struct_test", "/data/local/tmp/", bitcode); in TEST_P()
51 context->scriptSetVarI(script, mExportVarIdx_var_int, 100); in TEST_P()
53 context->scriptGetVarV(script, mExportVarIdx_var_int, sizeof(int), in TEST_P()
57 context->scriptSetVarJ(script, mExportVarIdx_var_long, 101L); in TEST_P()
59 context->scriptGetVarV(script, mExportVarIdx_var_long, sizeof(long), in TEST_P()
64 context->scriptSetVarF(script, mExportVarIdx_var_float, 102.0f); in TEST_P()
66 context->scriptGetVarV(script, mExportVarIdx_var_float, sizeof(float), in TEST_P()
71 context->scriptSetVarD(script, mExportVarIdx_var_double, 103.0); in TEST_P()
73 context->scriptGetVarV(script, mExportVarIdx_var_double, sizeof(double), in TEST_P()
79 Element element = context->elementCreate(DataType::FLOAT_32, DataKind::USER, false, 1); in TEST_P()
83 Type type = context->typeCreate(element, 128, 0, 0, false, false, YuvFormat::YUV_NONE); in TEST_P()
87 Allocation allocationIn = context->allocationCreateTyped(type, AllocationMipmapControl::NONE, in TEST_P()
93 context->scriptSetVarObj(script, mExportVarIdx_var_allocation, (ObjectBase)allocationIn); in TEST_P()
94 context->scriptGetVarV(script, mExportVarIdx_var_allocation, sizeof(ObjectBase), in TEST_P()
102 context->scriptSetVarV(script, mExportVarIdx_var_uint32_t, _dataV); in TEST_P()
104 context->scriptGetVarV(script, mExportVarIdx_var_uint32_t, sizeof(uint32_t), in TEST_P()
117 Element elementVE = context->elementCreate(DataType::SIGNED_32, DataKind::USER, false, 2); in TEST_P()
120 context->scriptSetVarVE(script, mExportVarIdx_var_point2, _dataVE, elementVE, _dimsVE); in TEST_P()
121 context->scriptGetVarV(script, mExportVarIdx_var_point2, 2*sizeof(int), in TEST_P()
138 Script script = context->scriptCCreate("struct_test", "/data/local/tmp/", bitcode); in TEST_P()
148 context->scriptInvoke(script, mExportFuncIdx_function); in TEST_P()
149 context->scriptGetVarV(script, mExportVarIdx_var_int, sizeof(int), in TEST_P()
151 context->scriptGetVarV(script, mExportVarIdx_var_long, sizeof(long), in TEST_P()
154 context->scriptGetVarV(script, mExportVarIdx_var_float, sizeof(float), in TEST_P()
157 context->scriptGetVarV(script, mExportVarIdx_var_double, sizeof(double), in TEST_P()
160 context->scriptGetVarV(script, mExportVarIdx_var_uint32_t, sizeof(uint32_t), in TEST_P()
163 context->scriptGetVarV(script, mExportVarIdx_var_point2, 2*sizeof(int), in TEST_P()
180 context->scriptInvokeV(script, mExportFuncIdx_functionV, functionV_data); in TEST_P()
181 context->scriptGetVarV(script, mExportVarIdx_var_int, sizeof(int), in TEST_P()
197 Script script = context->scriptCCreate("struct_test", "/data/local/tmp/", bitcode); in TEST_P()
201 Element element = context->elementCreate(DataType::UNSIGNED_8, DataKind::USER, false, 1); in TEST_P()
205 Type type = context->typeCreate(element, 64, 0, 0, false, false, YuvFormat::YUV_NONE); in TEST_P()
214 Allocation allocation = context->allocationCreateTyped(type, AllocationMipmapControl::NONE, in TEST_P()
219 Allocation vout = context->allocationCreateTyped(type, AllocationMipmapControl::NONE, in TEST_P()
224 context->allocation1DWrite(allocation, 0, 0, (Size)dataIn.size(), _data); in TEST_P()
228 context->scriptForEach(script, mExportForEachIdx_increment, vains, vout, params, nullptr); in TEST_P()
229 context->allocationRead(vout, (Ptr)dataOut.data(), (Size)dataOut.size()*sizeof(uint8_t)); in TEST_P()
243 Script script = context->scriptCCreate("struct_test", "/data/local/tmp/", bitcode); in TEST_P()
247 Element element = context->elementCreate(DataType::SIGNED_32, DataKind::USER, false, 1); in TEST_P()
251 Type type = context->typeCreate(element, 64, 0, 0, false, false, YuvFormat::YUV_NONE); in TEST_P()
254 Type type2 = context->typeCreate(element, 1, 0, 0, false, false, YuvFormat::YUV_NONE); in TEST_P()
262 Allocation allocation = context->allocationCreateTyped(type, AllocationMipmapControl::NONE, in TEST_P()
267 Allocation vaout = context->allocationCreateTyped(type2, AllocationMipmapControl::NONE, in TEST_P()
272 context->allocation1DWrite(allocation, 0, 0, (Size)dataIn.size(), _data); in TEST_P()
275 context->scriptReduce(script, mExportReduceIdx_summation, vains, vaout, nullptr); in TEST_P()
276 context->contextFinish(); in TEST_P()
277 context->allocationRead(vaout, (Ptr)dataOut.data(), (Size)dataOut.size()*sizeof(int)); in TEST_P()
294 Script script = context->scriptCCreate("struct_test", "/data/local/tmp/", bitcode); in TEST_P()
298 Element element = context->elementCreate(DataType::SIGNED_32, DataKind::USER, false, 1); in TEST_P()
302 Type type = context->typeCreate(element, 64, 0, 0, false, false, YuvFormat::YUV_NONE); in TEST_P()
306 Allocation allocation = context->allocationCreateTyped(type, AllocationMipmapControl::NONE, in TEST_P()
314 context->allocation1DWrite(allocation, 0, 0, (Size)dataIn.size(), _data); in TEST_P()
315 context->scriptBindAllocation(script, allocation, mExportVarIdx_var_int_ptr); in TEST_P()
319 context->scriptInvokeV(script, mExportFuncIdx_setBuffer, _dim); in TEST_P()
320 context->allocationRead(allocation, (Ptr)dataOut.data(), (Size)dataOut.size()*sizeof(int)); in TEST_P()
344 Element element1 = context->elementCreate(DataType::UNSIGNED_8, in TEST_P()
348 Type type1 = context->typeCreate(element1, 256, 256, 0, false, false, in TEST_P()
352 Allocation allocation1 = context->allocationCreateTyped(type1, AllocationMipmapControl::NONE, in TEST_P()
357 context->allocation2DWrite(allocation1, 0, 0, 0, AllocationCubemapFace::POSITIVE_X, 256, 256, in TEST_P()
361 Element element2 = context->elementCreate(DataType::UNSIGNED_8, DataKind::PIXEL_RGBA, true, 4); in TEST_P()
364 Type type2 = context->typeCreate(element2, 256, 256, 0, false, false, YuvFormat::YUV_NONE); in TEST_P()
367 Allocation allocation2 = context->allocationCreateTyped(type2, AllocationMipmapControl::NONE, in TEST_P()
372 context->allocation2DWrite(allocation2, 0, 0, 0, AllocationCubemapFace::POSITIVE_X, 256, 256, in TEST_P()
377 context->scriptIntrinsicCreate(ScriptIntrinsicID::ID_BLEND, element1); in TEST_P()
380 ScriptKernelID blendKID = context->scriptKernelIDCreate(blend, 1, 3); in TEST_P()
383 Script blur = context->scriptIntrinsicCreate(ScriptIntrinsicID::ID_BLUR, element2); in TEST_P()
386 ScriptKernelID blurKID = context->scriptKernelIDCreate(blur, 0, 2); in TEST_P()
389 ScriptFieldID blurFID = context->scriptFieldIDCreate(blur, 1); in TEST_P()
398 ScriptGroup scriptGroup = context->scriptGroupCreate(kernels, srcK, dstK, dstF, types); in TEST_P()
401 context->scriptGroupSetInput(scriptGroup, blendKID, allocation1); in TEST_P()
402 context->scriptGroupSetOutput(scriptGroup, blurKID, allocation2); in TEST_P()
403 context->scriptGroupExecute(scriptGroup); in TEST_P()
404 context->contextFinish(); in TEST_P()
407 context->allocation2DRead(allocation2, 0, 0, 0, AllocationCubemapFace::POSITIVE_X, 256, 256, in TEST_P()
424 Script script = context->scriptCCreate("struct_test", "/data/local/tmp/", bitcode); in TEST_P()
432 Element element = context->elementCreate(DataType::UNSIGNED_8, DataKind::USER, false, 1); in TEST_P()
435 Type type = context->typeCreate(element, 128, 0, 0, false, false, YuvFormat::YUV_NONE); in TEST_P()
438 Allocation allocation = context->allocationCreateTyped(type, AllocationMipmapControl::NONE, in TEST_P()
443 context->allocation1DWrite(allocation, 0, 0, (Size)_dataIn.size(), _dataIn); in TEST_P()
445 ScriptFieldID fieldID = context->scriptFieldIDCreate(script, mExportVarIdx_var_allocation); in TEST_P()
449 ScriptInvokeID invokeID = context->scriptInvokeIDCreate(script, mExportFuncIdx_setAllocation); in TEST_P()
458 Closure closure1 = context->invokeClosureCreate(invokeID, params, fieldIDS1, values1, sizes1); in TEST_P()
462 ScriptKernelID kernelID = context->scriptKernelIDCreate(script, mExportForEachIdx_increment, 3); in TEST_P()
470 Closure closure2 = context->closureCreate(kernelID, allocation /* returnValue */, fieldIDS2, in TEST_P()
475 context->closureSetGlobal(closure1, fieldID, (int64_t)(intptr_t)allocation, in TEST_P()
482 ScriptGroup2 scriptGroup2 = context->scriptGroup2Create(name, cacheDir, closures); in TEST_P()
485 context->scriptGroupExecute(scriptGroup2); in TEST_P()
486 context->allocationRead(allocation, (Ptr)dataOut.data(), (Size)dataOut.size()*sizeof(uint8_t)); in TEST_P()
501 Script script = context->scriptCCreate("struct_test", "/data/local/tmp/", bitcode); in TEST_P()
509 Element element = context->elementCreate(DataType::UNSIGNED_8, DataKind::USER, false, 1); in TEST_P()
512 Type type = context->typeCreate(element, 128, 0, 0, false, false, YuvFormat::YUV_NONE); in TEST_P()
515 Allocation allocation = context->allocationCreateTyped(type, AllocationMipmapControl::NONE, in TEST_P()
520 context->allocation1DWrite(allocation, 0, 0, (Size)_dataIn.size(), _dataIn); in TEST_P()
523 ScriptKernelID kernelID = context->scriptKernelIDCreate(script, mExportForEachIdx_increment, 3); in TEST_P()
531 Closure closure = context->closureCreate(kernelID, allocation /* returnValue */, fieldIDS, in TEST_P()
536 context->closureSetArg(closure, 0 /* first argument */, (Ptr)allocation, -1); in TEST_P()
542 ScriptGroup2 scriptGroup2 = context->scriptGroup2Create(name, cacheDir, closures); in TEST_P()
545 context->scriptGroupExecute(scriptGroup2); in TEST_P()
546 context->allocationRead(allocation, (Ptr)dataOut.data(), (Size)dataOut.size()*sizeof(uint8_t)); in TEST_P()