STEP(3clc)

πŸ“¦
version 1.0~svn33624 Β· 3 versions
, in ubuntu jammy, ubuntu noble

✨ 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 gentype means the function can take float, float2, float3, float4, float8, float16, double, double2, double3, double4, double8, or double16 as the type for the arguments. ✨
  • the generic type name gentypef means the function can take float, float2, float3, float4, float8, or float16 as the type for the arguments. 🌈
  • the generic type name gentyped means the function can take double, double2, double3, double4, double8, or double16 as 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 name gentype may indicate half and half{2|3|4|8|16} as arguments and return values. 🧚

⭐ SPECIFICATION ⭐

OpenCL Specification[1]


πŸ”₯ SEE ALSO πŸ”₯

commonFunctions(3clc)


πŸ‘‘ AUTHORS πŸ‘‘

The Khronos Group


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 πŸ“

  1. 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