Lines Matching refs:mRS

107 nScriptIntrinsicBLAS_Single(RS* mRS, RsContext con, RsScript id, RsBlasFunction func, int TransA,
115 tryDispatch(mRS, RS::dispatch->ScriptForEachMulti(con, id, 0, in_allocs, NELEM(in_allocs), nullptr,
121 nScriptIntrinsicBLAS_Double(RS* mRS, RsContext con, RsScript id, RsBlasFunction func, int TransA,
129 tryDispatch(mRS, RS::dispatch->ScriptForEachMulti(con, id, 0, in_allocs, NELEM(in_allocs), nullptr,
134 nScriptIntrinsicBLAS_Complex(RS* mRS, RsContext con, RsScript id, RsBlasFunction func, int TransA,
142 tryDispatch(mRS, RS::dispatch->ScriptForEachMulti(con, id, 0, in_allocs, NELEM(in_allocs), nullptr,
147 nScriptIntrinsicBLAS_Z(RS* mRS, RsContext con, RsScript id, RsBlasFunction func, int TransA,
155 tryDispatch(mRS, RS::dispatch->ScriptForEachMulti(con, id, 0, in_allocs, NELEM(in_allocs), nullptr,
161 nScriptIntrinsicBLAS_BNNM(RS* mRS, RsContext con, RsScript id, int M, int N, int K,
176 tryDispatch(mRS, RS::dispatch->ScriptForEachMulti(con, id, 0, in_allocs, NELEM(in_allocs), nullptr,
183 static void validateGEMV(RS* mRS, const sp<const Element>& e, RsBlasTranspose TransA, const sp<Allocation>& A,
190 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Called BLAS with wrong Element type");
193 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "BLAS vectors must have Y dimension of 0 or 1");
197 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Vector increments must be greater than 0");
209 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Incorrect vector dimensions for GEMV");
215 validateGEMV(mRS, Element::F32(mRS), TransA, A, X, incX, Y, incY);
218 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_sgemv,
226 validateGEMV(mRS, Element::F64(mRS), TransA, A, X, incX, Y, incY);
229 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dgemv,
237 validateGEMV(mRS, Element::F32_2(mRS), TransA, A, X, incX, Y, incY);
240 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_cgemv,
248 validateGEMV(mRS, Element::F64_2(mRS), TransA, A, X, incX, Y, incY);
251 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_zgemv,
260 validateGEMV(mRS, Element::F32(mRS), TransA, A, X, incX, Y, incY);
262 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "KL and KU must be greater than or equal to 0");
267 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_sgbmv,
276 validateGEMV(mRS, Element::F64(mRS), TransA, A, X, incX, Y, incY);
278 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "KL and KU must be greater than or equal to 0");
283 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dgbmv,
292 validateGEMV(mRS, Element::F32_2(mRS), TransA, A, X, incX, Y, incY);
294 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "KL and KU must be greater than or equal to 0");
299 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_cgbmv,
308 validateGEMV(mRS, Element::F64_2(mRS), TransA, A, X, incX, Y, incY);
310 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "KL and KU must be greater than or equal to 0");
315 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_zgbmv,
321 static void validateTRMV(RS* mRS, const sp<const Element>& e, RsBlasUplo Uplo, RsBlasTranspose TransA,
325 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "A must be a square matrix for TRMV");
329 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Called BLAS with wrong Element type");
332 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "BLAS vectors must have Y dimension of 0 or 1");
336 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Vector increments must be greater than 0");
340 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Incorrect vector dimensions for TRMV");
344 static int validateTPMV(RS* mRS, const sp<const Element>& e, RsBlasUplo Uplo, RsBlasTranspose TransA,
348 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Called BLAS with wrong Element type");
351 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "BLAS vectors must have Y dimension of 0 or 1");
355 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Ap must have a Y dimension of 0 or 1");
360 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Invalid dimension for Ap");
363 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Vector increments must be greater than 0");
367 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Incorrect vector dimensions for TPMV");
376 validateTRMV(mRS, Element::F32(mRS), Uplo, TransA, Diag, A, X, incX);
378 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_strmv,
385 validateTRMV(mRS, Element::F64(mRS), Uplo, TransA, Diag, A, X, incX);
387 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dtrmv,
394 validateTRMV(mRS, Element::F32_2(mRS), Uplo, TransA, Diag, A, X, incX);
396 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_ctrmv,
403 validateTRMV(mRS, Element::F64_2(mRS), Uplo, TransA, Diag, A, X, incX);
405 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_ztrmv,
414 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "K must be greater than or equal to 0");
416 validateTRMV(mRS, Element::F32(mRS), Uplo, TransA, Diag, A, X, incX);
418 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_stbmv,
427 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "K must be greater than or equal to 0");
429 validateTRMV(mRS, Element::F64(mRS), Uplo, TransA, Diag, A, X, incX);
431 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dtbmv,
440 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "K must be greater than or equal to 0");
442 validateTRMV(mRS, Element::F32_2(mRS), Uplo, TransA, Diag, A, X, incX);
444 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_ctbmv,
453 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "K must be greater than or equal to 0");
455 validateTRMV(mRS, Element::F64_2(mRS), Uplo, TransA, Diag, A, X, incX);
457 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_ztbmv,
464 int N = validateTPMV(mRS, Element::F32(mRS), Uplo, TransA, Diag, Ap, X, incX);
465 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_stpmv,
472 int N = validateTPMV(mRS, Element::F64(mRS), Uplo, TransA, Diag, Ap, X, incX);
473 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dtpmv,
480 int N = validateTPMV(mRS, Element::F32_2(mRS), Uplo, TransA, Diag, Ap, X, incX);
481 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_ctpmv,
488 int N = validateTPMV(mRS, Element::F64_2(mRS), Uplo, TransA, Diag, Ap, X, incX);
489 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_ztpmv,
497 validateTRMV(mRS, Element::F32(mRS), Uplo, TransA, Diag, A, X, incX);
499 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_strsv,
507 validateTRMV(mRS, Element::F64(mRS), Uplo, TransA, Diag, A, X, incX);
509 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dtrsv,
518 validateTRMV(mRS, Element::F32_2(mRS), Uplo, TransA, Diag, A, X, incX);
520 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_ctrsv,
529 validateTRMV(mRS, Element::F64_2(mRS), Uplo, TransA, Diag, A, X, incX);
531 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_ztrsv,
540 validateTRMV(mRS, Element::F32(mRS), Uplo, TransA, Diag, A, X, incX);
543 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Number of diagonals must be positive");
545 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_stbsv,
553 validateTRMV(mRS, Element::F64(mRS), Uplo, TransA, Diag, A, X, incX);
556 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Number of diagonals must be positive");
558 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dtbsv,
566 validateTRMV(mRS, Element::F32_2(mRS), Uplo, TransA, Diag, A, X, incX);
569 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Number of diagonals must be positive");
571 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_ctbsv,
579 validateTRMV(mRS, Element::F64_2(mRS), Uplo, TransA, Diag, A, X, incX);
582 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Number of diagonals must be positive");
584 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_ztbsv,
592 int N = validateTPMV(mRS, Element::F32(mRS), Uplo, TransA, Diag, Ap, X, incX);
593 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_stpsv,
601 int N = validateTPMV(mRS, Element::F64(mRS), Uplo, TransA, Diag, Ap, X, incX);
602 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dtpsv,
610 int N = validateTPMV(mRS, Element::F32_2(mRS), Uplo, TransA, Diag, Ap, X, incX);
611 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_ctpsv,
619 int N = validateTPMV(mRS, Element::F64_2(mRS), Uplo, TransA, Diag, Ap, X, incX);
620 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_ztpsv,
628 static int validateSYMV(RS* mRS, const sp<const Element>& e, RsBlasUplo Uplo, const sp<Allocation>& A,
632 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "A must be a square matrix for SYMV");
637 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Called BLAS with wrong Element type");
640 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "BLAS vectors must have Y dimension of 0 or 1");
644 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Vector increments must be greater than 0");
648 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Incorrect vector dimensions for SYMV");
652 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Incorrect vector dimensions for SYMV");
656 static int validateSPMV(RS* mRS, const sp<const Element>& e, RsBlasUplo Uplo, const sp<Allocation>& Ap,
661 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Called BLAS with wrong Element type");
664 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "BLAS vectors must have Y dimension of 0 or 1");
668 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Ap must have a Y dimension of 0 or 1");
673 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Invalid dimension for Ap");
676 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Vector increments must be greater than 0");
680 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Incorrect vector dimensions for SPMV");
684 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Incorrect vector dimensions for SPMV");
689 static void validateGER(RS* mRS, const sp<const Element>& e, const sp<Allocation>& X, int incX,
694 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Called BLAS with wrong Element type");
698 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "BLAS vectors must have Y dimension of 0 or 1");
705 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "M and N must be 1 or greater for GER");
708 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Vector increments must be greater than 0");
712 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Incorrect vector dimensions for GER");
716 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Incorrect vector dimensions for GER");
721 static int validateSYR(RS* mRS, const sp<const Element>& e, RsBlasUplo Uplo,
725 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Called BLAS with wrong Element type");
731 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "BLAS vectors must have Y dimension of 0 or 1");
734 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "A must be a symmetric matrix");
737 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Vector increments must be greater than 0");
741 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Incorrect vector dimensions for SYR");
745 static int validateSPR(RS* mRS, const sp<const Element>& e, RsBlasUplo Uplo,
749 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Called BLAS with wrong Element type");
752 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "BLAS vectors must have Y dimension of 0 or 1");
756 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Ap must have a Y dimension of 0 or 1");
761 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Invalid dimension for Ap");
764 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Vector increments must be greater than 0");
768 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Incorrect vector dimensions for SPR");
774 static int validateSYR2(RS* mRS, const sp<const Element>& e, RsBlasUplo Uplo, const sp<Allocation>& X,
779 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Called BLAS with wrong Element type");
783 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "BLAS vectors must have Y dimension of 0 or 1");
789 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "A must be a symmetric matrix");
792 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Vector increments must be greater than 0");
797 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Incorrect vector dimensions for SYR");
802 static int validateSPR2(RS* mRS, const sp<const Element>& e, RsBlasUplo Uplo, const sp<Allocation>& X,
807 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Called BLAS with wrong Element type");
810 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "BLAS vectors must have Y dimension of 0 or 1");
814 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Ap must have a Y dimension of 0 or 1");
819 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Invalid dimension for Ap");
822 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Vector increments must be greater than 0");
827 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Incorrect vector dimensions for SPR2");
835 int N = validateSYMV(mRS, Element::F32(mRS), Uplo, A, X, Y, incX, incY);
836 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_ssymv,
845 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "K must be greater than or equal to 0");
847 int N = validateSYMV(mRS, Element::F32(mRS), Uplo, A, X, Y, incX, incY);
848 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_ssbmv,
855 int N = validateSPMV(mRS, Element::F32(mRS), Uplo, Ap, X, incX, Y, incY);
856 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_sspmv,
865 validateGER(mRS, Element::F32(mRS), X, incX, Y, incY, A);
866 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_sger,
873 int N = validateSYR(mRS, Element::F32(mRS), Uplo, X, incX, A);
874 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_ssyr,
881 int N = validateSPR(mRS, Element::F32(mRS), Uplo, X, incX, Ap);
882 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_sspr,
889 int N = validateSYR2(mRS, Element::F32(mRS), Uplo, X, incX, Y, incY, A);
890 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_ssyr2,
897 int N = validateSPR2(mRS, Element::F32(mRS), Uplo, X, incX, Y, incY, Ap);
898 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_sspr2,
905 int N = validateSYMV(mRS, Element::F64(mRS), Uplo, A, X, Y, incX, incY);
906 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dsymv,
915 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "K must be greater than or equal to 0");
917 int N = validateSYMV(mRS, Element::F64(mRS), Uplo, A, X, Y, incX, incY);
918 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dsbmv,
925 int N = validateSPMV(mRS, Element::F64(mRS), Uplo, Ap, X, incX, Y, incY);
926 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dspmv,
935 validateGER(mRS, Element::F64(mRS), X, incX, Y, incY, A);
936 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dger,
943 int N = validateSYR(mRS, Element::F64(mRS), Uplo, X, incX, A);
944 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dsyr,
951 int N = validateSPR(mRS, Element::F64(mRS), Uplo, X, incX, Ap);
952 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dspr,
959 int N = validateSYR2(mRS, Element::F64(mRS), Uplo, X, incX, Y, incY, A);
960 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dsyr2,
967 int N = validateSPR2(mRS, Element::F64(mRS), Uplo, X, incX, Y, incY, Ap);
968 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dspr2,
978 static void validateGERU(RS* mRS, const sp<const Element>& e, const sp<Allocation>& X, int incX,
983 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Called BLAS with wrong Element type");
986 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "BLAS vectors must have Y dimension of 0 or 1");
992 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Vector increments must be greater than 0");
996 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Incorrect vector dimensions for GERU");
1000 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Incorrect vector dimensions for GERU");
1008 int N = validateSYR2(mRS, Element::F32_2(mRS), Uplo, X, incX, Y, incY, A);
1009 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_chemv,
1018 int N = validateSYR2(mRS, Element::F32_2(mRS), Uplo, X, incX, Y, incY, A);
1020 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "K must be 0 or greater for HBMV");
1022 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_chbmv,
1031 int N = validateSPR2(mRS, Element::F32_2(mRS), Uplo, X, incX, Y, incY, Ap);
1032 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_chpmv,
1040 validateGERU(mRS, Element::F32_2(mRS), X, incX, Y, incY, A);
1043 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_cgeru,
1052 validateGERU(mRS, Element::F32_2(mRS), X, incX, Y, incY, A);
1055 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_cgerc,
1064 int N = validateSYR(mRS, Element::F32_2(mRS), Uplo, X, incX, A);
1065 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_cher,
1074 int N = validateSPR(mRS, Element::F32_2(mRS), Uplo, X, incX, Ap);
1075 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_chpr,
1084 int N = validateSYR2(mRS, Element::F32_2(mRS), Uplo, X, incX, Y, incY, A);
1085 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_cher2,
1094 int N = validateSPR2(mRS, Element::F32_2(mRS), Uplo, X, incX, Y, incY, Ap);
1095 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_chpr2,
1104 int N = validateSYR2(mRS, Element::F64_2(mRS), Uplo, X, incX, Y, incY, A);
1105 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_zhemv,
1114 int N = validateSYR2(mRS, Element::F64_2(mRS), Uplo, X, incX, Y, incY, A);
1116 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "K must be 0 or greater for HBMV");
1118 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_zhbmv,
1127 int N = validateSPR2(mRS, Element::F64_2(mRS), Uplo, X, incX, Y, incY, Ap);
1128 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_zhpmv,
1136 validateGERU(mRS, Element::F64_2(mRS), X, incX, Y, incY, A);
1139 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_zgeru,
1148 validateGERU(mRS, Element::F64_2(mRS), X, incX, Y, incY, A);
1151 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_zgerc,
1160 int N = validateSYR(mRS, Element::F64_2(mRS), Uplo, X, incX, A);
1161 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_zher,
1170 int N = validateSPR(mRS, Element::F64_2(mRS), Uplo, X, incX, Ap);
1171 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_zhpr,
1180 int N = validateSYR2(mRS, Element::F64_2(mRS), Uplo, X, incX, Y, incY, A);
1181 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_zher2,
1190 int N = validateSPR2(mRS, Element::F64_2(mRS), Uplo, X, incX, Y, incY, Ap);
1191 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_zhpr2,
1202 static void validateL3(RS* mRS, const sp<const Element>& e, int TransA, int TransB, int Side,
1208 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Called BLAS with wrong Element type");
1212 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Allocation C cannot be null");
1219 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Provided Matrix A without Matrix B, or vice versa");
1251 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Called BLAS with invalid dimensions");
1256 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Matrix C is not symmetric");
1259 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Called BLAS with invalid dimensions");
1264 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Called BLAS with invalid dimensions");
1272 validateL3(mRS, Element::F32(mRS), TransA, TransB, 0, A, B, C);
1287 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_sgemm,
1295 validateL3(mRS, Element::F64(mRS), TransA, TransB, 0, A, B, C);
1309 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dgemm,
1317 validateL3(mRS, Element::F32_2(mRS), TransA, TransB, 0, A, B, C);
1331 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_cgemm,
1339 validateL3(mRS, Element::F64_2(mRS), TransA, TransB, 0, A, B, C);
1353 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_zgemm,
1363 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Matrix A is not symmetric");
1365 validateL3(mRS, Element::F32(mRS), 0, 0, Side, A, B, C);
1366 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_ssymm,
1375 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Matrix A is not symmetric");
1377 validateL3(mRS, Element::F64(mRS), 0, 0, Side, A, B, C);
1378 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dsymm,
1387 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Matrix A is not symmetric");
1389 validateL3(mRS, Element::F32_2(mRS), 0, 0, Side, A, B, C);
1390 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_csymm,
1399 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Matrix A is not symmetric");
1401 validateL3(mRS, Element::F64_2(mRS), 0, 0, Side, A, B, C);
1402 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_zsymm,
1410 validateL3(mRS, Element::F32(mRS), Trans, 0, 0, A, nullptr, C);
1417 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_ssyrk,
1425 validateL3(mRS, Element::F64(mRS), Trans, 0, 0, A, nullptr, C);
1432 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dsyrk,
1440 validateL3(mRS, Element::F32_2(mRS), Trans, 0, 0, A, nullptr, C);
1447 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_csyrk,
1455 validateL3(mRS, Element::F64_2(mRS), Trans, 0, 0, A, nullptr, C);
1462 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_zsyrk,
1468 static void validateSYR2K(RS* mRS, const sp<const Element>& e, RsBlasTranspose Trans,
1473 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Called BLAS with wrong Element type");
1486 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Invalid symmetric matrix in SYR2K");
1490 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Invalid A and B in SYR2K");
1496 validateSYR2K(mRS, Element::F32(mRS), Trans, A, B, C);
1503 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_ssyr2k,
1511 validateSYR2K(mRS, Element::F64(mRS), Trans, A, B, C);
1518 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dsyr2k,
1526 validateSYR2K(mRS, Element::F32_2(mRS), Trans, A, B, C);
1533 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_csyr2k,
1541 validateSYR2K(mRS, Element::F64_2(mRS), Trans, A, B, C);
1548 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_zsyr2k,
1554 static void validateTRMM(RS* mRS, const sp<const Element>& e, RsBlasSide Side, RsBlasTranspose TransA,
1559 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Called BLAS with wrong Element type");
1565 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Called TRMM with a non-symmetric matrix A");
1572 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Called TRMM with invalid matrices");
1576 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Called TRMM with invalid matrices");
1583 validateTRMM(mRS, Element::F32(mRS), Side, TransA, A, B);
1584 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_strmm,
1592 validateTRMM(mRS, Element::F64(mRS), Side, TransA, A, B);
1593 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dtrmm,
1601 validateTRMM(mRS, Element::F32_2(mRS), Side, TransA, A, B);
1602 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_ctrmm,
1610 validateTRMM(mRS, Element::F64_2(mRS), Side, TransA, A, B);
1611 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_ztrmm,
1617 static void validateTRSM(RS* mRS, const sp<const Element>& e, RsBlasSide Side, RsBlasTranspose TransA,
1622 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Called BLAS with wrong Element type");
1629 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Called TRSM with a non-symmetric matrix A");
1636 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Called TRSM with invalid matrix dimensions");
1641 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Called TRSM with invalid matrix dimensions");
1648 validateTRSM(mRS, Element::F32(mRS), Side, TransA, A, B);
1649 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_strsm,
1657 validateTRSM(mRS, Element::F64(mRS), Side, TransA, A, B);
1658 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dtrsm,
1666 validateTRSM(mRS, Element::F32_2(mRS), Side, TransA, A, B);
1667 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_ctrsm,
1675 validateTRSM(mRS, Element::F64_2(mRS), Side, TransA, A, B);
1676 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_ztrsm,
1682 static void validateHEMM(RS* mRS, const sp<const Element>& e, RsBlasSide Side,
1687 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Called BLAS with wrong Element type");
1693 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Called HEMM with non-square A");
1697 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Called HEMM with invalid B");
1701 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Called HEMM with mismatched B and C");
1707 validateHEMM(mRS, Element::F32_2(mRS), Side, A, B, C);
1708 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_chemm,
1717 validateHEMM(mRS, Element::F64_2(mRS), Side, A, B, C);
1718 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_zhemm,
1725 static void validateHERK(RS* mRS, const sp<const Element>& e, RsBlasTranspose Trans,
1729 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Called BLAS with wrong Element type");
1732 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Call HERK with invalid Transpose");
1736 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Called HERK with non-square C");
1740 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Called HERK with invalid A");
1744 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Called HERK with invalid A");
1751 validateHERK(mRS, Element::F32_2(mRS), Trans, A, C);
1758 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_cherk,
1766 validateHERK(mRS, Element::F64_2(mRS), Trans, A, C);
1773 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_zherk,
1779 static void validateHER2K(RS* mRS, const sp<const Element>& e, RsBlasTranspose Trans,
1784 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Called BLAS with wrong Element type");
1787 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Call HERK with invalid Transpose");
1791 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Called HER2K with non-square C");
1795 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Called HER2K with invalid matrices");
1799 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Called HER2K with invalid matrices");
1803 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Called HER2K with invalid A and B matrices");
1809 validateHER2K(mRS, Element::F32_2(mRS), Trans, A, B, C);
1816 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_cher2k,
1824 validateHER2K(mRS, Element::F64_2(mRS), Trans, A, B, C);
1831 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_zher2k,
1841 validateL3(mRS, Element::U8(mRS), RsBlasNoTrans, RsBlasTrans, 0, A, B, C);
1844 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Invalid a_offset passed to BNNM");
1847 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Invalid b_offset passed to BNNM");
1854 nScriptIntrinsicBLAS_BNNM(mRS, mRS->getContext(), getID(), M, N, K, A->getID(), a_offset,