|
| 1 | + |
| 2 | +:orphan: |
| 3 | + |
| 4 | +numba_dpex.experimental._kernel_dpcpp_spirv_overloads._atomic_ref_overloads |
| 5 | +=========================================================================== |
| 6 | + |
| 7 | +.. py:module:: numba_dpex.experimental._kernel_dpcpp_spirv_overloads._atomic_ref_overloads |
| 8 | +
|
| 9 | +.. autoapi-nested-parse:: |
| 10 | + |
| 11 | + Implements the SPIR-V overloads for the kernel_api.AtomicRef class methods. |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | +Overview |
| 16 | +-------- |
| 17 | + |
| 18 | + |
| 19 | +.. list-table:: Function |
| 20 | + :header-rows: 0 |
| 21 | + :widths: auto |
| 22 | + :class: summarytable |
| 23 | + |
| 24 | + * - :py:obj:`ol_atomic_ref <numba_dpex.experimental._kernel_dpcpp_spirv_overloads._atomic_ref_overloads.ol_atomic_ref>`\ (ref, index, memory_order, memory_scope, address_space) |
| 25 | + - Overload of the constructor for the class |
| 26 | + * - :py:obj:`ol_fetch_add <numba_dpex.experimental._kernel_dpcpp_spirv_overloads._atomic_ref_overloads.ol_fetch_add>`\ (atomic_ref, val) |
| 27 | + - SPIR-V overload for :meth:`numba_dpex.kernel_api.AtomicRef.fetch_add`. |
| 28 | + * - :py:obj:`ol_fetch_sub <numba_dpex.experimental._kernel_dpcpp_spirv_overloads._atomic_ref_overloads.ol_fetch_sub>`\ (atomic_ref, val) |
| 29 | + - SPIR-V overload for :meth:`numba_dpex.kernel_api.AtomicRef.fetch_sub`. |
| 30 | + * - :py:obj:`ol_fetch_min <numba_dpex.experimental._kernel_dpcpp_spirv_overloads._atomic_ref_overloads.ol_fetch_min>`\ (atomic_ref, val) |
| 31 | + - SPIR-V overload for :meth:`numba_dpex.kernel_api.AtomicRef.fetch_min`. |
| 32 | + * - :py:obj:`ol_fetch_max <numba_dpex.experimental._kernel_dpcpp_spirv_overloads._atomic_ref_overloads.ol_fetch_max>`\ (atomic_ref, val) |
| 33 | + - SPIR-V overload for :meth:`numba_dpex.kernel_api.AtomicRef.fetch_max`. |
| 34 | + * - :py:obj:`ol_fetch_and <numba_dpex.experimental._kernel_dpcpp_spirv_overloads._atomic_ref_overloads.ol_fetch_and>`\ (atomic_ref, val) |
| 35 | + - SPIR-V overload for :meth:`numba_dpex.kernel_api.AtomicRef.fetch_and`. |
| 36 | + * - :py:obj:`ol_fetch_or <numba_dpex.experimental._kernel_dpcpp_spirv_overloads._atomic_ref_overloads.ol_fetch_or>`\ (atomic_ref, val) |
| 37 | + - SPIR-V overload for :meth:`numba_dpex.kernel_api.AtomicRef.fetch_or`. |
| 38 | + * - :py:obj:`ol_fetch_xor <numba_dpex.experimental._kernel_dpcpp_spirv_overloads._atomic_ref_overloads.ol_fetch_xor>`\ (atomic_ref, val) |
| 39 | + - SPIR-V overload for :meth:`numba_dpex.kernel_api.AtomicRef.fetch_xor`. |
| 40 | + * - :py:obj:`ol_load <numba_dpex.experimental._kernel_dpcpp_spirv_overloads._atomic_ref_overloads.ol_load>`\ (atomic_ref) |
| 41 | + - SPIR-V overload for :meth:`numba_dpex.kernel_api.AtomicRef.load`. |
| 42 | + * - :py:obj:`ol_store <numba_dpex.experimental._kernel_dpcpp_spirv_overloads._atomic_ref_overloads.ol_store>`\ (atomic_ref, val) |
| 43 | + - SPIR-V overload for :meth:`numba_dpex.kernel_api.AtomicRef.store`. |
| 44 | + * - :py:obj:`ol_exchange <numba_dpex.experimental._kernel_dpcpp_spirv_overloads._atomic_ref_overloads.ol_exchange>`\ (atomic_ref, val) |
| 45 | + - SPIR-V overload for :meth:`numba_dpex.kernel_api.AtomicRef.exchange`. |
| 46 | + * - :py:obj:`ol_compare_exchange <numba_dpex.experimental._kernel_dpcpp_spirv_overloads._atomic_ref_overloads.ol_compare_exchange>`\ (atomic_ref, expected_ref, desired, expected_idx) |
| 47 | + - SPIR-V overload for |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | +Functions |
| 53 | +--------- |
| 54 | +.. py:function:: ol_atomic_ref(ref, index, memory_order=MemoryOrder.RELAXED, memory_scope=MemoryScope.DEVICE, address_space=AddressSpace.GLOBAL) |
| 55 | +
|
| 56 | + Overload of the constructor for the class |
| 57 | + class:`numba_dpex.kernel_api.AtomicRef`. |
| 58 | + |
| 59 | + :raises errors.TypingError: If the `ref` argument is not a UsmNdArray type. |
| 60 | + :raises errors.TypingError: If the dtype of the `ref` is not supported in an |
| 61 | + :raises AtomicRef.: |
| 62 | + :raises errors.TypingError: If the device does not support atomic operations on |
| 63 | + :raises the dtype of the `ref`.: |
| 64 | + :raises errors.TypingError: If the `memory_order`, `address_type`, or |
| 65 | + :raises memory_scope: |
| 66 | + :raises errors.TypingError: If the `address_space` argument is different from |
| 67 | + :raises the address space attribute of the `ref` argument.: |
| 68 | + :raises errors.TypingError: If the address space is PRIVATE. |
| 69 | + |
| 70 | + |
| 71 | +.. py:function:: ol_fetch_add(atomic_ref, val) |
| 72 | +
|
| 73 | + SPIR-V overload for :meth:`numba_dpex.kernel_api.AtomicRef.fetch_add`. |
| 74 | + |
| 75 | + Generates the same LLVM IR instruction as dpcpp for the |
| 76 | + `atomic_ref::fetch_add` function. |
| 77 | + |
| 78 | + :raises TypingError: When the dtype of the aggregator value does not match the |
| 79 | + :raises dtype of the AtomicRef type.: |
| 80 | + |
| 81 | + |
| 82 | +.. py:function:: ol_fetch_sub(atomic_ref, val) |
| 83 | +
|
| 84 | + SPIR-V overload for :meth:`numba_dpex.kernel_api.AtomicRef.fetch_sub`. |
| 85 | + |
| 86 | + Generates the same LLVM IR instruction as dpcpp for the |
| 87 | + `atomic_ref::fetch_sub` function. |
| 88 | + |
| 89 | + :raises TypingError: When the dtype of the aggregator value does not match the |
| 90 | + :raises dtype of the AtomicRef type.: |
| 91 | + |
| 92 | + |
| 93 | +.. py:function:: ol_fetch_min(atomic_ref, val) |
| 94 | +
|
| 95 | + SPIR-V overload for :meth:`numba_dpex.kernel_api.AtomicRef.fetch_min`. |
| 96 | + |
| 97 | + Generates the same LLVM IR instruction as dpcpp for the |
| 98 | + `atomic_ref::fetch_min` function. |
| 99 | + |
| 100 | + :raises TypingError: When the dtype of the aggregator value does not match the |
| 101 | + :raises dtype of the AtomicRef type.: |
| 102 | + |
| 103 | + |
| 104 | +.. py:function:: ol_fetch_max(atomic_ref, val) |
| 105 | +
|
| 106 | + SPIR-V overload for :meth:`numba_dpex.kernel_api.AtomicRef.fetch_max`. |
| 107 | + |
| 108 | + Generates the same LLVM IR instruction as dpcpp for the |
| 109 | + `atomic_ref::fetch_max` function. |
| 110 | + |
| 111 | + :raises TypingError: When the dtype of the aggregator value does not match the |
| 112 | + :raises dtype of the AtomicRef type.: |
| 113 | + |
| 114 | + |
| 115 | +.. py:function:: ol_fetch_and(atomic_ref, val) |
| 116 | +
|
| 117 | + SPIR-V overload for :meth:`numba_dpex.kernel_api.AtomicRef.fetch_and`. |
| 118 | + |
| 119 | + Generates the same LLVM IR instruction as dpcpp for the |
| 120 | + `atomic_ref::fetch_and` function. |
| 121 | + |
| 122 | + :raises TypingError: When the dtype of the aggregator value does not match the |
| 123 | + :raises dtype of the AtomicRef type.: |
| 124 | + |
| 125 | + |
| 126 | +.. py:function:: ol_fetch_or(atomic_ref, val) |
| 127 | +
|
| 128 | + SPIR-V overload for :meth:`numba_dpex.kernel_api.AtomicRef.fetch_or`. |
| 129 | + |
| 130 | + Generates the same LLVM IR instruction as dpcpp for the |
| 131 | + `atomic_ref::fetch_or` function. |
| 132 | + |
| 133 | + :raises TypingError: When the dtype of the aggregator value does not match the |
| 134 | + :raises dtype of the AtomicRef type.: |
| 135 | + |
| 136 | + |
| 137 | +.. py:function:: ol_fetch_xor(atomic_ref, val) |
| 138 | +
|
| 139 | + SPIR-V overload for :meth:`numba_dpex.kernel_api.AtomicRef.fetch_xor`. |
| 140 | + |
| 141 | + Generates the same LLVM IR instruction as dpcpp for the |
| 142 | + `atomic_ref::fetch_xor` function. |
| 143 | + |
| 144 | + :raises TypingError: When the dtype of the aggregator value does not match the |
| 145 | + :raises dtype of the AtomicRef type.: |
| 146 | + |
| 147 | + |
| 148 | +.. py:function:: ol_load(atomic_ref) |
| 149 | +
|
| 150 | + SPIR-V overload for :meth:`numba_dpex.kernel_api.AtomicRef.load`. |
| 151 | + |
| 152 | + Generates the same LLVM IR instruction as dpcpp for the |
| 153 | + `atomic_ref::load` function. |
| 154 | + |
| 155 | + |
| 156 | + |
| 157 | +.. py:function:: ol_store(atomic_ref, val) |
| 158 | +
|
| 159 | + SPIR-V overload for :meth:`numba_dpex.kernel_api.AtomicRef.store`. |
| 160 | + |
| 161 | + Generates the same LLVM IR instruction as dpcpp for the |
| 162 | + `atomic_ref::store` function. |
| 163 | + |
| 164 | + :raises TypingError: When the dtype of the value stored does not match the |
| 165 | + :raises dtype of the AtomicRef type.: |
| 166 | + |
| 167 | + |
| 168 | +.. py:function:: ol_exchange(atomic_ref, val) |
| 169 | +
|
| 170 | + SPIR-V overload for :meth:`numba_dpex.kernel_api.AtomicRef.exchange`. |
| 171 | + |
| 172 | + Generates the same LLVM IR instruction as dpcpp for the |
| 173 | + `atomic_ref::exchange` function. |
| 174 | + |
| 175 | + :raises TypingError: When the dtype of the value passed to `exchange` |
| 176 | + :raises does not match the dtype of the AtomicRef type.: |
| 177 | + |
| 178 | + |
| 179 | +.. py:function:: ol_compare_exchange(atomic_ref, expected_ref, desired, expected_idx=0) |
| 180 | +
|
| 181 | + SPIR-V overload for |
| 182 | + :meth:`numba_dpex.experimental.kernel_iface.AtomicRef.compare_exchange`. |
| 183 | + |
| 184 | + Generates the same LLVM IR instruction as dpcpp for the |
| 185 | + `atomic_ref::compare_exchange_strong` function. |
| 186 | + |
| 187 | + :raises TypingError: When the dtype of the value passed to `compare_exchange` |
| 188 | + :raises does not match the dtype of the AtomicRef type.: |
| 189 | + |
| 190 | + |
| 191 | + |
| 192 | + |
| 193 | + |
0 commit comments