tf::cudaDeviceAllocator taskflow/cuda/cuda_memory.hpp tf::cudaDeviceAllocator::rebind typename T T using tf::cudaDeviceAllocator< T >::value_type = T value_type element type T * using tf::cudaDeviceAllocator< T >::pointer = T* pointer element pointer type T & using tf::cudaDeviceAllocator< T >::reference = T& reference element reference type const T * using tf::cudaDeviceAllocator< T >::const_pointer = const T* const_pointer const element pointer type const T & using tf::cudaDeviceAllocator< T >::const_reference = const T& const_reference constant element reference type std::size_t using tf::cudaDeviceAllocator< T >::size_type = std::size_t size_type size type std::ptrdiff_t using tf::cudaDeviceAllocator< T >::difference_type = std::ptrdiff_t difference_type pointer difference type tf::cudaDeviceAllocator< T >::cudaDeviceAllocator () noexcept cudaDeviceAllocator Constructs a device allocator object. tf::cudaDeviceAllocator< T >::cudaDeviceAllocator (const cudaDeviceAllocator &) noexcept cudaDeviceAllocator const cudaDeviceAllocator & Constructs a device allocator object from another device allocator object. typename U tf::cudaDeviceAllocator< T >::cudaDeviceAllocator (const cudaDeviceAllocator< U > &) noexcept cudaDeviceAllocator const cudaDeviceAllocator< U > & Constructs a device allocator object from another device allocator object with a different element type. tf::cudaDeviceAllocator< T >::~cudaDeviceAllocator () noexcept ~cudaDeviceAllocator Destructs the device allocator object. pointer pointer tf::cudaDeviceAllocator< T >::address (reference x) address reference x Returns the address of x. This effectively means returning &x. x reference to an object a pointer to the object const_pointer const_pointer tf::cudaDeviceAllocator< T >::address (const_reference x) const address const_reference x Returns the address of x. This effectively means returning &x. x reference to an object a pointer to the object pointer pointer tf::cudaDeviceAllocator< T >::allocate (size_type n, const void *=0) allocate size_type n const void * 0 allocates block of storage. Attempts to allocate a block of storage with a size large enough to contain n elements of member type, value_type, and returns a pointer to the first element. The storage is aligned appropriately for object of type value_type, but they are not constructed. The block of storage is allocated using cudaMalloc and throws std::bad_alloc if it cannot allocate the total amount of storage requested. n number of elements (each of size sizeof(value_type)) to be allocated a pointer to the initial element in the block of storage. void void tf::cudaDeviceAllocator< T >::deallocate (pointer ptr, size_type) deallocate pointer ptr size_type Releases a block of storage previously allocated with member allocate and not yet released. The elements in the array are not destroyed by a call to this member function. ptr pointer to a block of storage previously allocated with allocate size_type size_type tf::cudaDeviceAllocator< T >::max_size () const noexcept max_size returns the maximum number of elements that could potentially be allocated by this allocator A call to member allocate with the value returned by this function can still fail to allocate the requested storage. the number of elements that might be allocated as maximum by a call to member allocate void void tf::cudaDeviceAllocator< T >::construct (pointer, const_reference) construct pointer const_reference ignored to avoid de-referencing device pointer from the host void void tf::cudaDeviceAllocator< T >::destroy (pointer) destroy pointer ignored to avoid de-referencing device pointer from the host typename U bool bool tf::cudaDeviceAllocator< T >::operator== (const cudaDeviceAllocator< U > &) const noexcept operator== const cudaDeviceAllocator< U > & compares two allocator of different types using == Device allocators of different types are always equal to each other because the storage allocated by the allocator a1 can be deallocated through a2. typename U bool bool tf::cudaDeviceAllocator< T >::operator!= (const cudaDeviceAllocator< U > &) const noexcept operator!= const cudaDeviceAllocator< U > & compares two allocator of different types using != Device allocators of different types are always equal to each other because the storage allocated by the allocator a1 can be deallocated through a2. class to create a CUDA device allocator T element type A cudaDeviceAllocator enables device-specific allocation for standard library containers. It is typically passed as template parameter when declaring standard library containers (e.g. std::vector). tf::cudaDeviceAllocatoraddress tf::cudaDeviceAllocatoraddress tf::cudaDeviceAllocatorallocate tf::cudaDeviceAllocatorconst_pointer tf::cudaDeviceAllocatorconst_reference tf::cudaDeviceAllocatorconstruct tf::cudaDeviceAllocatorcudaDeviceAllocator tf::cudaDeviceAllocatorcudaDeviceAllocator tf::cudaDeviceAllocatorcudaDeviceAllocator tf::cudaDeviceAllocatordeallocate tf::cudaDeviceAllocatordestroy tf::cudaDeviceAllocatordifference_type tf::cudaDeviceAllocatormax_size tf::cudaDeviceAllocatoroperator!= tf::cudaDeviceAllocatoroperator== tf::cudaDeviceAllocatorpointer tf::cudaDeviceAllocatorreference tf::cudaDeviceAllocatorsize_type tf::cudaDeviceAllocatorvalue_type tf::cudaDeviceAllocator~cudaDeviceAllocator