cudaMalloc Interface

interface


Called by

interface~~cudamalloc~~CalledByGraph interface~cudamalloc cudaMalloc proc~alloc_mem alloc_mem proc~alloc_mem->interface~cudamalloc proc~create_device_pointer create_device_pointer proc~create_device_pointer->interface~cudamalloc proc~get_kernel get_kernel proc~get_kernel->interface~cudamalloc proc~alloc_and_set_aux alloc_and_set_aux proc~alloc_and_set_aux->proc~alloc_mem proc~create~4 nvrtc_kernel%create proc~create~4->proc~create_device_pointer proc~create~4->proc~get_kernel proc~mem_alloc~3 abstract_transpose_plan%mem_alloc proc~mem_alloc~3->proc~alloc_mem proc~run_autotune_backend run_autotune_backend proc~run_autotune_backend->proc~alloc_mem proc~run_autotune_backend->proc~alloc_and_set_aux proc~autotune_grid~2 autotune_grid proc~autotune_grid~2->proc~run_autotune_backend proc~create_cuda transpose_plan_cuda%create_cuda proc~create_cuda->proc~alloc_and_set_aux proc~create_cuda->proc~run_autotune_backend proc~autotune_grid_decomposition~2 autotune_grid_decomposition proc~create_cuda->proc~autotune_grid_decomposition~2 proc~create~9 transpose_handle_cuda%create proc~create~9->proc~create~4 proc~autotune_grid_decomposition~2->proc~autotune_grid~2

public function cudaMalloc(ptr, count) result(cudaError_t) bind(C, name="cudaMalloc")

Arguments

Type IntentOptional Attributes Name
type(c_ptr) :: ptr

Pointer to allocated device memory

integer(kind=c_size_t), value :: count

Requested allocation size in bytes

Return Value integer(kind=c_int)

Returns cudaSuccess if memory was allocated successfully, or cudaErrorMemoryAllocation if the memory could not be allocated.

Description

Allocates memory on the device.