cuLite v0.3.1
A lite CUDA C++ Interface
Loading...
Searching...
No Matches
Stream Operators

Utility operators for asynchronous execution and data flow. More...

Functions

template<typename T_Scalar>
std::ostream & operator<< (std::ostream &os, const culite::dns::XiVector< T_Scalar > &vec)
 Writes to os the contents of vec.
template<typename T_Scalar>
std::ostream & operator<< (std::ostream &os, const culite::dns::XxMatrix< T_Scalar > &mat)
 Writes to os the contents of mat.
template<typename T_Int, typename T_Scalar>
void operator>> (const culite::csc::XxMatrix< T_Int, T_Scalar > &src, cla3p::csc::XxMatrix< typename culite::TypeTraits< T_Int >::cla3p_type, typename culite::TypeTraits< T_Scalar >::cla3p_type > &dest)
 Stream operator for copying device sparse matrix to host.
template<typename T_Int, typename T_Scalar>
void operator>> (const cla3p::csc::XxMatrix< typename culite::TypeTraits< T_Int >::cla3p_type, typename culite::TypeTraits< T_Scalar >::cla3p_type > &src, culite::csc::XxMatrix< T_Int, T_Scalar > &dest)
 Stream operator for copying host sparse matrix to device.
template<typename T_Int, typename T_Scalar>
std::ostream & operator<< (std::ostream &os, const culite::csc::XxMatrix< T_Int, T_Scalar > &mat)
 Writes to os the contents of mat.
template<typename T_Int, typename T_Scalar>
void operator>> (const culite::csr::XxMatrix< T_Int, T_Scalar > &src, cla3p::csr::XxMatrix< typename culite::TypeTraits< T_Int >::cla3p_type, typename culite::TypeTraits< T_Scalar >::cla3p_type > &dest)
 Stream operator for copying device sparse matrix to host.
template<typename T_Int, typename T_Scalar>
void operator>> (const cla3p::csr::XxMatrix< typename culite::TypeTraits< T_Int >::cla3p_type, typename culite::TypeTraits< T_Scalar >::cla3p_type > &src, culite::csr::XxMatrix< T_Int, T_Scalar > &dest)
 Stream operator for copying host sparse matrix to device.
template<typename T_Int, typename T_Scalar>
std::ostream & operator<< (std::ostream &os, const culite::csr::XxMatrix< T_Int, T_Scalar > &mat)
 Writes to os the contents of mat.
std::ostream & operator<< (std::ostream &os, const culite::alloc_t &alloc_type)
 Stream insertion operator for culite::alloc_t enumeration.

Detailed Description

Utility operators for asynchronous execution and data flow.

A collection of operators designed to interact with CUDA streams. These facilitate non-blocking execution, synchronization, and intuitive data streaming between host and device using standard-like syntax.

Function Documentation

◆ operator<<() [1/3]

template<typename T_Scalar>
std::ostream & operator<< ( std::ostream & os,
const culite::dns::XiVector< T_Scalar > & vec )

Writes to os the contents of vec.

Copies the device vector to host and writes it to the output stream.

Template Parameters
T_ScalarThe scalar type (e.g., float, double, complex).
Parameters
[in,out]osThe output stream.
[in]vecThe device vector to output.
Returns
The output stream.

◆ operator<<() [2/3]

template<typename T_Scalar>
std::ostream & operator<< ( std::ostream & os,
const culite::dns::XxMatrix< T_Scalar > & mat )

Writes to os the contents of mat.

Copies the device matrix to host and writes it to the output stream.

Template Parameters
T_ScalarThe scalar type (e.g., float, double, complex).
Parameters
[in,out]osThe output stream.
[in]matThe device matrix to output.
Returns
The output stream.

◆ operator>>() [1/4]

template<typename T_Int, typename T_Scalar>
void operator>> ( const culite::csc::XxMatrix< T_Int, T_Scalar > & src,
cla3p::csc::XxMatrix< typename culite::TypeTraits< T_Int >::cla3p_type, typename culite::TypeTraits< T_Scalar >::cla3p_type > & dest )

Stream operator for copying device sparse matrix to host.

Transfers the contents of a device sparse matrix to a host sparse matrix. This operator enables convenient syntax for device-to-host memory transfers.

Template Parameters
T_IntThe integer type for indexing.
T_ScalarThe scalar type.
Parameters
[in]srcThe source device sparse matrix.
[out]destThe destination host sparse matrix.

◆ operator>>() [2/4]

template<typename T_Int, typename T_Scalar>
void operator>> ( const cla3p::csc::XxMatrix< typename culite::TypeTraits< T_Int >::cla3p_type, typename culite::TypeTraits< T_Scalar >::cla3p_type > & src,
culite::csc::XxMatrix< T_Int, T_Scalar > & dest )

Stream operator for copying host sparse matrix to device.

Transfers the contents of a host sparse matrix to a device sparse matrix. This operator enables convenient syntax for host-to-device memory transfers.

Template Parameters
T_IntThe integer type for indexing.
T_ScalarThe scalar type.
Parameters
[in]srcThe source host sparse matrix.
[out]destThe destination device sparse matrix.

◆ operator>>() [3/4]

template<typename T_Int, typename T_Scalar>
void operator>> ( const culite::csr::XxMatrix< T_Int, T_Scalar > & src,
cla3p::csr::XxMatrix< typename culite::TypeTraits< T_Int >::cla3p_type, typename culite::TypeTraits< T_Scalar >::cla3p_type > & dest )

Stream operator for copying device sparse matrix to host.

Transfers the contents of a device sparse matrix to a host sparse matrix. This operator enables convenient syntax for device-to-host memory transfers.

Template Parameters
T_IntThe integer type for indexing.
T_ScalarThe scalar type.
Parameters
[in]srcThe source device sparse matrix.
[out]destThe destination host sparse matrix.

◆ operator>>() [4/4]

template<typename T_Int, typename T_Scalar>
void operator>> ( const cla3p::csr::XxMatrix< typename culite::TypeTraits< T_Int >::cla3p_type, typename culite::TypeTraits< T_Scalar >::cla3p_type > & src,
culite::csr::XxMatrix< T_Int, T_Scalar > & dest )

Stream operator for copying host sparse matrix to device.

Transfers the contents of a host sparse matrix to a device sparse matrix. This operator enables convenient syntax for host-to-device memory transfers.

Template Parameters
T_IntThe integer type for indexing.
T_ScalarThe scalar type.
Parameters
[in]srcThe source host sparse matrix.
[out]destThe destination device sparse matrix.

◆ operator<<() [3/3]

std::ostream & operator<< ( std::ostream & os,
const culite::alloc_t & alloc_type )

Stream insertion operator for culite::alloc_t enumeration.

Writes a string representation of the memory allocation type to the output stream.

Parameters
[in,out]osThe output stream to write to.
[in]alloc_typeThe allocation type to be written.
Returns
Reference to the output stream os.