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