Dear All,

When an asynchronous “stream” is not created using the function “cudaStreamCreate()”, could you let me know what numeric I should insert to the 4th argument of the function “cudaMemPrefetchAsync” ?

I suppose it is “0”. Am I right ?

cudaMemPrefetchAsync( X, X, X, 0 )

You can pass in “0”, though since a stream type is defined as an integer(kind=8), you might want to use “0_8” instead.

Or use variable defined as a “cuda_stream_kind”

integer(kind=cuda_stream_kind) :: stream
stream = 0


Dear Mat-san,

Understood. Thank you for the reply.

Sincerely yours,