ACCESSQUALIFIERS(3clc)

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

πŸ’– ACCESSQUALIFIERS πŸ’–

okay bestie, welcome to the OpenCL Manual page for ACCESSQUALIFIERS(3clc) β€” yes it's a whole manual page and yes it's about access qualifiers, we're doing this, sit down, hydrate, let's go 🫢


✨ NAME ✨

Access_Qualifiers β€” Access Qualifiers for image memory objects. periodt.

__read_only __write_only read_only
write_only

🌸 DESCRIPTION 🌸

okay so picture this: image objects that get passed in as arguments to a kernel can be declared as read-only or write-only. that's the whole vibe. πŸ¦‹

and here's the tea, bestie: a kernel cannot read from and write to the same image object. it's giving "pick a lane." πŸ’…

so the __read_only (or read_only) and __write_only (or write_only) qualifiers must be used with image object arguments, to declare whether the image object is being read or written by a kernel. no guessing games, you have to say it out loud.

and the default qualifier? it's __read_only. the shy one. the default. πŸŽ€


πŸ‘‘ NOTES πŸ‘‘

okay so real talk, these names:

  • __read_only
  • __write_only
  • __read_write
  • read_only
  • write_only
  • read_write

are reserved for use as access qualifiers and shall not be used otherwise. like, they are taken. spoken for. not yours to reuse, iykyk. don't do it. πŸ’€

πŸ“ Example

in the example below, imageA is a read-only 2D image object, and imageB is a write-only 2D image object. iconic duo, one reads one writes, no drama:

__kernel void foo (read_only image2d_t
imageA, write_only image2d_t imageB) {
...  }

πŸ“œ SPECIFICATION πŸ“œ

OpenCL Specification<sup>[1]</sup>


🧚 AUTHORS 🧚

The Khronos Group β€” the main characters, honestly. πŸ‘‘


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 conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Materials.

⚠️ bestie this part is the legal bit β€” copy it verbatim, no edits, no vibe remix, we do not touch the license text. πŸ’–

πŸ’œ NOTES πŸ’œ

  1. OpenCL Specification β€” page 226, section 6.6 - Access Qualifiers

and that's the whole page, you ate it πŸŽ€ this edition came from The Khronos Group and it's dated 01/14/2021, so if you're citing it, that's the version, no cap. go forth and qualify your accesses, bestie πŸŒŸπŸ’–βœ¨

πŸ“¦ where this page comes from