potrs_batch_scratchpad_size

potrs_batch_scratchpad_size#

Computes size of scratchpad memory required for the potrs_batch function.

Description

potrs_batch_scratchpad_size supports the following precisions.

T

float

double

std::complex<float>

std::complex<double>

Group API

Computes the number of elements of type T the scratchpad memory should able to hold to be passed to the Group API of the potrs_batch function.

Syntax

namespace oneapi::math::lapack {
  template <typename T>
  std::int64_t potrs_batch_scratchpad_size(cl::sycl::queue &queue, math::uplo *uplo, std::int64_t *n, std::int64_t *nrhs, std::int64_t *lda, std::int64_t *ldb, std::int64_t group_count, std::int64_t *group_sizes)
}

Input Parameters

queue

Device queue where calculations will be performed.

uplo
Array of group_count \(\text{uplo}_g\) parameters.
Each of \(\text{uplo}_g\) indicates whether the upper or lower triangular parts of the input matrices are provided:
If \(\text{uplo}_g\) is math::uplo::upper, input matrices from array a belonging to group \(g\) store the upper triangular parts,
If \(\text{uplo}_g\) is math::uplo::lower, input matrices from array a belonging to group \(g\) store the lower triangular parts.
n
Array of group_count \(n_g\) parameters.
Each \(n_g\) specifies the order of the input matrices belonging to group \(g\).
nrhs
Array of group_count \(\text{nrhs}_g\) parameters.
Each \(rhs_g\) specifies the number of right-hand sides supplied for group \(g\).
lda
Array of group_count \(\text{lda}_g\) parameters.
Each \(\text{lda}_g\) specifies the leading dimensions of the matrices belonging to group \(g\).
ldb
Array of group_count \(\text{ldb}_g\) parameters.
Each \(\text{ldb}_g\) specifies the leading dimensions of the matrices belonging to group \(g\).
group_count

Number of groups of parameters. Must be at least 0.

group_sizes Array of group_count integers. Array element with index \(g\) specifies the number of problems to solve for each of the groups of parameters \(g\). So the total number of problems to solve, batch_size, is a sum of all parameter group sizes.

Return Values

Number of elements of type T the scratchpad memory should able to hold to be passed to the Group API of the potrs_batch function.

Throws

This routine shall throw the following exceptions if the associated condition is detected. An implementation may throw additional implementation-specific exception(s) in case of error conditions not covered here.

oneapi::math::unimplemented

oneapi::math::unsupported_device

oneapi::math::lapack::invalid_argument

Exception is thrown in case of incorrect supplied argument value. Position of wrong argument can be determined by info() method of exception object.

Strided API

Computes the number of elements of type T the scratchpad memory should able to hold to be passed to the Strided API of the potrs_batch function.

Syntax

namespace oneapi::math::lapack {
  template <typename T>
  std::int64_t potrs_batch_scratchpad_size(cl::sycl::queue &queue, math::uplo uplo, std::int64_t n, std::int64_t nrhs, std::int64_t lda, std::int64_t stride_a, std::int64_t ldb, std::int64_t stride_b, std::int64_t batch_size)
};

Input Parameters

queue

Device queue where calculations will be performed.

uplo
Indicates how the input matrices have been factored:
If uplo = math::uplo::upper, the upper triangle \(U_i\) of \(A_i\) is stored, where \(A_i = U_i^TU_i\) for real data, \(A_i = U_i^HU_i\) for complex data.
If uplo = math::uplo::lower, the upper triangle \(L_i\) of \(A_i\) is stored, where \(A_i = L_iL_i^T\) for real data, \(A_i = L_iL_i^H\) for complex data.
n

Order of matrices \(A_i\) (\(0 \le n\)).

nrhs

Number of right-hand sides (\(0 \le \text{nrhs}\)).

lda

Leading dimension of \(A_i\).

stride_a

Stride between the beginnings of matrices inside the batch array a.

ldb

Leading dimensions of \(B_i\).

stride_b

Stride between the beginnings of matrices \(B_i\) inside the batch array b.

batch_size

Number of problems in a batch.

Return Values

Number of elements of type T the scratchpad memory should able to hold to be passed to the Strided API of the potrs_batch function.

Throws

This routine shall throw the following exceptions if the associated condition is detected. An implementation may throw additional implementation-specific exception(s) in case of error conditions not covered here.

oneapi::math::unimplemented

oneapi::math::unsupported_device

oneapi::math::lapack::invalid_argument

Exception is thrown in case of incorrect supplied argument value. Position of wrong argument can be determined by info() method of exception object.

Parent topic: LAPACK-like Extensions Routines