hipsparsecdotci Interface Reference

hipsparsecdotci Interface Reference#

HIPFORT API Reference: hipfort_hipsparse::hipsparsecdotci Interface Reference
hipfort_hipsparse::hipsparsecdotci Interface Reference

Compute the dot product of a complex conjugate sparse vector with a dense vector. More...

Public Member Functions

integer(kind(hipsparse_status_success)) function hipsparsecdotci_ (handle, nnz, xval, xind, y, myresult, idxbase)
 
integer(kind(hipsparse_status_success)) function hipsparsecdotci_rank_0 (handle, nnz, xval, xind, y, myresult, idxbase)
 
integer(kind(hipsparse_status_success)) function hipsparsecdotci_rank_1 (handle, nnz, xval, xind, y, myresult, idxbase)
 

Detailed Description

Compute the dot product of a complex conjugate sparse vector with a dense vector.

hipsparseXdotci computes the dot product of the complex conjugate sparse vector \(x\) with the dense vector \(y\), such that

\[ result := \bar{x}^H y \]

result = 0
for(i = 0; i < nnz; ++i)
{
result += conj(xVal[i]) * y[xInd[i]];
}
Note
This function is non-blocking and executed asynchronously with respect to the host. It can return before the actual computation has finished.
If nnz is zero, the function returns successfully with result set to zero.
Deprecated:
This function is deprecated when using the CUDA backend (CUDA 10.0+) and will be removed in CUDA 11.0. This deprecation does not apply to the ROCm backend.
Parameters
[in]handle- handle to the hipSPARSE library context queue.
[in]nnz- number of non-zero entries of vector \(x\). Must be non-negative.
[in]xVal- array of nnz values containing the elements of \(x\).
[in]xInd- array of nnz elements containing the indices of the non-zero values of \(x\).
[in]y- array of values in dense format. Must be pre-allocated with sufficient size to accommodate all indices specified in xInd.
[out]myResult- pointer to the result, which can be host or device memory.
[in]idxBase- index base. HIPSPARSE_INDEX_BASE_ZERO for zero-based indexing or HIPSPARSE_INDEX_BASE_ONE for one-based indexing.
Return values
HIPSPARSE_STATUS_SUCCESSthe operation completed successfully.
HIPSPARSE_STATUS_NOT_INITIALIZEDhandle is not initialized.
HIPSPARSE_STATUS_INVALID_VALUEhandle or result is nullptr, nnz is negative, xVal, xInd, or y is nullptr when nnz is greater than zero, or idxBase is neither HIPSPARSE_INDEX_BASE_ZERO nor HIPSPARSE_INDEX_BASE_ONE.
HIPSPARSE_STATUS_ALLOC_FAILEDthe buffer for the dot product reduction could not be allocated.
HIPSPARSE_STATUS_INTERNAL_ERRORan internal error occurred.

Member Function/Subroutine Documentation

◆ hipsparsecdotci_()

integer(kind(hipsparse_status_success)) function hipfort_hipsparse::hipsparsecdotci::hipsparsecdotci_ ( type(c_ptr), value  handle,
integer(c_int), value  nnz,
type(c_ptr), value  xval,
type(c_ptr), value  xind,
type(c_ptr), value  y,
type(c_ptr), value  myresult,
integer(kind(hipsparse_index_base_zero)), value  idxbase 
)

◆ hipsparsecdotci_rank_0()

integer(kind(hipsparse_status_success)) function hipfort_hipsparse::hipsparsecdotci::hipsparsecdotci_rank_0 ( type(c_ptr)  handle,
integer(c_int)  nnz,
complex(c_float_complex), target  xval,
integer(c_int), target  xind,
complex(c_float_complex), target  y,
complex(c_float_complex), target  myresult,
integer(kind(hipsparse_index_base_zero))  idxbase 
)

◆ hipsparsecdotci_rank_1()

integer(kind(hipsparse_status_success)) function hipfort_hipsparse::hipsparsecdotci::hipsparsecdotci_rank_1 ( type(c_ptr)  handle,
integer(c_int)  nnz,
complex(c_float_complex), dimension(:), target  xval,
integer(c_int), dimension(:), target  xind,
complex(c_float_complex), dimension(:), target  y,
complex(c_float_complex), dimension(:), target  myresult,
integer(kind(hipsparse_index_base_zero))  idxbase 
)

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