logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

atomic_add - atomic_add functions.

Authors

TheKhronosGroup

Description

       Read the 32-bit value (referred to as old) stored at location pointed by p. Compute (old + val) and store
       result at location pointed by p. The function returns old.

       A 64-bit version of this function, atom_add(3clc), is enabled by cl_khr_int64_base_atomics(3clc).

Name

       atomic_add - atomic_add functions.

       intatomic_add(volatileglobal(3clc) int *p,intval);unsignedintatomic_add(volatileglobal(3clc) unsigned int *p,unsignedintval);intatomic_add(volatilelocal(3clc) int *p,intval);unsignedintatomic_add(volatilelocal(3clc) unsigned int *p,unsignedintval);

Notes

        1. OpenCL Specification
           page 279, section 6.12.11 - Atomic Functions for 32-bit integers

The Khronos Group                                  11/18/2024                                   ATOMIC_ADD(3clc)

See Also

atomicFunctions(3clc), atom_add(3clc)

Specification

OpenCLSpecification[1]

See Also