WRITE_MEM_FENCE(3clc)

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

✨ WRITE_MEM_FENCE ✨

okay bestie, welcome to the write_mem_fence page from the OpenCL manual (that's the 3clc section, iykyk) πŸ’–


🌸 NAME 🌸

write_mem_fence β€” the write memory barrier that orders only stores. that's it. that's the whole job. she's a specialist πŸ’…

void write_mem_fence(cl_mem_fence_flags flags);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so real talk: write_mem_fence is a write memory barrier, and it orders only stores. not loads, not everything β€” just the stores. she knows her lane and she stays in it ✨

the flags argument tells her which memory address space we're talking about, and you can set it to a combination of these literal values:

  • CLK_LOCAL_MEM_FENCE β€” the local one 🏠
  • CLK_GLOBAL_MEM_FENCE β€” the global one 🌍

so yeah, mix and match as your heart desires πŸ’œ


πŸŽ€ SPECIFICATION πŸŽ€

OpenCL Specification[1] β€” go read it, it's giving authoritative πŸ“–


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

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

(yes bestie, that's the actual legal text and you have to keep it, no cap β€” don't be out here deleting copyright notices, that's not the vibe πŸ™ˆ)

πŸ’€ NOTES πŸ’€

  1. OpenCL Specification β€” page 275, section 6.12.9 - Explicit Memory Fence Functions πŸ”₯

and that's the page, periodt πŸ’… this lil number comes to you from The Khronos Group, dated 01/14/2021, and it lives in the OpenCL Manual at section WRITE_MEM_FENCE(3clc) β€” slay, go order your stores βœ¨πŸ’–

πŸ“¦ where this page comes from