ROUND(3clc)

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

πŸ’– NAME πŸ’–

okay bestie, meet round β€” the rounding function. that's it, that's the whole vibe. she rounds. πŸ’…

gentype round(gentype x);

✨ DESCRIPTION ✨

so what does she actually do? she gives you back the integral value nearest to x, and when a case lands exactly halfway, she rounds away from zero β€” no matter what the current rounding direction is. she does not care about your rounding direction. she has her own opinions. periodt. πŸ‘‘


πŸŽ€ NOTES πŸŽ€

  • the vector versions of the math functions operate component-wise, and the description is per-component. so like, each lane does its own lil thing. πŸ¦‹
  • the built-in math functions are not affected by the prevailing rounding mode in the calling environment β€” they always return the same value as they would if they were called with the round to nearest even rounding mode. no cap.
  • built-in math functions take scalar or vector arguments. for any specific use of these functions, the actual type has to be the same for all arguments and the return type, unless otherwise specified. consistency, queen. πŸ‘‘
  • 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.
  • 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. ✨
  • 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.

🌈 SPECIFICATION 🌈

OpenCL Specification[1]


🫢 SEE ALSO 🫢


πŸ’œ 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 following condition: the above copyright notice and this permission notice shall be included in all copies or substantial portions of the Materials.


⭐ NOTES ⭐

  1. OpenCL Specification β€” page 244, section 6.12.2 - Math Functions

okay that's the whole page, you ate that πŸ“

and a lil sign-off from the footer, bc she deserves her flowers: this one's brought to you by The Khronos Group, dated 01/14/2021, and it lives in ROUND(3clc) in the OpenCL Manual. iykyk. bye bestie, go round some numbers πŸ’–βœ¨

πŸ“¦ where this page comes from