📦 opencl-1.2-man-doc

322 pages · page 2 of 2

G (continued)

  • get_global_offset(3clc)Returns the offset values specified in global_work_offset argument to clEnqueueNDRangeKernel. size_t get_global_offset(uint dimindx);✨
  • get_global_size(3clc)Returns the number of global work-items specified for dimension identified by dimindx. size_t get_global_size(uint dimindx);✨
  • get_group_id(3clc)Returns the work-group ID. size_t get_group_id(uint dimindx);✨
  • get_image_array_size(3clc)Return the number of images in an image array. size_t get_image_array_size(image2d_array_t image); size_t get_image_array_size(image1d_array_t image);✨
  • get_image_channel_data_type(3clc)Return the channel data type. int get_image_channel_data_type(image1d_t image); int get_image_channel_data_type(image1d_buffer_t image); int get_image_channel_data_type(image2d_t image); int…✨
  • get_image_channel_order(3clc)Return the image channel data order. int get_image_channel_order(image1d_t image); int get_image_channel_order(image1d_buffer_t image); int get_image_channel_order(image2d_t image); int…✨
  • get_image_depth(3clc)Return the 3D image depth in pixels. int get_image_depth(image3d_t image);✨
  • get_image_dim(3clc)Return the image dimensions. int2 get_image_dim(image2d_t image); int2 get_image_dim(image2d_array_t image); int4 get_image_dim(image3d_t image);✨
  • get_image_height(3clc)Return the image height in pixels. int get_image_height(image2d_t image); int get_image_height(image3d_t image); int get_image_height(image2d_array_t image);✨
  • get_image_width(3clc)Return the image width in pixels. int get_image_width(image1d_t image); int get_image_width(image1d_buffer_t image); int get_image_width(image2d_t image); int get_image_width(image3d_t image); int…✨
  • get_local_id(3clc)Returns the unique local work-item ID. size_t get_local_id(uint dimindx);✨
  • get_local_size(3clc)Returns the number of local work-items. size_t get_local_size(uint dimindx);✨
  • get_num_groups(3clc)Returns the number of work-groups that will execute a kernel. size_t get_num_groups(uint dimindx);✨
  • get_work_dim(3clc)Returns the number of dimensions in use. scalarDataTypes(3clc) get_work_dim ()✨
  • global(3clc)Address space qualifier. __global global✨

H

  • hadd(3clc)Returns (x + y) >> 1, or (x + y + 1) >> 1 gentype hadd(gentype x, gentype y); gentype rhadd(gentype x, gentype y);✨
  • hypot(3clc)Square root of x2 + y2. gentype hypot(gentype x, gentype y);✨

I

  • ilogb(3clc)Exponent as an integer value. intn ilogb(floatn x); int ilogb(float x); intn ilogb(doublen x); int ilogb(double x); intn ilogb(halfn x); int ilogb(half x);✨
  • imageDescriptor(3clc)The image descriptor structure describes the type and dimensions of the image or image array and is defined as: typedef struct _cl_image_desc { cl_mem_object_type image_type; size_t image_width…✨
  • imageFunctions(3clc)Built-in functions to read, write, and query image memory objects. Click an item in the table below for details about that function…✨
  • integerClamp(3clc)Clamp x to range given by minval, maxval. gentype clamp(gentype x, gentype minval, gentype maxval); gentype clamp(gentype x, sgentype minval, sgentype maxval);✨
  • integerFunctions(3clc)Click an item in the table below for details about that function…✨
  • integerMax(3clc)Returns the greater or lesser of x or y. gentype max(gentype x, gentype y); gentype max(gentype x, sgentype y); gentype min(gentype x, gentype y); gentype min(gentype x, sgentype y);✨
  • isequal(3clc)Compare of x == y. int isequal(float x, float y); intn isequal(floatn x, floatn y); int isequal(double x, double y); longn isequal(doublen x, doublen y); int isequal (half x, half y) // if half…✨
  • isfinite(3clc)Test for finite value. int isfinite(float ); intn isfinite(floatn ); int isfinite(double ); longn isfinite(doublen ); int isfinite (half) // if half extension enabled shortn isfinite (halfn) // if…✨
  • isgreater(3clc)Compare of x > y. int isgreater(float x, float y); intn isgreater(floatn x, floatn y); int isgreater(double x, double y); longn isgreater(doublen x, doublen y); int isgreater (half x, half y) // if…✨
  • isgreaterequal(3clc)Compare of x >= y. int isgreaterequal(float x, float y); intn isgreaterequal(floatn x, floatn y); int isgreaterequal(double x, double y); longn isgreaterequal(doublen x, doublen y); int…✨
  • isinf(3clc)Test for infinity value. int isinf(float ); intn isinf(floatn ); int isinf(double ); longn isinf(doublen ); int isinf (half) // if half extension enabled shortn isinf (halfn) // if half extension…✨
  • isless(3clc)Compare of x < y. int isless(float x, float y); intn isless(floatn x, floatn y); int isless(double x, double y); longn isless(doublen x, doublen y); int isless (half x, half y) // if half extension…✨
  • islessequal(3clc)Compare of x <= y. int islessequal(float x, float y); intn islessequal(floatn x, floatn y); int islessequal(double x, double y); longn islessequal(doublen x, doublen y); int islessequal (half x, half…✨
  • islessgreater(3clc)Compare of (x < y) || (x > y). int islessgreater(float x, float y); intn islessgreater(floatn x, floatn y); int islessgreater(double x, double y); longn islessgreater(doublen x, doublen y); int…✨
  • isnan(3clc)Test for a NaN. int isnan(float ); intn isnan(floatn ); int isnan(double ); longn isnan(doublen ); int isnan (half) // if half extension enabled shortn isnan (halfn) // if half extension enabled✨
  • isnormal(3clc)Test for a normal value. int isnormal(float ); intn isnormal(floatn ); int isnormal(double ); longn isnormal(doublen ); int isnormal (half) // if half extension enabled shortn isnormal (halfn) // if…✨
  • isnotequal(3clc)Compare of x != y. int isnotequal(float x, float y); intn isnotequal(floatn x, floatn y); int isnotequal(double x, double y); longn isnotequal(doublen x, doublen y); int isnotequal (half x, half y)…✨
  • isordered(3clc)Test if arguments are ordered. int isordered(float x, float y); intn isordered(floatn x, floatn y); int isordered(double x, double y); longn isordered(doublen x, doublen y); int isordered (half x…✨
  • isunordered(3clc)Test if arguments are unordered. int isunordered(float x, float y); intn isunordered(floatn x, floatn y); int isunordered(double x, double y); longn isunordered(doublen x, doublen y); int isunordered…✨

L

  • ldexp(3clc)Multiply x by 2 to the power k. floatn ldexp(floatn x, intn k); floatn ldexp(floatn x, int k); float ldexp(float x, int k); doublen ldexp(doublen x, intn k); doublen ldexp(doublen x, int k); double…✨
  • length(3clc)Vector length. float length(floatn p); double length(doublen p); half length (gentype p) // if half extension enabled✨
  • lgamma(3clc)Log gamma functions. gentype lgamma(gentype x); floatn lgamma_r(floatn x, __global intn *signp); floatn lgamma_r(floatn x, __local intn *signp); floatn lgamma_r(floatn x, __private intn *signp)…✨
  • local(3clc)Address Space Qualifier. __local local✨
  • log(3clc)Logarithm functions. gentype log(gentype ); gentype log2(gentype ); gentype log10(gentype ); gentype log1p(gentype x); gentype logb(gentype x); gentype half_log(gentype x); gentype half_log2(gentype…✨

M

  • macroLimits(3clc)Macros for math limits.✨
  • mad(3clc)Approximates a * b + c. gentype mad(gentype a, gentype b, gentype c);✨
  • mad24(3clc)Fast integer function to multiply 24-bit integers and add a 32-bit value. gentype mad24(gentype x, gentype y, gentype z);✨
  • mad_hi(3clc)Returns mul_hi(a, b) + c. gentype mad_hi(gentype a, gentype b, gentype c);✨
  • mad_sat(3clc)Returns a*b+c and saturates the result. gentype mad_sat(gentype a, gentype b, gentype c);✨
  • mag(3clc)Returns the argument with the greatest (or least) magnitude. gentype maxmag(gentype x, gentype y); gentype minmag(gentype x, gentype y);✨
  • mathConstants(3clc)The following symbolic constants are available.✨
  • mathFunctions(3clc)The table below describes the list of built-in math functions. These functions can take scalar or vector arguments. Click an item in the table for details about that function…✨
  • mem_fence(3clc)Orders loads and stores of a work-item executing a kernel. void mem_fence(cl_mem_fence_flags flags);✨
  • miscVectorFunctions(3clc)The table below describes the list of built-in miscelaneous vector functions…✨
  • mix(3clc)Linear blend of x and y. gentype mix(gentype x, gentype y, gentype a); gentypef mix(gentypef x, gentypef y, float a); gentyped mix(gentyped x, gentyped y, double a); gentype mix (gentype x, gentype…✨
  • modf(3clc)Decompose a floating-point number. gentype modf(gentype x, __global gentype *iptr); gentype modf(gentype x, __local gentype *iptr); gentype modf(gentype x, __private gentype *iptr);✨
  • mul24(3clc)Fast integer function to multiply 24-bit integer values. gentype mul24(gentype x, gentype y);✨
  • mul_hi(3clc)Returns the high half of the product of x and y. gentype mul_hi(gentype x, gentype y);✨

N

  • nan(3clc)Quiet NaN floatn nan(uintn nancode); float nan(uint nancode); doublen nan(ulongn nancode); double nan(ulong nancode); halfn nan (ushortn nancode) // if half extension enabled✨
  • nextafter(3clc)Next representable floating-point value following x in the direction of y. gentype nextafter(gentype x, gentype y);✨
  • normalize(3clc)Normal vector length 1. floatn normalize(floatn p); doublen normalize(doublen p); gentype normalize (gentype p) // if half extension enabled✨

O

  • operators(3clc)Operators used in OpenCL. The following operators are used in OpenCL. For information about the usage of these operators, please refer to the OpenCL specification[1]…✨
  • otherDataTypes(3clc)Other Built-in Data Types✨

P

  • popcount(3clc)Returns the number of non-zero bits in x. gentype popcount(gentype x);✨
  • pow(3clc)Compute x to the power of y. gentype pow(gentype x, gentype y); floatn pown(floatn x, intn y); float pown(float x, int y); doublen pown(doublen x, intn y); double pown(double x, int y); gentype…✨
  • prefetch(3clc)Prefetch bytes into the global cache. void prefetch(const __global gentype *p, size_t num_gentypes);✨
  • preprocessorDirectives(3clc)Preprocessor Directives and Macros. # pragma pp-tokens<sub>opt</sub> new-line✨
  • printfFunction(3clc)The OpenCL C programming language implements the printf function. int printf(constant char * restrict format, ...);✨
  • private(3clc)Address Space Qualifier. __private private✨

Q

R

  • radians(3clc)Converts degrees to radians. gentype radians(gentype degrees);✨
  • read_imagef1d(3clc)Do an element lookup in the 1D image object, returning floating-point values. float4 read_imagef(image1d_t image, sampler_t sampler, int coord); float4 read_imagef(image1d_t image, sampler_t sampler…✨
  • read_imagef2d(3clc)Do an element lookup in the 2D image object, returning floating-point values. float4 read_imagef(image2d_t image, sampler_t sampler, int2 coord); float4 read_imagef(image2d_t image, sampler_t…✨
  • read_imagef3d(3clc)Do an element lookup in the 3D image object, returning floating-point values. float4 read_imagef(image3d_t image, sampler_t sampler, int4 coord); float4 read_imagef(image3d_t image, sampler_t…✨
  • read_imageh1d(3clc)Do an element lookup in the 1D image object, returning half floating-point values. half4 read_imageh(image1d_t image, sampler_t sampler, int coord); half4 read_imageh(image1d_t image, sampler_t…✨
  • read_imageh2d(3clc)Do an element lookup in the 2D image object, returning half floating-point values. half4 read_imageh(image2d_t image, sampler_t sampler, int2 coord); half4 read_imageh(image2d_t image, sampler_t…✨
  • read_imageh3d(3clc)Do an element lookup in the 3D image object, returning half floating-point values. half4 read_imageh(image3d_t image, sampler_t sampler, int4 coord); half4 read_imageh(image3d_t image, sampler_t…✨
  • read_imagei1d(3clc)Do an element lookup in the 1D image object, returning unnormalized signed integer and unsigned integer values. int4 read_imagei(image1d_t image, sampler_t sampler, int coord); int4…✨
  • read_imagei2d(3clc)Do an element lookup in the 2D image object, returning unnormalized signed integer and unsigned integer values. int4 read_imagei(image2d_t image, sampler_t sampler, int2 coord); int4…✨
  • read_imagei3d(3clc)Do an element lookup in the 3D image object, returning unnormalized signed integer and unsigned integer values int4 read_imagei(image3d_t image, sampler_t sampler, int4 coord); int4…✨
  • read_mem_fence(3clc)Read memory barrier that orders only loads. void read_mem_fence(cl_mem_fence_flags flags);✨
  • recip(3clc)Floating point reciprocal. gentype half_recip(gentype x); gentype native_recip(gentype x);✨
  • relationalFunctions(3clc)Click an item in the table below for details about that function…✨
  • remainder(3clc)Floating point remainder function. gentype remainder(gentype x, gentype y);✨
  • remquo(3clc)Floating point remainder and quotient function. floatn remquo(floatn x, floatn y, __global intn *quo); floatn remquo(floatn x, floatn y, __local intn *quo); floatn remquo(floatn x, floatn y…✨
  • reservedDataTypes(3clc)Built-in reserved Data Types.✨
  • restrictions(3clc)✨
  • rint(3clc)Round to nearest even integer. gentype rint(gentype );✨
  • rootn(3clc)Compute x to the power 1/y. floatn rootn(floatn x, intn y); float rootn(float x, int y); doublen rootn(doublen x, intn y); double rootn(double x, int y); halfn rootn(halfn x, intn y); half rootn(half…✨
  • rotate(3clc)Rotate bits left. gentype rotate(gentype v, gentype i);✨
  • round(3clc)Rounding function. gentype round(gentype x);✨

S

  • sampler_t(3clc)A type used to control how elements of an image object are read by read_image{f|i|ui}. const sampler_t <sampler name> = <value> constant sampler_t <sampler name> = <value> __constant sampler_t…✨
  • scalarDataTypes(3clc)Built-in scalar data types.✨
  • select(3clc)For each component of a vector type, result[i] = if MSB of c[i] is set ? b[i] : a[i]. For scalar type, result = c ? b : a. gentype select(gentype a, gentype b, igentype c); gentype select(gentype a…✨
  • shuffle(3clc)Constructs a permutation of elements from one (or two) input vectors. gentypen shuffle(gentypem x, ugentypen mask); gentypen shuffle2(gentypem x, gentypem y, ugentypen mask);✨
  • sign(3clc)Sign of a value. gentype sign(gentype x);✨
  • signbit(3clc)Test for sign bit. int signbit(float ); intn signbit(floatn ); int signbit(double ); longn signbit(doublen ); int signbit (half) // if half extension enabled shortn signbit (halfn) // if half…✨
  • sin(3clc)Sine functions. gentype sin(gentype ); gentype sincos(gentype x, __global gentype *cosval); gentype sincos(gentype x, __local gentype *cosval); gentype sincos(gentype x, __private gentype *cosval)…✨
  • smoothstep(3clc)Step and interpolate. gentype smoothstep(gentype edge0, gentype edge1, gentype x); gentypef smoothstep(float edge0, float edge1, gentypef x); gentyped smoothstep(double edge0, double edge1, gentyped…✨
  • sqrt(3clc)Square root functions. gentype sqrt(gentype ); gentype half_sqrt(gentype x); gentype native_sqrt(gentype x); gentype rsqrt(gentype ); gentype half_rsqrt(gentype x); gentype native_rsqrt(gentype x);✨
  • step(3clc)Returns 0.0 if x < edge, else 1.0. gentype step(gentype edge, gentype x); gentypef step(float edge, gentypef x); gentyped step(double edge, gentyped x); gentype step (half edge, gentype x) // if half…✨
  • storageQualifiers(3clc)The typedef, extern and static storage-class specifiers.✨
  • sub_sat(3clc)Returns x - y and saturates the result. gentype sub_sat(gentype x, gentype y);✨
  • supportedImageFormats(3clc)Supported Image Formats✨

T

  • tan(3clc)Tangent functions. gentype tan(gentype ); gentype tanh(gentype ); gentype tanpi(gentype x); gentype half_tan(gentype x); gentype native_tan(gentype x);✨
  • tgamma(3clc)Gamma function. gentype tgamma(gentype );✨
  • trunc(3clc)Round to integer toward zero. gentype trunc(gentype );✨

U

  • upsample(3clc)result[i] = ((gentype)hi[i] << 8|16|32) | lo[i] short upsample(char hi, uchar lo); ushort upsample(uchar hi, uchar lo); shortn upsample(charn hi, ucharn lo); ushortn upsample(ucharn hi, ucharn lo)…✨

V

  • vec_step(3clc)Takes a built-in scalar or vector data type argument and returns an integer value representing the number of elements in the scalar or vector. int vec_step(gentypen a); int vec_step(char3 a); int…✨
  • vectorDataLoadandStoreFunctions(3clc)Click an item in the table below for details about that function…✨
  • vectorDataTypes(3clc)Built-in vector data types.✨
  • vload_half(3clc)Read a half float from a pointer to memory. float vload_half(size_t offset, const __global half *p); float vload_half(size_t offset, const __local half *p); float vload_half(size_t offset, const…✨
  • vload_halfn(3clc)Read a half float vector from a pointer to memory. floatn vload_halfn(size_t offset, const __global half *p); floatn vload_halfn(size_t offset, const __local half *p); floatn vload_halfn(size_t…✨
  • vloada_halfn(3clc)Read half float vector from a pointer to memory. floatn vloada_halfn(size_t offset, const __global half *p); floatn vloada_halfn(size_t offset, const __local half *p); floatn vloada_halfn(size_t…✨
  • vloadn(3clc)Read vectors from a pointer to memory. gentypen vloadn(size_t offset, const __global gentype *p); gentypen vloadn(size_t offset, const __local gentype *p); gentypen vloadn(size_t offset, const…✨
  • vstore_half(3clc)Convert float to half and write to a pointer to memory. void vstore_half(float data, size_t offset, __global half *p); void vstore_half_rte(float data, size_t offset, __global half *p); void…✨
  • vstore_halfn(3clc)Convert float vector to half vector and write to a pointer to memory. void vstore_halfn(floatn data, size_t offset, __global half *p); void vstore_halfn_rte(floatn data, size_t offset, __global half…✨
  • vstorea_halfn(3clc)Convert float vector to half vector and write to a pointer to memory. void vstorea_halfn(floatn data, size_t offset, __global half *p); void vstorea_halfn_rte(floatn data, size_t offset, __global…✨
  • vstoren(3clc)Write sizeof bytes (gentypen) to memory. void vstoren(gentypen data, size_t offset, __global gentype *p); void vstoren(gentypen data, size_t offset, __local gentype *p); void vstoren(gentypen data…✨

W

  • wait_group_events(3clc)Wait for events that identify the async_work_group_copy operations to complete. void wait_group_events(int num_events, event_t *event_list);✨
  • workItemFunctions(3clc)Click an item in the table below for details about that function…✨
  • write_image1d(3clc)Write color value to location in a 1D image object. void write_imagef(image1d_t image, int coord, float4 color); void write_imagef(image1d_buffer_t image, int coord, float4 color); void…✨
  • write_image2d(3clc)Write color value to location in a 2D image object. void write_imagef(image2d_t image, int2 coord, float4 color); void write_imagef(image2d_array_t image, int4 coord, float4 color); void…✨
  • write_image3d(3clc)Write color value to location in a 3D image object. void write_imagef(image3d_t image, int4 coord, float4 color); void write_imagei(image3d_t image, int4 coord, int4 color); void…✨
  • write_mem_fence(3clc)Write memory barrier that orders only stores. void write_mem_fence(cl_mem_fence_flags flags);✨