cudaMemset Interface

interface

Initializes or sets device memory to a value.


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

Arguments

Type IntentOptional Attributes Name
type(c_ptr), value :: ptr

Pointer to device memory

integer(kind=c_int), value :: val

Value to set

integer(kind=c_size_t), value :: count

Size in bytes to set

Return Value integer(kind=c_int)

Returns cudaSuccess if the memory was set successfully, or an error code if there was an issue.