cudaSetDevice Interface

interface

Sets the current device.


public function cudaSetDevice(num) result(cudaError_t) bind(C, name="cudaSetDevice")

Arguments

Type IntentOptional Attributes Name
integer(kind=c_int), value :: num

Device number

Return Value integer(kind=c_int)

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