Lines Matching refs:mRS
99 nScriptIntrinsicBLAS_Single(RS* mRS, RsContext con, RsScript id, RsBlasFunction func, int TransA, in nScriptIntrinsicBLAS_Single() argument
107 …tryDispatch(mRS, RS::dispatch->ScriptForEachMulti(con, id, 0, in_allocs, sizeof(in_allocs), nullpt… in nScriptIntrinsicBLAS_Single()
113 nScriptIntrinsicBLAS_Double(RS* mRS, RsContext con, RsScript id, RsBlasFunction func, int TransA, in nScriptIntrinsicBLAS_Double() argument
121 …tryDispatch(mRS, RS::dispatch->ScriptForEachMulti(con, id, 0, in_allocs, sizeof(in_allocs), nullpt… in nScriptIntrinsicBLAS_Double()
126 nScriptIntrinsicBLAS_Complex(RS* mRS, RsContext con, RsScript id, RsBlasFunction func, int TransA, in nScriptIntrinsicBLAS_Complex() argument
134 …tryDispatch(mRS, RS::dispatch->ScriptForEachMulti(con, id, 0, in_allocs, sizeof(in_allocs), nullpt… in nScriptIntrinsicBLAS_Complex()
139 nScriptIntrinsicBLAS_Z(RS* mRS, RsContext con, RsScript id, RsBlasFunction func, int TransA, in nScriptIntrinsicBLAS_Z() argument
147 …tryDispatch(mRS, RS::dispatch->ScriptForEachMulti(con, id, 0, in_allocs, sizeof(in_allocs), nullpt… in nScriptIntrinsicBLAS_Z()
153 nScriptIntrinsicBLAS_BNNM(RS* mRS, RsContext con, RsScript id, int M, int N, int K, in nScriptIntrinsicBLAS_BNNM() argument
168 …tryDispatch(mRS, RS::dispatch->ScriptForEachMulti(con, id, 0, in_allocs, sizeof(in_allocs), nullpt… in nScriptIntrinsicBLAS_BNNM()
175 static void validateGEMV(RS* mRS, sp<const Element> e, RsBlasTranspose TransA, sp<Allocation> A, in validateGEMV() argument
182 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Called BLAS with wrong Element type"); in validateGEMV()
185 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "BLAS vectors must have Y dimension of 0 or 1"); in validateGEMV()
189 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Vector increments must be greater than 0"); in validateGEMV()
201 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Incorrect vector dimensions for GEMV"); in validateGEMV()
207 validateGEMV(mRS, Element::F32(mRS), TransA, A, X, incX, Y, incY); in SGEMV()
210 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_sgemv, in SGEMV()
218 validateGEMV(mRS, Element::F64(mRS), TransA, A, X, incX, Y, incY); in DGEMV()
221 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dgemv, in DGEMV()
229 validateGEMV(mRS, Element::F32_2(mRS), TransA, A, X, incX, Y, incY); in CGEMV()
232 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_cgemv, in CGEMV()
240 validateGEMV(mRS, Element::F64_2(mRS), TransA, A, X, incX, Y, incY); in ZGEMV()
243 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_zgemv, in ZGEMV()
252 validateGEMV(mRS, Element::F32(mRS), TransA, A, X, incX, Y, incY); in SGBMV()
254 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "KL and KU must be greater than or equal to 0"); in SGBMV()
259 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_sgbmv, in SGBMV()
268 validateGEMV(mRS, Element::F64(mRS), TransA, A, X, incX, Y, incY); in DGBMV()
270 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "KL and KU must be greater than or equal to 0"); in DGBMV()
275 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dgbmv, in DGBMV()
284 validateGEMV(mRS, Element::F32_2(mRS), TransA, A, X, incX, Y, incY); in CGBMV()
286 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "KL and KU must be greater than or equal to 0"); in CGBMV()
291 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_cgbmv, in CGBMV()
300 validateGEMV(mRS, Element::F64_2(mRS), TransA, A, X, incX, Y, incY); in ZGBMV()
302 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "KL and KU must be greater than or equal to 0"); in ZGBMV()
307 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_zgbmv, in ZGBMV()
313 static void validateTRMV(RS* mRS, sp<const Element> e, RsBlasUplo Uplo, RsBlasTranspose TransA, in validateTRMV() argument
317 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "A must be a square matrix for TRMV"); in validateTRMV()
321 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Called BLAS with wrong Element type"); in validateTRMV()
324 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "BLAS vectors must have Y dimension of 0 or 1"); in validateTRMV()
328 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Vector increments must be greater than 0"); in validateTRMV()
332 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Incorrect vector dimensions for TRMV"); in validateTRMV()
336 static int validateTPMV(RS* mRS, sp<const Element> e, RsBlasUplo Uplo, RsBlasTranspose TransA, in validateTPMV() argument
340 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Called BLAS with wrong Element type"); in validateTPMV()
343 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "BLAS vectors must have Y dimension of 0 or 1"); in validateTPMV()
347 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Ap must have a Y dimension of 0 or 1"); in validateTPMV()
352 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Invalid dimension for Ap"); in validateTPMV()
355 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Vector increments must be greater than 0"); in validateTPMV()
359 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Incorrect vector dimensions for TPMV"); in validateTPMV()
368 validateTRMV(mRS, Element::F32(mRS), Uplo, TransA, Diag, A, X, incX); in STRMV()
370 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_strmv, in STRMV()
377 validateTRMV(mRS, Element::F64(mRS), Uplo, TransA, Diag, A, X, incX); in DTRMV()
379 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dtrmv, in DTRMV()
386 validateTRMV(mRS, Element::F32_2(mRS), Uplo, TransA, Diag, A, X, incX); in CTRMV()
388 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_ctrmv, in CTRMV()
395 validateTRMV(mRS, Element::F64_2(mRS), Uplo, TransA, Diag, A, X, incX); in ZTRMV()
397 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_ztrmv, in ZTRMV()
406 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "K must be greater than or equal to 0"); in STBMV()
408 validateTRMV(mRS, Element::F32(mRS), Uplo, TransA, Diag, A, X, incX); in STBMV()
410 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_stbmv, in STBMV()
419 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "K must be greater than or equal to 0"); in DTBMV()
421 validateTRMV(mRS, Element::F64(mRS), Uplo, TransA, Diag, A, X, incX); in DTBMV()
423 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dtbmv, in DTBMV()
432 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "K must be greater than or equal to 0"); in CTBMV()
434 validateTRMV(mRS, Element::F32_2(mRS), Uplo, TransA, Diag, A, X, incX); in CTBMV()
436 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_ctbmv, in CTBMV()
445 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "K must be greater than or equal to 0"); in ZTBMV()
447 validateTRMV(mRS, Element::F64_2(mRS), Uplo, TransA, Diag, A, X, incX); in ZTBMV()
449 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_ztbmv, in ZTBMV()
456 int N = validateTPMV(mRS, Element::F32(mRS), Uplo, TransA, Diag, Ap, X, incX); in STPMV()
457 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_stpmv, in STPMV()
464 int N = validateTPMV(mRS, Element::F64(mRS), Uplo, TransA, Diag, Ap, X, incX); in DTPMV()
465 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dtpmv, in DTPMV()
472 int N = validateTPMV(mRS, Element::F32_2(mRS), Uplo, TransA, Diag, Ap, X, incX); in CTPMV()
473 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_ctpmv, in CTPMV()
480 int N = validateTPMV(mRS, Element::F64_2(mRS), Uplo, TransA, Diag, Ap, X, incX); in ZTPMV()
481 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_ztpmv, in ZTPMV()
489 validateTRMV(mRS, Element::F32(mRS), Uplo, TransA, Diag, A, X, incX); in STRSV()
491 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_strsv, in STRSV()
499 validateTRMV(mRS, Element::F64(mRS), Uplo, TransA, Diag, A, X, incX); in DTRSV()
501 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dtrsv, in DTRSV()
510 validateTRMV(mRS, Element::F32_2(mRS), Uplo, TransA, Diag, A, X, incX); in CTRSV()
512 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_ctrsv, in CTRSV()
521 validateTRMV(mRS, Element::F64_2(mRS), Uplo, TransA, Diag, A, X, incX); in ZTRSV()
523 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_ztrsv, in ZTRSV()
532 validateTRMV(mRS, Element::F32(mRS), Uplo, TransA, Diag, A, X, incX); in STBSV()
535 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Number of diagonals must be positive"); in STBSV()
537 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_stbsv, in STBSV()
545 validateTRMV(mRS, Element::F64(mRS), Uplo, TransA, Diag, A, X, incX); in DTBSV()
548 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Number of diagonals must be positive"); in DTBSV()
550 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dtbsv, in DTBSV()
558 validateTRMV(mRS, Element::F32_2(mRS), Uplo, TransA, Diag, A, X, incX); in CTBSV()
561 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Number of diagonals must be positive"); in CTBSV()
563 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_ctbsv, in CTBSV()
571 validateTRMV(mRS, Element::F64_2(mRS), Uplo, TransA, Diag, A, X, incX); in ZTBSV()
574 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Number of diagonals must be positive"); in ZTBSV()
576 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_ztbsv, in ZTBSV()
584 int N = validateTPMV(mRS, Element::F32(mRS), Uplo, TransA, Diag, Ap, X, incX); in STPSV()
585 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_stpsv, in STPSV()
593 int N = validateTPMV(mRS, Element::F64(mRS), Uplo, TransA, Diag, Ap, X, incX); in DTPSV()
594 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dtpsv, in DTPSV()
602 int N = validateTPMV(mRS, Element::F32_2(mRS), Uplo, TransA, Diag, Ap, X, incX); in CTPSV()
603 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_ctpsv, in CTPSV()
611 int N = validateTPMV(mRS, Element::F64_2(mRS), Uplo, TransA, Diag, Ap, X, incX); in ZTPSV()
612 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_ztpsv, in ZTPSV()
620 static int validateSYMV(RS* mRS, sp<const Element> e, RsBlasUplo Uplo, sp<Allocation> A, in validateSYMV() argument
624 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "A must be a square matrix for SYMV"); in validateSYMV()
629 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Called BLAS with wrong Element type"); in validateSYMV()
632 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "BLAS vectors must have Y dimension of 0 or 1"); in validateSYMV()
636 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Vector increments must be greater than 0"); in validateSYMV()
640 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Incorrect vector dimensions for SYMV"); in validateSYMV()
644 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Incorrect vector dimensions for SYMV"); in validateSYMV()
648 static int validateSPMV(RS* mRS, sp<const Element> e, RsBlasUplo Uplo, sp<Allocation> Ap, in validateSPMV() argument
653 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Called BLAS with wrong Element type"); in validateSPMV()
656 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "BLAS vectors must have Y dimension of 0 or 1"); in validateSPMV()
660 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Ap must have a Y dimension of 0 or 1"); in validateSPMV()
665 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Invalid dimension for Ap"); in validateSPMV()
668 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Vector increments must be greater than 0"); in validateSPMV()
672 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Incorrect vector dimensions for SPMV"); in validateSPMV()
676 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Incorrect vector dimensions for SPMV"); in validateSPMV()
681 static void validateGER(RS* mRS, sp<const Element> e, sp<Allocation> X, int incX, in validateGER() argument
686 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Called BLAS with wrong Element type"); in validateGER()
690 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "BLAS vectors must have Y dimension of 0 or 1"); in validateGER()
697 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "M and N must be 1 or greater for GER"); in validateGER()
700 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Vector increments must be greater than 0"); in validateGER()
704 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Incorrect vector dimensions for GER"); in validateGER()
708 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Incorrect vector dimensions for GER"); in validateGER()
713 static int validateSYR(RS* mRS, sp<const Element> e, RsBlasUplo Uplo, in validateSYR() argument
717 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Called BLAS with wrong Element type"); in validateSYR()
723 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "BLAS vectors must have Y dimension of 0 or 1"); in validateSYR()
726 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "A must be a symmetric matrix"); in validateSYR()
729 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Vector increments must be greater than 0"); in validateSYR()
733 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Incorrect vector dimensions for SYR"); in validateSYR()
737 static int validateSPR(RS* mRS, sp<const Element> e, RsBlasUplo Uplo, in validateSPR() argument
741 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Called BLAS with wrong Element type"); in validateSPR()
744 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "BLAS vectors must have Y dimension of 0 or 1"); in validateSPR()
748 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Ap must have a Y dimension of 0 or 1"); in validateSPR()
753 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Invalid dimension for Ap"); in validateSPR()
756 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Vector increments must be greater than 0"); in validateSPR()
760 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Incorrect vector dimensions for SPR"); in validateSPR()
766 static int validateSYR2(RS* mRS, sp<const Element> e, RsBlasUplo Uplo, sp<Allocation> X, in validateSYR2() argument
771 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Called BLAS with wrong Element type"); in validateSYR2()
775 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "BLAS vectors must have Y dimension of 0 or 1"); in validateSYR2()
781 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "A must be a symmetric matrix"); in validateSYR2()
784 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Vector increments must be greater than 0"); in validateSYR2()
789 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Incorrect vector dimensions for SYR"); in validateSYR2()
794 static int validateSPR2(RS* mRS, sp<const Element> e, RsBlasUplo Uplo, sp<Allocation> X, in validateSPR2() argument
799 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Called BLAS with wrong Element type"); in validateSPR2()
802 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "BLAS vectors must have Y dimension of 0 or 1"); in validateSPR2()
806 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Ap must have a Y dimension of 0 or 1"); in validateSPR2()
811 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Invalid dimension for Ap"); in validateSPR2()
814 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Vector increments must be greater than 0"); in validateSPR2()
819 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Incorrect vector dimensions for SPR2"); in validateSPR2()
827 int N = validateSYMV(mRS, Element::F32(mRS), Uplo, A, X, Y, incX, incY); in SSYMV()
828 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_ssymv, in SSYMV()
837 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "K must be greater than or equal to 0"); in SSBMV()
839 int N = validateSYMV(mRS, Element::F32(mRS), Uplo, A, X, Y, incX, incY); in SSBMV()
840 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_ssbmv, in SSBMV()
847 int N = validateSPMV(mRS, Element::F32(mRS), Uplo, Ap, X, incX, Y, incY); in SSPMV()
848 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_sspmv, in SSPMV()
857 validateGER(mRS, Element::F32(mRS), X, incX, Y, incY, A); in SGER()
858 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_sger, in SGER()
865 int N = validateSYR(mRS, Element::F32(mRS), Uplo, X, incX, A); in SSYR()
866 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_ssyr, in SSYR()
873 int N = validateSPR(mRS, Element::F32(mRS), Uplo, X, incX, Ap); in SSPR()
874 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_sspr, in SSPR()
881 int N = validateSYR2(mRS, Element::F32(mRS), Uplo, X, incX, Y, incY, A); in SSYR2()
882 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_ssyr2, in SSYR2()
889 int N = validateSPR2(mRS, Element::F32(mRS), Uplo, X, incX, Y, incY, Ap); in SSPR2()
890 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_sspr2, in SSPR2()
897 int N = validateSYMV(mRS, Element::F64(mRS), Uplo, A, X, Y, incX, incY); in DSYMV()
898 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dsymv, in DSYMV()
907 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "K must be greater than or equal to 0"); in DSBMV()
909 int N = validateSYMV(mRS, Element::F64(mRS), Uplo, A, X, Y, incX, incY); in DSBMV()
910 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dsbmv, in DSBMV()
917 int N = validateSPMV(mRS, Element::F64(mRS), Uplo, Ap, X, incX, Y, incY); in DSPMV()
918 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dspmv, in DSPMV()
927 validateGER(mRS, Element::F64(mRS), X, incX, Y, incY, A); in DGER()
928 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dger, in DGER()
935 int N = validateSYR(mRS, Element::F64(mRS), Uplo, X, incX, A); in DSYR()
936 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dsyr, in DSYR()
943 int N = validateSPR(mRS, Element::F64(mRS), Uplo, X, incX, Ap); in DSPR()
944 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dspr, in DSPR()
951 int N = validateSYR2(mRS, Element::F64(mRS), Uplo, X, incX, Y, incY, A); in DSYR2()
952 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dsyr2, in DSYR2()
959 int N = validateSPR2(mRS, Element::F64(mRS), Uplo, X, incX, Y, incY, Ap); in DSPR2()
960 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dspr2, in DSPR2()
970 static void validateGERU(RS* mRS, sp<const Element> e, sp<Allocation> X, int incX, in validateGERU() argument
975 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Called BLAS with wrong Element type"); in validateGERU()
978 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "BLAS vectors must have Y dimension of 0 or 1"); in validateGERU()
984 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Vector increments must be greater than 0"); in validateGERU()
988 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Incorrect vector dimensions for GERU"); in validateGERU()
992 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Incorrect vector dimensions for GERU"); in validateGERU()
1000 int N = validateSYR2(mRS, Element::F32_2(mRS), Uplo, X, incX, Y, incY, A); in CHEMV()
1001 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_chemv, in CHEMV()
1010 int N = validateSYR2(mRS, Element::F32_2(mRS), Uplo, X, incX, Y, incY, A); in CHBMV()
1012 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "K must be 0 or greater for HBMV"); in CHBMV()
1014 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_chbmv, in CHBMV()
1023 int N = validateSPR2(mRS, Element::F32_2(mRS), Uplo, X, incX, Y, incY, Ap); in CHPMV()
1024 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_chpmv, in CHPMV()
1032 validateGERU(mRS, Element::F32_2(mRS), X, incX, Y, incY, A); in CGERU()
1035 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_cgeru, in CGERU()
1044 validateGERU(mRS, Element::F32_2(mRS), X, incX, Y, incY, A); in CGERC()
1047 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_cgerc, in CGERC()
1056 int N = validateSYR(mRS, Element::F32_2(mRS), Uplo, X, incX, A); in CHER()
1057 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_cher, in CHER()
1066 int N = validateSPR(mRS, Element::F32_2(mRS), Uplo, X, incX, Ap); in CHPR()
1067 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_chpr, in CHPR()
1076 int N = validateSYR2(mRS, Element::F32_2(mRS), Uplo, X, incX, Y, incY, A); in CHER2()
1077 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_cher2, in CHER2()
1086 int N = validateSPR2(mRS, Element::F32_2(mRS), Uplo, X, incX, Y, incY, Ap); in CHPR2()
1087 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_chpr2, in CHPR2()
1096 int N = validateSYR2(mRS, Element::F64_2(mRS), Uplo, X, incX, Y, incY, A); in ZHEMV()
1097 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_zhemv, in ZHEMV()
1106 int N = validateSYR2(mRS, Element::F64_2(mRS), Uplo, X, incX, Y, incY, A); in ZHBMV()
1108 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "K must be 0 or greater for HBMV"); in ZHBMV()
1110 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_zhbmv, in ZHBMV()
1119 int N = validateSPR2(mRS, Element::F64_2(mRS), Uplo, X, incX, Y, incY, Ap); in ZHPMV()
1120 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_zhpmv, in ZHPMV()
1128 validateGERU(mRS, Element::F64_2(mRS), X, incX, Y, incY, A); in ZGERU()
1131 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_zgeru, in ZGERU()
1140 validateGERU(mRS, Element::F64_2(mRS), X, incX, Y, incY, A); in ZGERC()
1143 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_zgerc, in ZGERC()
1152 int N = validateSYR(mRS, Element::F64_2(mRS), Uplo, X, incX, A); in ZHER()
1153 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_zher, in ZHER()
1162 int N = validateSPR(mRS, Element::F64_2(mRS), Uplo, X, incX, Ap); in ZHPR()
1163 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_zhpr, in ZHPR()
1172 int N = validateSYR2(mRS, Element::F64_2(mRS), Uplo, X, incX, Y, incY, A); in ZHER2()
1173 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_zher2, in ZHER2()
1182 int N = validateSPR2(mRS, Element::F64_2(mRS), Uplo, X, incX, Y, incY, Ap); in ZHPR2()
1183 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_zhpr2, in ZHPR2()
1194 static void validateL3(RS* mRS, sp<const Element> e, int TransA, int TransB, int Side, in validateL3() argument
1200 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Called BLAS with wrong Element type"); in validateL3()
1204 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Allocation C cannot be null"); in validateL3()
1211 … mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Provided Matrix A without Matrix B, or vice versa"); in validateL3()
1243 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Called BLAS with invalid dimensions"); in validateL3()
1248 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Matrix C is not symmetric"); in validateL3()
1251 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Called BLAS with invalid dimensions"); in validateL3()
1256 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Called BLAS with invalid dimensions"); in validateL3()
1264 validateL3(mRS, Element::F32(mRS), TransA, TransB, 0, A, B, C); in SGEMM()
1279 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_sgemm, in SGEMM()
1287 validateL3(mRS, Element::F64(mRS), TransA, TransB, 0, A, B, C); in DGEMM()
1301 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dgemm, in DGEMM()
1309 validateL3(mRS, Element::F32_2(mRS), TransA, TransB, 0, A, B, C); in CGEMM()
1323 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_cgemm, in CGEMM()
1331 validateL3(mRS, Element::F64_2(mRS), TransA, TransB, 0, A, B, C); in ZGEMM()
1345 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_zgemm, in ZGEMM()
1355 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Matrix A is not symmetric"); in SSYMM()
1357 validateL3(mRS, Element::F32(mRS), 0, 0, Side, A, B, C); in SSYMM()
1358 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_ssymm, in SSYMM()
1367 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Matrix A is not symmetric"); in DSYMM()
1369 validateL3(mRS, Element::F64(mRS), 0, 0, Side, A, B, C); in DSYMM()
1370 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dsymm, in DSYMM()
1379 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Matrix A is not symmetric"); in CSYMM()
1381 validateL3(mRS, Element::F32_2(mRS), 0, 0, Side, A, B, C); in CSYMM()
1382 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_csymm, in CSYMM()
1391 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Matrix A is not symmetric"); in ZSYMM()
1393 validateL3(mRS, Element::F64_2(mRS), 0, 0, Side, A, B, C); in ZSYMM()
1394 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_zsymm, in ZSYMM()
1402 validateL3(mRS, Element::F32(mRS), Trans, 0, 0, A, nullptr, C); in SSYRK()
1409 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_ssyrk, in SSYRK()
1417 validateL3(mRS, Element::F64(mRS), Trans, 0, 0, A, nullptr, C); in DSYRK()
1424 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dsyrk, in DSYRK()
1432 validateL3(mRS, Element::F32_2(mRS), Trans, 0, 0, A, nullptr, C); in CSYRK()
1439 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_csyrk, in CSYRK()
1447 validateL3(mRS, Element::F64_2(mRS), Trans, 0, 0, A, nullptr, C); in ZSYRK()
1454 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_zsyrk, in ZSYRK()
1460 static void validateSYR2K(RS* mRS, sp<const Element> e, RsBlasTranspose Trans, in validateSYR2K() argument
1465 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Called BLAS with wrong Element type"); in validateSYR2K()
1478 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Invalid symmetric matrix in SYR2K"); in validateSYR2K()
1482 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Invalid A and B in SYR2K"); in validateSYR2K()
1488 validateSYR2K(mRS, Element::F32(mRS), Trans, A, B, C); in SSYR2K()
1495 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_ssyr2k, in SSYR2K()
1503 validateSYR2K(mRS, Element::F64(mRS), Trans, A, B, C); in DSYR2K()
1510 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dsyr2k, in DSYR2K()
1518 validateSYR2K(mRS, Element::F32_2(mRS), Trans, A, B, C); in CSYR2K()
1525 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_csyr2k, in CSYR2K()
1533 validateSYR2K(mRS, Element::F64_2(mRS), Trans, A, B, C); in ZSYR2K()
1540 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_zsyr2k, in ZSYR2K()
1546 static void validateTRMM(RS* mRS, sp<const Element> e, RsBlasSide Side, RsBlasTranspose TransA, in validateTRMM() argument
1551 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Called BLAS with wrong Element type"); in validateTRMM()
1557 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Called TRMM with a non-symmetric matrix A"); in validateTRMM()
1564 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Called TRMM with invalid matrices"); in validateTRMM()
1568 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Called TRMM with invalid matrices"); in validateTRMM()
1575 validateTRMM(mRS, Element::F32(mRS), Side, TransA, A, B); in STRMM()
1576 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_strmm, in STRMM()
1584 validateTRMM(mRS, Element::F64(mRS), Side, TransA, A, B); in DTRMM()
1585 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dtrmm, in DTRMM()
1593 validateTRMM(mRS, Element::F32_2(mRS), Side, TransA, A, B); in CTRMM()
1594 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_ctrmm, in CTRMM()
1602 validateTRMM(mRS, Element::F64_2(mRS), Side, TransA, A, B); in ZTRMM()
1603 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_ztrmm, in ZTRMM()
1609 static void validateTRSM(RS* mRS, sp<const Element> e, RsBlasSide Side, RsBlasTranspose TransA, in validateTRSM() argument
1614 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Called BLAS with wrong Element type"); in validateTRSM()
1621 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Called TRSM with a non-symmetric matrix A"); in validateTRSM()
1628 … mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Called TRSM with invalid matrix dimensions"); in validateTRSM()
1633 … mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Called TRSM with invalid matrix dimensions"); in validateTRSM()
1640 validateTRSM(mRS, Element::F32(mRS), Side, TransA, A, B); in STRSM()
1641 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_strsm, in STRSM()
1649 validateTRSM(mRS, Element::F64(mRS), Side, TransA, A, B); in DTRSM()
1650 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dtrsm, in DTRSM()
1658 validateTRSM(mRS, Element::F32_2(mRS), Side, TransA, A, B); in CTRSM()
1659 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_ctrsm, in CTRSM()
1667 validateTRSM(mRS, Element::F64_2(mRS), Side, TransA, A, B); in ZTRSM()
1668 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_ztrsm, in ZTRSM()
1674 static void validateHEMM(RS* mRS, sp<const Element> e, RsBlasSide Side, in validateHEMM() argument
1679 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Called BLAS with wrong Element type"); in validateHEMM()
1685 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Called HEMM with non-square A"); in validateHEMM()
1689 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Called HEMM with invalid B"); in validateHEMM()
1693 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Called HEMM with mismatched B and C"); in validateHEMM()
1699 validateHEMM(mRS, Element::F32_2(mRS), Side, A, B, C); in CHEMM()
1700 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_chemm, in CHEMM()
1709 validateHEMM(mRS, Element::F64_2(mRS), Side, A, B, C); in ZHEMM()
1710 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_zhemm, in ZHEMM()
1717 static void validateHERK(RS* mRS, sp<const Element> e, RsBlasTranspose Trans, in validateHERK() argument
1721 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Called BLAS with wrong Element type"); in validateHERK()
1724 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Call HERK with invalid Transpose"); in validateHERK()
1728 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Called HERK with non-square C"); in validateHERK()
1732 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Called HERK with invalid A"); in validateHERK()
1736 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Called HERK with invalid A"); in validateHERK()
1743 validateHERK(mRS, Element::F32_2(mRS), Trans, A, C); in CHERK()
1750 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_cherk, in CHERK()
1758 validateHERK(mRS, Element::F64_2(mRS), Trans, A, C); in ZHERK()
1765 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_zherk, in ZHERK()
1771 static void validateHER2K(RS* mRS, sp<const Element> e, RsBlasTranspose Trans, in validateHER2K() argument
1776 mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Called BLAS with wrong Element type"); in validateHER2K()
1779 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Call HERK with invalid Transpose"); in validateHER2K()
1783 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Called HER2K with non-square C"); in validateHER2K()
1787 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Called HER2K with invalid matrices"); in validateHER2K()
1791 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Called HER2K with invalid matrices"); in validateHER2K()
1795 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Called HER2K with invalid A and B matrices"); in validateHER2K()
1801 validateHER2K(mRS, Element::F32_2(mRS), Trans, A, B, C); in CHER2K()
1808 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_cher2k, in CHER2K()
1816 validateHER2K(mRS, Element::F64_2(mRS), Trans, A, B, C); in ZHER2K()
1823 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_zher2k, in ZHER2K()
1833 validateL3(mRS, Element::U8(mRS), RsBlasNoTrans, RsBlasTrans, 0, A, B, C); in BNNM()
1836 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Invalid a_offset passed to BNNM"); in BNNM()
1839 mRS->throwError(RS_ERROR_INVALID_PARAMETER, "Invalid b_offset passed to BNNM"); in BNNM()
1846 nScriptIntrinsicBLAS_BNNM(mRS, mRS->getContext(), getID(), M, N, K, A->getID(), a_offset, in BNNM()