@@ -159,21 +159,21 @@ pool_t wrap(cuda::device::id_t device_id, pool::handle_t handle, bool owning) no
159159
160160namespace detail_ {
161161
162- inline access_permissions_t access_permissions (cuda::device::id_t device_id, pool::handle_t pool_handle)
162+ inline permissions_t get_permissions (cuda::device::id_t device_id, pool::handle_t pool_handle)
163163{
164164 CUmemAccess_flags access_flags;
165165 auto mem_location = pool::detail_::create_mem_location (device_id);
166166 auto status = cuMemPoolGetAccess (&access_flags, pool_handle, &mem_location);
167167 throw_if_error_lazy (status,
168168 " Determining access information for " + cuda::device::detail_::identify (device_id)
169169 + " to " + pool::detail_::identify (pool_handle));
170- return access_permissions_t::from_access_flags (access_flags);
170+ return permissions::detail_::from_flags (access_flags);
171171}
172172
173- inline void set_access_permissions (span<cuda::device::id_t > device_ids, pool::handle_t pool_handle, access_permissions_t permissions)
173+ inline void set_permissions (span<cuda::device::id_t > device_ids, pool::handle_t pool_handle, permissions_t permissions)
174174{
175175 if (permissions.write and not permissions.read ) {
176- throw ::std::invalid_argument (" Memory pool access permissions cannot be write-only" );
176+ throw ::std::invalid_argument (" Memory pool access get_permissions cannot be write-only" );
177177 }
178178
179179 CUmemAccess_flags flags = permissions.read ?
@@ -192,14 +192,14 @@ inline void set_access_permissions(span<cuda::device::id_t> device_ids, pool::ha
192192
193193 auto status = cuMemPoolSetAccess (pool_handle, descriptors.data (), descriptors.size ());
194194 throw_if_error_lazy (status,
195- " Setting access permissions for " + ::std::to_string (descriptors.size ())
195+ " Setting access get_permissions for " + ::std::to_string (descriptors.size ())
196196 + " devices to " + pool::detail_::identify (pool_handle));
197197}
198198
199- inline void set_access_permissions (cuda::device::id_t device_id, pool::handle_t pool_handle, access_permissions_t permissions)
199+ inline void set_permissions (cuda::device::id_t device_id, pool::handle_t pool_handle, permissions_t permissions)
200200{
201201 if (permissions.write and not permissions.read ) {
202- throw ::std::invalid_argument (" Memory pool access permissions cannot be write-only" );
202+ throw ::std::invalid_argument (" Memory pool access get_permissions cannot be write-only" );
203203 }
204204
205205 CUmemAccessDesc desc;
@@ -212,16 +212,16 @@ inline void set_access_permissions(cuda::device::id_t device_id, pool::handle_t
212212 desc.location = pool::detail_::create_mem_location (device_id);
213213 auto status = cuMemPoolSetAccess (pool_handle, &desc, 1 );
214214 throw_if_error_lazy (status,
215- " Setting access permissions for " + cuda::device::detail_::identify (device_id)
215+ " Setting access get_permissions for " + cuda::device::detail_::identify (device_id)
216216 + " to " + pool::detail_::identify (pool_handle));
217217}
218218
219219} // namespace detail_
220220
221- access_permissions_t access_permissions (const cuda::device_t & device, const pool_t & pool);
222- void set_access_permissions (const cuda::device_t & device, const pool_t & pool, access_permissions_t permissions);
221+ permissions_t get_permissions (const cuda::device_t & device, const pool_t & pool);
222+ void set_permissions (const cuda::device_t & device, const pool_t & pool, permissions_t permissions);
223223template <typename DeviceRange>
224- void set_access_permissions (DeviceRange devices, const pool_t & pool_handle, access_permissions_t permissions);
224+ void get_permissions (DeviceRange devices, const pool_t & pool_handle, permissions_t permissions);
225225
226226namespace pool {
227227
@@ -302,48 +302,38 @@ class pool_t {
302302 set_attribute<CU_MEMPOOL_ATTR_RELEASE_THRESHOLD>(threshold);
303303 }
304304
305- access_permissions_t access_permissions (const cuda::device_t & device)
305+ permissions_t permissions (const cuda::device_t & device)
306306 {
307- return memory::access_permissions (device, *this );
307+ return memory::get_permissions (device, *this );
308308 }
309309
310310 /* *
311- * Set read and write permissions from a device to the allocations from
311+ * Set read and write get_permissions from a device to the allocations from
312312 * this pool
313313 *
314- * @param device the device the kernels running on which are governed by these permissions
315- * @param permissions new read and write permissions to use
314+ * @param device the device the kernels running on which are governed by these get_permissions
315+ * @param permissions new read and write get_permissions to use
316316 *
317317 * @note This affects both future _and past_ allocations from this pool.
318318 */
319319 // /@{
320320 /* *
321321 * @param device the device the kernels running on which are governed by this new setting
322- * @param permissions new read and write permissions to use
322+ * @param permissions new read and write get_permissions to use
323323 */
324- void set_access_permissions (const cuda::device_t & device, access_permissions_t permissions)
324+ void set_permissions (const cuda::device_t & device, permissions_t permissions)
325325 {
326- return memory::set_access_permissions (device, *this , permissions);
327- }
328-
329- /* *
330- * @param device the device the kernels running on which are governed by this new setting
331- * @param read_permission true if kernels are allowed to read from memory allocated by this pool
332- * @param write_permission true if kernels are allowed to write to memory allocated by this pool
333- */
334- void set_access_permissions (const cuda::device_t & device, bool read_permission, bool write_permission)
335- {
336- set_access_permissions (device, access_permissions_t {read_permission, write_permission});
326+ return memory::set_permissions (device, *this , permissions);
337327 }
338328
339329 /* *
340330 * @param device the devices the kernels running on which are governed by this new setting
341- * @param permissions new read and write permissions to use
331+ * @param permissions new read and write get_permissions to use
342332 */
343333 template <typename DeviceRange>
344- void set_access_permissions (DeviceRange devices, access_permissions_t permissions)
334+ void set_permissions (DeviceRange devices, permissions_t permissions)
345335 {
346- return memory::set_access_permissions (devices, *this , permissions);
336+ return memory::set_permissions (devices, *this , permissions);
347337 }
348338 // /@}
349339
0 commit comments