STEP(3clc)
β¨ STEP(3clc) β¨
okay bestie, welcome to the step page from the OpenCL Manual π it's short, it's sweet, it's literally one tiny function and honestly? iconic.
πΈ NAME πΈ
step β returns 0.0 if x < edge, else 1.0.
like. that's the whole job. that's the gig. π«Ά
here's how you call her:
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 extension enabled
π¦ DESCRIPTION π¦
Returns 0.0 if x < edge, else 1.0. π
that's it. no drama. x is smaller than edge? you get 0.0. otherwise? 1.0. periodt.
π NOTES π
okay so there's some generic type name lore you need to know, don't skip this part bestie:
- the generic type name
gentypemeans the function can takefloat,float2,float3,float4,float8,float16,double,double2,double3,double4,double8, ordouble16as the type for the arguments. β¨ - the generic type name
gentypefmeans the function can takefloat,float2,float3,float4,float8, orfloat16as the type for the arguments. π - the generic type name
gentypedmeans the function can takedouble,double2,double3,double4,double8, ordouble16as the type for the arguments. π - the built-in common functions are implemented using the round to nearest even rounding mode. no cap, that's just how it is. π
- if extended with
cl_khr_fp16(3clc), the generic type namegentypemay indicatehalfandhalf{2|3|4|8|16}as arguments and return values. π§
β SPECIFICATION β
OpenCL Specification[1]
π₯ SEE ALSO π₯
π AUTHORS π
The Khronos Group
π COPYRIGHT π
Copyright Β© 2007-2011 The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and/or associated documentation files (the "Materials"), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Materials, and to permit persons to whom the Materials are furnished to do so, subject to the condition that this copyright notice and permission notice shall be included in all copies or substantial portions of the Materials.
π NOTES π
- OpenCL Specification page 260, section 6.12.4 - Common Functions
and that's the whole page, bestie!! πβ¨ brought to you by The Khronos Group, dated 01/14/2021, from STEP(3clc). go forth and branch on your edges, you main character π¦π
π
π¦ where this page comes from
- ubuntu jammy: opencl-1.2-man-doc 1.0~svn33624-5 Β· other
- ubuntu noble: opencl-1.2-man-doc 1.0~svn33624-5 Β· other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms