1010 * University of Stuttgart. All rights reserved.
1111 * Copyright (c) 2004-2005 The Regents of the University of California.
1212 * All rights reserved.
13- * Copyright (c) 2006-2015 Los Alamos National Security, LLC. All rights
13+ * Copyright (c) 2006-2016 Los Alamos National Security, LLC. All rights
1414 * reserved.
1515 * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
1616 * Copyright (c) 2012-2013 NVIDIA Corporation. All rights reserved.
@@ -293,10 +293,44 @@ enum {
293293 MCA_BTL_ATOMIC_SUPPORTS_OR = 0x00000400 ,
294294 /** The btl supports atomic bitwise exclusive or */
295295 MCA_BTL_ATOMIC_SUPPORTS_XOR = 0x00000800 ,
296+
297+ /** The btl supports logical and */
298+ MCA_BTL_ATOMIC_SUPPORTS_LAND = 0x00001000 ,
299+ /** The btl supports logical or */
300+ MCA_BTL_ATOMIC_SUPPORTS_LOR = 0x00002000 ,
301+ /** The btl supports logical exclusive or */
302+ MCA_BTL_ATOMIC_SUPPORTS_LXOR = 0x00004000 ,
303+
304+ /** The btl supports atomic swap */
305+ MCA_BTL_ATOMIC_SUPPORTS_SWAP = 0x00010000 ,
306+
307+ /** The btl supports atomic min */
308+ MCA_BTL_ATOMIC_SUPPORTS_MIN = 0x00100000 ,
309+ /** The btl supports atomic min */
310+ MCA_BTL_ATOMIC_SUPPORTS_MAX = 0x00200000 ,
311+
296312 /** The btl supports atomic compare-and-swap */
297313 MCA_BTL_ATOMIC_SUPPORTS_CSWAP = 0x10000000 ,
314+
298315 /** The btl guarantees global atomicity (can mix btl atomics with cpu atomics) */
299316 MCA_BTL_ATOMIC_SUPPORTS_GLOB = 0x20000000 ,
317+
318+
319+ /** The btl supports 32-bit integer operations. Keep in mind the btl may
320+ * support only a subset of the available atomics. */
321+ MCA_BTL_ATOMIC_SUPPORTS_32BIT = 0x40000000 ,
322+
323+ /** The btl supports floating-point operations. Keep in mind the btl may
324+ * support only a subset of the available atomics and may not support
325+ * both 64 or 32-bit floating point. */
326+ MCA_BTL_ATOMIC_SUPPORTS_FLOAT = 0x80000000 ,
327+ };
328+
329+ enum {
330+ /** Use 32-bit atomics */
331+ MCA_BTL_ATOMIC_FLAG_32BIT = 0x00000001 ,
332+ /** Use floating-point atomics */
333+ MCA_BTL_ATOMIC_FLAG_FLOAT = 0x00000002 ,
300334};
301335
302336enum mca_btl_base_atomic_op_t {
@@ -308,6 +342,20 @@ enum mca_btl_base_atomic_op_t {
308342 MCA_BTL_ATOMIC_OR = 0x0012 ,
309343 /** Atomic xor: (*remote_address) = (*remote_address) ^ operand */
310344 MCA_BTL_ATOMIC_XOR = 0x0014 ,
345+ /** Atomic logical and: (*remote_address) = (*remote_address) && operand */
346+ MCA_BTL_ATOMIC_LAND = 0x0015 ,
347+ /** Atomic logical or: (*remote_address) = (*remote_address) || operand */
348+ MCA_BTL_ATOMIC_LOR = 0x0016 ,
349+ /** Atomic logical xor: (*remote_address) = (*remote_address) != operand */
350+ MCA_BTL_ATOMIC_LXOR = 0x0017 ,
351+ /** Atomic swap: (*remote_address) = operand */
352+ MCA_BTL_ATOMIC_SWAP = 0x001a ,
353+ /** Atomic min */
354+ MCA_BTL_ATOMIC_MIN = 0x0020 ,
355+ /** Atomic max */
356+ MCA_BTL_ATOMIC_MAX = 0x0021 ,
357+
358+ MCA_BTL_ATOMIC_LAST ,
311359};
312360typedef enum mca_btl_base_atomic_op_t mca_btl_base_atomic_op_t ;
313361
@@ -977,7 +1025,7 @@ typedef int (*mca_btl_base_module_get_fn_t) (struct mca_btl_base_module_t *btl,
9771025 * (remote_address, remote_address + 8)
9781026 * @param op (IN) Operation to perform
9791027 * @param operand (IN) Operand for the operation
980- * @param flags (IN) Flags for this put operation
1028+ * @param flags (IN) Flags for this atomic operation
9811029 * @param order (IN) Ordering
9821030 * @param cbfunc (IN) Function to call on completion (if queued)
9831031 * @param cbcontext (IN) Context for the callback
@@ -1021,7 +1069,7 @@ typedef int (*mca_btl_base_module_atomic_op64_fn_t) (struct mca_btl_base_module_
10211069 * (remote_address, remote_address + 8)
10221070 * @param op (IN) Operation to perform
10231071 * @param operand (IN) Operand for the operation
1024- * @param flags (IN) Flags for this put operation
1072+ * @param flags (IN) Flags for this atomic operation
10251073 * @param order (IN) Ordering
10261074 * @param cbfunc (IN) Function to call on completion (if queued)
10271075 * @param cbcontext (IN) Context for the callback
@@ -1067,7 +1115,7 @@ typedef int (*mca_btl_base_module_atomic_fop64_fn_t) (struct mca_btl_base_module
10671115 * (remote_address, remote_address + 8)
10681116 * @param compare (IN) Operand for the operation
10691117 * @param value (IN) Value to store on success
1070- * @param flags (IN) Flags for this put operation
1118+ * @param flags (IN) Flags for this atomic operation
10711119 * @param order (IN) Ordering
10721120 * @param cbfunc (IN) Function to call on completion (if queued)
10731121 * @param cbcontext (IN) Context for the callback
0 commit comments