'\" t .\" Title: atom_xor .\" Author: The Khronos Group .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: 02/03/2019 .\" Manual: OpenCL Manual .\" Source: The Khronos Group .\" Language: English .\" .TH "ATOM_XOR" "3clc" "02/03/2019" "The Khronos Group" "OpenCL Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" atom_xor \- 64\-bit atom_xor functions\&. .SH "" .HP \w'long\ atom_xor('u .BI "long atom_xor(volatile\ \fBglobal\fR(3clc)\ long\ *" "p" ", long\ " "val" ");" .HP \w'long\ atom_xor('u .BI "long atom_xor(volatile\ \fBglobal\fR(3clc)\ long\ *" "p" ", long\ " "val" ");" .HP \w'ulong\ atom_xor('u .BI "ulong atom_xor(volatile\ \fBlocal\fR(3clc)\ ulong\ *" "p" ", ulong\ " "val" ");" .HP \w'ulong\ atom_xor('u .BI "ulong atom_xor(volatile\ \fBlocal\fR(3clc)\ ulong\ *" "p" ", ulong\ " "val" ");" .SH "DESCRIPTION" .PP Read the 64\-bit value (referred to as \fIold\fR) stored at location pointed by \fIp\fR\&. Compute (\fIold\fR ^ \fIval\fR) and store result at location pointed by \fIp\fR\&. The function returns \fIold\fR\&. .PP An application that wants to use this extension will need to include the #pragma OPENCL EXTENSION cl_khr_int64_extended_atomics : enable in the OpenCL program source\&. .PP This function is performed in one atomic transaction\&. These transactions are atomic for the device executing these atomic functions\&. There is no guarantee of atomicity if the atomic operations to the same memory location are being performed by kernels executing on multiple devices\&. .PP Atomic operations on 64\-bit integers and 32\-bit integers (and float) are also atomic with regard to each other\&. .SH "SPECIFICATION" .PP \m[blue]\fBOpenCL Specification\fR\m[]\&\s-2\u[1]\d\s+2 .SH "SEE ALSO" .PP \fBatomicFunctions\fR(3clc), \fBatomic_xor\fR(3clc), \fBcl_khr_int64_extended_atomics\fR(3clc) .SH "AUTHORS" .PP \fBThe Khronos Group\fR .SH "COPYRIGHT" .br Copyright \(co 2007-2011 The Khronos Group Inc. .br 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. .sp .SH "NOTES" .IP " 1." 4 OpenCL Specification .RS 4 \%page 279, section 6.12.11 - Atomic Functions for 32-bit integers .RE