9template <
typename Tag,
typename Group,
typename T>
10inline constexpr void trmv(
const Group& group,
15 const int extent = a.
rows();
18 for (
int output_step = 0; output_step < extent; ++output_step) {
19 const int output_index = effective_lower ? (extent - 1 - output_step) : output_step;
21 for (
int input_index = local_id; input_index < extent; input_index += local_size) {
26 operand.
y(output_index) = operand.
alpha * partial + operand.
beta * operand.
y(output_index);
35template <
typename Tag,
typename Group,
typename T>
41 TriangularTransform{.side = Tag::side, .uplo = Tag::uplo, .trans = Tag::trans, .diag = Tag::diag});
70inline constexpr void trmv(
const Group& group,
83inline constexpr void trmv(
const Group& group,
96inline constexpr void trmv(
const Group& group,
112inline constexpr void trmv(
const Group& group,
Non-owning view of a batch of strided vectors: the vector argument type of the entry points.
Policy
Synchronous or asynchronous execution policy.
constexpr MatrixVectorOperand< T > make_matvec_operand(const VectorView< T > &x, const VectorView< T > &y, T alpha=T(1), T beta=T(0))
Builds a MatrixVectorOperand.
DeviceBlasPolicy
Which implementation family a device BLAS call may use.
constexpr void trmv(const Group &group, const KernelMatrixView< T, MatrixFormat::Dense > &a, MatrixVectorOperand< T > operand)
Triangular matrix-vector product , A triangular.
Transpose
The operator op() applied to an operand: op(A) = A, A^T or A^H.
Diag
Whether a triangular operand's diagonal is read or assumed to be one.
Uplo
Which triangle of a symmetric, Hermitian or triangular operand is referenced.
@ NonUnit
The stored diagonal is used.
@ Upper
The upper triangle (i <= j).
@ Lower
The lower triangle (i >= j).
constexpr void trmv(const Group &group, const KernelMatrixView< T, MatrixFormat::Dense > &a, MatrixVectorOperand< T > operand)
constexpr int group_local_linear_id(const Group &group)
constexpr void dispatch_trmv(const Group &group, const KernelMatrixView< T, MatrixFormat::Dense > &a, MatrixVectorOperand< T > operand)
constexpr T triangular_matrix_entry(const KernelMatrixView< T, MatrixFormat::Dense > &a, int row, int col)
constexpr int group_local_linear_range(const Group &group)
constexpr T reduce_sum_group(const Group &group, const T &value)
constexpr void validate_triangular_operand(const KernelMatrixView< T, MatrixFormat::Dense > &a, const MatrixVectorOperand< T > &operand, TriangularTransform transform)
constexpr bool group_is_leader(const Group &group)
Trivially copyable view of a MatrixView for use inside a SYCL kernel.
auto rows() const
Row count (the capacity on a heterogeneous batch).
Operands of a matrix-vector operation: .
VectorView< T > x
input vector
T beta
scale of the input y; 0 still reads y
T alpha
scale of the product
VectorView< T > y
output vector; read (scaled by beta) and overwritten