![]() Wa_curated: "curated:donotuseinexternalfilters/productdocumentation", Wa_emttechnology: "emttechnology:thirdpartytechnologies/opencl", Wa_emtprogramminglanguage: "emtprogramminglanguage:cc", ![]() Wa_emtcontenttype: "emtcontenttype:designanddevelopmentreference/developerguide", Explicit casting of the indices to the int32 in a kernel simplifies the compiler job. Consider the following example: _kernel void foo(_constant int* data, const uint workPerItem)įor (int i = myStart i ![]() ![]() Using size_t, which is another unsigned type for indices, makes the vectorization of indexing arithmetic less efficient. Use signed data types ( shorts and ints) in both cases to enable the compiler to utilize a larger set of SIMD instructions. To avoid overflows, those eight-bit input values are typically converted and processed as 16- or 32-bit integer values. Many image-processing kernels operate on uchar input. ![]()
0 Comments
Leave a Reply. |