.. SPDX-FileCopyrightText: 2019-2020 Intel Corporation .. .. SPDX-License-Identifier: CC-BY-4.0 .. _onemkl_lapack_potrs_batch_scratchpad_size: potrs_batch_scratchpad_size =========================== Computes size of scratchpad memory required for the :ref:`onemkl_lapack_potrs_batch` function. .. container:: section .. rubric:: Description ``potrs_batch_scratchpad_size`` supports the following precisions. .. list-table:: :header-rows: 1 * - T * - ``float`` * - ``double`` * - ``std::complex`` * - ``std::complex`` **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 :ref:`onemkl_lapack_potrs_batch` function. .. container:: section .. rubric:: Syntax .. code-block:: cpp namespace oneapi::mkl::lapack { template std::int64_t potrs_batch_scratchpad_size(sycl::queue &queue, mkl::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) } .. container:: section .. rubric:: Input Parameters queue Device queue where calculations will be performed. uplo | Array of ``group_count`` :math:`\text{uplo}_g` parameters. | Each of :math:`\text{uplo}_g` indicates whether the upper or lower triangular parts of the input matrices are provided: | If :math:`\text{uplo}_g` is ``mkl::uplo::upper``, input matrices from array ``a`` belonging to group :math:`g` store the upper triangular parts, | If :math:`\text{uplo}_g` is ``mkl::uplo::lower``, input matrices from array ``a`` belonging to group :math:`g` store the lower triangular parts. n | Array of ``group_count`` :math:`n_g` parameters. | Each :math:`n_g` specifies the order of the input matrices belonging to group :math:`g`. nrhs | Array of ``group_count`` :math:`\text{nrhs}_g` parameters. | Each :math:`rhs_g` specifies the number of right-hand sides supplied for group :math:`g`. lda | Array of ``group_count`` :math:`\text{lda}_g` parameters. | Each :math:`\text{lda}_g` specifies the leading dimensions of the matrices belonging to group :math:`g`. ldb | Array of ``group_count`` :math:`\text{ldb}_g` parameters. | Each :math:`\text{ldb}_g` specifies the leading dimensions of the matrices belonging to group :math:`g`. group_count Number of groups of parameters. Must be at least 0. group_sizes Array of group_count integers. Array element with index :math:`g` specifies the number of problems to solve for each of the groups of parameters :math:`g`. So the total number of problems to solve, ``batch_size``, is a sum of all parameter group sizes. .. container:: section .. rubric:: Return Values Number of elements of type ``T`` the scratchpad memory should able to hold to be passed to the Group API of the :ref:`onemkl_lapack_potrs_batch` function. **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 :ref:`onemkl_lapack_potrs_batch` function. .. container:: section .. rubric:: Syntax .. code-block:: cpp namespace oneapi::mkl::lapack { template std::int64_t potrs_batch_scratchpad_size(sycl::queue &queue, mkl::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) }; .. container:: section .. rubric:: Input Parameters queue Device queue where calculations will be performed. uplo | Indicates how the input matrices have been factored: | If ``uplo = mkl::uplo::upper``, the upper triangle :math:`U_i` of :math:`A_i` is stored, where :math:`A_i = U_i^TU_i` for real data, :math:`A_i = U_i^HU_i` for complex data. | If ``uplo = mkl::uplo::lower``, the upper triangle :math:`L_i` of :math:`A_i` is stored, where :math:`A_i = L_iL_i^T` for real data, :math:`A_i = L_iL_i^H` for complex data. n Order of matrices :math:`A_i` (:math:`0 \le n`). nrhs Number of right-hand sides (:math:`0 \le \text{nrhs}`). lda Leading dimension of :math:`A_i`. stride_a Stride between the beginnings of matrices inside the batch array ``a``. ldb Leading dimensions of :math:`B_i`. stride_b Stride between the beginnings of matrices :math:`B_i` inside the batch array ``b``. batch_size Number of problems in a batch. .. container:: section .. rubric:: Return Values Number of elements of type ``T`` the scratchpad memory should able to hold to be passed to the Strided API of the :ref:`onemkl_lapack_potrs_batch` function. **Parent topic:** :ref:`onemkl_lapack-like-extensions-routines`