rocsparse_set_stream Interface Reference

rocsparse_set_stream Interface Reference#

HIPFORT API Reference: hipfort_rocsparse::rocsparse_set_stream Interface Reference
hipfort_rocsparse::rocsparse_set_stream Interface Reference

Specify user-defined HIP stream. More...

Public Member Functions

integer(kind(rocsparse_status_success)) function rocsparse_set_stream_ (handle, stream)
 

Detailed Description

Specify user-defined HIP stream.

rocsparse_set_stream specifies the stream to be used by the rocSPARSE library context and all subsequent function calls.

Parameters
[in,out]handle- the handle to the rocSPARSE library context.
[in]stream- the stream to be used by the rocSPARSE library context.
Return values
rocsparse_status_successthe operation completed successfully.
rocsparse_status_invalid_handlehandle is invalid.
Example
This example illustrates how a user-defined stream can be used in rocSPARSE.
// Create rocSPARSE handle
rocsparse_handle handle;
// Create stream
hipStream_t stream;
hipStreamCreate(&stream);
// Set stream to rocSPARSE handle
rocsparse_set_stream(handle, stream);
// Do some work
// ...
// Clean up
hipStreamDestroy(stream);
Create a rocSPARSE handle.
Definition hipfort_rocsparse.F90:47
Destroy a rocSPARSE handle.
Definition hipfort_rocsparse.F90:115
Specify user-defined HIP stream.
Definition hipfort_rocsparse.F90:269

Member Function/Subroutine Documentation

◆ rocsparse_set_stream_()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_set_stream::rocsparse_set_stream_ ( type(c_ptr), value  handle,
type(c_ptr), value  stream 
)

The documentation for this interface was generated from the following file: