am e2341e2b
: am 634160a0
: Merge "[RenderScript] Fix HEMM and SYRK in IntrinscBLAS to correctly handle complex \'Alpha\' and \'Beta\'" into mnc-dev
* commit 'e2341e2b0532b0f50c91419432c82aefc1ef8eb4': [RenderScript] Fix HEMM and SYRK in IntrinscBLAS to correctly handle complex 'Alpha' and 'Beta'
This commit is contained in:
@ -28170,12 +28170,12 @@ package android.renderscript {
|
|||||||
public final class ScriptIntrinsicBLAS extends android.renderscript.ScriptIntrinsic {
|
public final class ScriptIntrinsicBLAS extends android.renderscript.ScriptIntrinsic {
|
||||||
method public void BNNM(android.renderscript.Allocation, int, android.renderscript.Allocation, int, android.renderscript.Allocation, int, int);
|
method public void BNNM(android.renderscript.Allocation, int, android.renderscript.Allocation, int, android.renderscript.Allocation, int, int);
|
||||||
method public void CGEMM(int, int, android.renderscript.Float2, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Float2, android.renderscript.Allocation);
|
method public void CGEMM(int, int, android.renderscript.Float2, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Float2, android.renderscript.Allocation);
|
||||||
method public void CHEMM(int, int, float, android.renderscript.Allocation, android.renderscript.Allocation, float, android.renderscript.Allocation);
|
method public void CHEMM(int, int, android.renderscript.Float2, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Float2, android.renderscript.Allocation);
|
||||||
method public void CHER2K(int, int, android.renderscript.Float2, android.renderscript.Allocation, android.renderscript.Allocation, float, android.renderscript.Allocation);
|
method public void CHER2K(int, int, android.renderscript.Float2, android.renderscript.Allocation, android.renderscript.Allocation, float, android.renderscript.Allocation);
|
||||||
method public void CHERK(int, int, float, android.renderscript.Allocation, float, android.renderscript.Allocation);
|
method public void CHERK(int, int, float, android.renderscript.Allocation, float, android.renderscript.Allocation);
|
||||||
method public void CSYMM(int, int, android.renderscript.Float2, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Float2, android.renderscript.Allocation);
|
method public void CSYMM(int, int, android.renderscript.Float2, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Float2, android.renderscript.Allocation);
|
||||||
method public void CSYR2K(int, int, android.renderscript.Float2, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Float2, android.renderscript.Allocation);
|
method public void CSYR2K(int, int, android.renderscript.Float2, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Float2, android.renderscript.Allocation);
|
||||||
method public void CSYRK(int, int, float, float, android.renderscript.Allocation, float, float, android.renderscript.Allocation);
|
method public void CSYRK(int, int, android.renderscript.Float2, android.renderscript.Allocation, android.renderscript.Float2, android.renderscript.Allocation);
|
||||||
method public void CTRMM(int, int, int, int, android.renderscript.Float2, android.renderscript.Allocation, android.renderscript.Allocation);
|
method public void CTRMM(int, int, int, int, android.renderscript.Float2, android.renderscript.Allocation, android.renderscript.Allocation);
|
||||||
method public void CTRSM(int, int, int, int, android.renderscript.Float2, android.renderscript.Allocation, android.renderscript.Allocation);
|
method public void CTRSM(int, int, int, int, android.renderscript.Float2, android.renderscript.Allocation, android.renderscript.Allocation);
|
||||||
method public void DGEMM(int, int, double, android.renderscript.Allocation, android.renderscript.Allocation, double, android.renderscript.Allocation);
|
method public void DGEMM(int, int, double, android.renderscript.Allocation, android.renderscript.Allocation, double, android.renderscript.Allocation);
|
||||||
@ -28191,12 +28191,12 @@ package android.renderscript {
|
|||||||
method public void STRMM(int, int, int, int, float, android.renderscript.Allocation, android.renderscript.Allocation);
|
method public void STRMM(int, int, int, int, float, android.renderscript.Allocation, android.renderscript.Allocation);
|
||||||
method public void STRSM(int, int, int, int, float, android.renderscript.Allocation, android.renderscript.Allocation);
|
method public void STRSM(int, int, int, int, float, android.renderscript.Allocation, android.renderscript.Allocation);
|
||||||
method public void ZGEMM(int, int, android.renderscript.Double2, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Double2, android.renderscript.Allocation);
|
method public void ZGEMM(int, int, android.renderscript.Double2, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Double2, android.renderscript.Allocation);
|
||||||
method public void ZHEMM(int, int, double, android.renderscript.Allocation, android.renderscript.Allocation, double, android.renderscript.Allocation);
|
method public void ZHEMM(int, int, android.renderscript.Double2, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Double2, android.renderscript.Allocation);
|
||||||
method public void ZHER2K(int, int, android.renderscript.Double2, android.renderscript.Allocation, android.renderscript.Allocation, double, android.renderscript.Allocation);
|
method public void ZHER2K(int, int, android.renderscript.Double2, android.renderscript.Allocation, android.renderscript.Allocation, double, android.renderscript.Allocation);
|
||||||
method public void ZHERK(int, int, double, android.renderscript.Allocation, double, android.renderscript.Allocation);
|
method public void ZHERK(int, int, double, android.renderscript.Allocation, double, android.renderscript.Allocation);
|
||||||
method public void ZSYMM(int, int, android.renderscript.Double2, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Double2, android.renderscript.Allocation);
|
method public void ZSYMM(int, int, android.renderscript.Double2, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Double2, android.renderscript.Allocation);
|
||||||
method public void ZSYR2K(int, int, android.renderscript.Double2, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Double2, android.renderscript.Allocation);
|
method public void ZSYR2K(int, int, android.renderscript.Double2, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Double2, android.renderscript.Allocation);
|
||||||
method public void ZSYRK(int, int, double, double, android.renderscript.Allocation, double, double, android.renderscript.Allocation);
|
method public void ZSYRK(int, int, android.renderscript.Double2, android.renderscript.Allocation, android.renderscript.Double2, android.renderscript.Allocation);
|
||||||
method public void ZTRMM(int, int, int, int, android.renderscript.Double2, android.renderscript.Allocation, android.renderscript.Allocation);
|
method public void ZTRMM(int, int, int, int, android.renderscript.Double2, android.renderscript.Allocation, android.renderscript.Allocation);
|
||||||
method public void ZTRSM(int, int, int, int, android.renderscript.Double2, android.renderscript.Allocation, android.renderscript.Allocation);
|
method public void ZTRSM(int, int, int, int, android.renderscript.Double2, android.renderscript.Allocation, android.renderscript.Allocation);
|
||||||
method public static android.renderscript.ScriptIntrinsicBLAS create(android.renderscript.RenderScript);
|
method public static android.renderscript.ScriptIntrinsicBLAS create(android.renderscript.RenderScript);
|
||||||
|
@ -30183,12 +30183,12 @@ package android.renderscript {
|
|||||||
public final class ScriptIntrinsicBLAS extends android.renderscript.ScriptIntrinsic {
|
public final class ScriptIntrinsicBLAS extends android.renderscript.ScriptIntrinsic {
|
||||||
method public void BNNM(android.renderscript.Allocation, int, android.renderscript.Allocation, int, android.renderscript.Allocation, int, int);
|
method public void BNNM(android.renderscript.Allocation, int, android.renderscript.Allocation, int, android.renderscript.Allocation, int, int);
|
||||||
method public void CGEMM(int, int, android.renderscript.Float2, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Float2, android.renderscript.Allocation);
|
method public void CGEMM(int, int, android.renderscript.Float2, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Float2, android.renderscript.Allocation);
|
||||||
method public void CHEMM(int, int, float, android.renderscript.Allocation, android.renderscript.Allocation, float, android.renderscript.Allocation);
|
method public void CHEMM(int, int, android.renderscript.Float2, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Float2, android.renderscript.Allocation);
|
||||||
method public void CHER2K(int, int, android.renderscript.Float2, android.renderscript.Allocation, android.renderscript.Allocation, float, android.renderscript.Allocation);
|
method public void CHER2K(int, int, android.renderscript.Float2, android.renderscript.Allocation, android.renderscript.Allocation, float, android.renderscript.Allocation);
|
||||||
method public void CHERK(int, int, float, android.renderscript.Allocation, float, android.renderscript.Allocation);
|
method public void CHERK(int, int, float, android.renderscript.Allocation, float, android.renderscript.Allocation);
|
||||||
method public void CSYMM(int, int, android.renderscript.Float2, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Float2, android.renderscript.Allocation);
|
method public void CSYMM(int, int, android.renderscript.Float2, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Float2, android.renderscript.Allocation);
|
||||||
method public void CSYR2K(int, int, android.renderscript.Float2, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Float2, android.renderscript.Allocation);
|
method public void CSYR2K(int, int, android.renderscript.Float2, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Float2, android.renderscript.Allocation);
|
||||||
method public void CSYRK(int, int, float, float, android.renderscript.Allocation, float, float, android.renderscript.Allocation);
|
method public void CSYRK(int, int, android.renderscript.Float2, android.renderscript.Allocation, android.renderscript.Float2, android.renderscript.Allocation);
|
||||||
method public void CTRMM(int, int, int, int, android.renderscript.Float2, android.renderscript.Allocation, android.renderscript.Allocation);
|
method public void CTRMM(int, int, int, int, android.renderscript.Float2, android.renderscript.Allocation, android.renderscript.Allocation);
|
||||||
method public void CTRSM(int, int, int, int, android.renderscript.Float2, android.renderscript.Allocation, android.renderscript.Allocation);
|
method public void CTRSM(int, int, int, int, android.renderscript.Float2, android.renderscript.Allocation, android.renderscript.Allocation);
|
||||||
method public void DGEMM(int, int, double, android.renderscript.Allocation, android.renderscript.Allocation, double, android.renderscript.Allocation);
|
method public void DGEMM(int, int, double, android.renderscript.Allocation, android.renderscript.Allocation, double, android.renderscript.Allocation);
|
||||||
@ -30204,12 +30204,12 @@ package android.renderscript {
|
|||||||
method public void STRMM(int, int, int, int, float, android.renderscript.Allocation, android.renderscript.Allocation);
|
method public void STRMM(int, int, int, int, float, android.renderscript.Allocation, android.renderscript.Allocation);
|
||||||
method public void STRSM(int, int, int, int, float, android.renderscript.Allocation, android.renderscript.Allocation);
|
method public void STRSM(int, int, int, int, float, android.renderscript.Allocation, android.renderscript.Allocation);
|
||||||
method public void ZGEMM(int, int, android.renderscript.Double2, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Double2, android.renderscript.Allocation);
|
method public void ZGEMM(int, int, android.renderscript.Double2, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Double2, android.renderscript.Allocation);
|
||||||
method public void ZHEMM(int, int, double, android.renderscript.Allocation, android.renderscript.Allocation, double, android.renderscript.Allocation);
|
method public void ZHEMM(int, int, android.renderscript.Double2, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Double2, android.renderscript.Allocation);
|
||||||
method public void ZHER2K(int, int, android.renderscript.Double2, android.renderscript.Allocation, android.renderscript.Allocation, double, android.renderscript.Allocation);
|
method public void ZHER2K(int, int, android.renderscript.Double2, android.renderscript.Allocation, android.renderscript.Allocation, double, android.renderscript.Allocation);
|
||||||
method public void ZHERK(int, int, double, android.renderscript.Allocation, double, android.renderscript.Allocation);
|
method public void ZHERK(int, int, double, android.renderscript.Allocation, double, android.renderscript.Allocation);
|
||||||
method public void ZSYMM(int, int, android.renderscript.Double2, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Double2, android.renderscript.Allocation);
|
method public void ZSYMM(int, int, android.renderscript.Double2, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Double2, android.renderscript.Allocation);
|
||||||
method public void ZSYR2K(int, int, android.renderscript.Double2, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Double2, android.renderscript.Allocation);
|
method public void ZSYR2K(int, int, android.renderscript.Double2, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Double2, android.renderscript.Allocation);
|
||||||
method public void ZSYRK(int, int, double, double, android.renderscript.Allocation, double, double, android.renderscript.Allocation);
|
method public void ZSYRK(int, int, android.renderscript.Double2, android.renderscript.Allocation, android.renderscript.Double2, android.renderscript.Allocation);
|
||||||
method public void ZTRMM(int, int, int, int, android.renderscript.Double2, android.renderscript.Allocation, android.renderscript.Allocation);
|
method public void ZTRMM(int, int, int, int, android.renderscript.Double2, android.renderscript.Allocation, android.renderscript.Allocation);
|
||||||
method public void ZTRSM(int, int, int, int, android.renderscript.Double2, android.renderscript.Allocation, android.renderscript.Allocation);
|
method public void ZTRSM(int, int, int, int, android.renderscript.Double2, android.renderscript.Allocation, android.renderscript.Allocation);
|
||||||
method public static android.renderscript.ScriptIntrinsicBLAS create(android.renderscript.RenderScript);
|
method public static android.renderscript.ScriptIntrinsicBLAS create(android.renderscript.RenderScript);
|
||||||
|
@ -1145,7 +1145,7 @@ public final class ScriptIntrinsicBLAS extends ScriptIntrinsic {
|
|||||||
}
|
}
|
||||||
mRS.nScriptIntrinsicBLAS_Double(getID(mRS), RsBlas_dsyrk, Trans, 0, 0, Uplo, 0, 0, C.getType().getX(), K, alpha, A.getID(mRS), 0, beta, C.getID(mRS), 0, 0, 0, 0);
|
mRS.nScriptIntrinsicBLAS_Double(getID(mRS), RsBlas_dsyrk, Trans, 0, 0, Uplo, 0, 0, C.getType().getX(), K, alpha, A.getID(mRS), 0, beta, C.getID(mRS), 0, 0, 0, 0);
|
||||||
}
|
}
|
||||||
public void CSYRK(@Uplo int Uplo, @Transpose int Trans, float alphaX, float alphaY, Allocation A, float betaX, float betaY, Allocation C) {
|
public void CSYRK(@Uplo int Uplo, @Transpose int Trans, Float2 alpha, Allocation A, Float2 beta, Allocation C) {
|
||||||
validateTranspose(Trans);
|
validateTranspose(Trans);
|
||||||
validateUplo(Uplo);
|
validateUplo(Uplo);
|
||||||
validateL3(Element.F32_2(mRS), Trans, 0, 0, A, null, C);
|
validateL3(Element.F32_2(mRS), Trans, 0, 0, A, null, C);
|
||||||
@ -1155,10 +1155,10 @@ public final class ScriptIntrinsicBLAS extends ScriptIntrinsic {
|
|||||||
} else {
|
} else {
|
||||||
K = A.getType().getX();
|
K = A.getType().getX();
|
||||||
}
|
}
|
||||||
mRS.nScriptIntrinsicBLAS_Complex(getID(mRS), RsBlas_csyrk, Trans, 0, 0, Uplo, 0, 0, C.getType().getX(), K, alphaX, alphaY, A.getID(mRS), 0, betaX, betaY,
|
mRS.nScriptIntrinsicBLAS_Complex(getID(mRS), RsBlas_csyrk, Trans, 0, 0, Uplo, 0, 0, C.getType().getX(), K, alpha.x, alpha.y, A.getID(mRS), 0, beta.x, beta.y,
|
||||||
C.getID(mRS), 0, 0, 0, 0);
|
C.getID(mRS), 0, 0, 0, 0);
|
||||||
}
|
}
|
||||||
public void ZSYRK(@Uplo int Uplo, @Transpose int Trans, double alphaX, double alphaY, Allocation A, double betaX, double betaY, Allocation C) {
|
public void ZSYRK(@Uplo int Uplo, @Transpose int Trans, Double2 alpha, Allocation A, Double2 beta, Allocation C) {
|
||||||
validateTranspose(Trans);
|
validateTranspose(Trans);
|
||||||
validateUplo(Uplo);
|
validateUplo(Uplo);
|
||||||
validateL3(Element.F64_2(mRS), Trans, 0, 0, A, null, C);
|
validateL3(Element.F64_2(mRS), Trans, 0, 0, A, null, C);
|
||||||
@ -1168,7 +1168,7 @@ public final class ScriptIntrinsicBLAS extends ScriptIntrinsic {
|
|||||||
} else {
|
} else {
|
||||||
K = A.getType().getX();
|
K = A.getType().getX();
|
||||||
}
|
}
|
||||||
mRS.nScriptIntrinsicBLAS_Z(getID(mRS), RsBlas_zsyrk, Trans, 0, 0, Uplo, 0, 0, C.getType().getX(), K, alphaX, alphaY, A.getID(mRS), 0, betaX, betaY,
|
mRS.nScriptIntrinsicBLAS_Z(getID(mRS), RsBlas_zsyrk, Trans, 0, 0, Uplo, 0, 0, C.getType().getX(), K, alpha.x, alpha.y, A.getID(mRS), 0, beta.x, beta.y,
|
||||||
C.getID(mRS), 0, 0, 0, 0);
|
C.getID(mRS), 0, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1379,17 +1379,17 @@ public final class ScriptIntrinsicBLAS extends ScriptIntrinsic {
|
|||||||
throw new RSRuntimeException("Called HEMM with mismatched B and C");
|
throw new RSRuntimeException("Called HEMM with mismatched B and C");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void CHEMM(@Side int Side, @Uplo int Uplo, float alpha, Allocation A, Allocation B, float beta, Allocation C) {
|
public void CHEMM(@Side int Side, @Uplo int Uplo, Float2 alpha, Allocation A, Allocation B, Float2 beta, Allocation C) {
|
||||||
validateUplo(Uplo);
|
validateUplo(Uplo);
|
||||||
validateHEMM(Element.F32_2(mRS), Side, A, B, C);
|
validateHEMM(Element.F32_2(mRS), Side, A, B, C);
|
||||||
mRS.nScriptIntrinsicBLAS_Complex(getID(mRS), RsBlas_chemm, 0, 0, Side, Uplo, 0, C.getType().getY(), C.getType().getX(), 0,
|
mRS.nScriptIntrinsicBLAS_Complex(getID(mRS), RsBlas_chemm, 0, 0, Side, Uplo, 0, C.getType().getY(), C.getType().getX(), 0,
|
||||||
alpha, 0, A.getID(mRS), B.getID(mRS), beta, 0, C.getID(mRS), 0, 0, 0, 0);
|
alpha.x, alpha.y, A.getID(mRS), B.getID(mRS), beta.x, beta.y, C.getID(mRS), 0, 0, 0, 0);
|
||||||
}
|
}
|
||||||
public void ZHEMM(@Side int Side, @Uplo int Uplo, double alpha, Allocation A, Allocation B, double beta, Allocation C) {
|
public void ZHEMM(@Side int Side, @Uplo int Uplo, Double2 alpha, Allocation A, Allocation B, Double2 beta, Allocation C) {
|
||||||
validateUplo(Uplo);
|
validateUplo(Uplo);
|
||||||
validateHEMM(Element.F32_2(mRS), Side, A, B, C);
|
validateHEMM(Element.F32_2(mRS), Side, A, B, C);
|
||||||
mRS.nScriptIntrinsicBLAS_Z(getID(mRS), RsBlas_zhemm, 0, 0, Side, Uplo, 0, C.getType().getY(), C.getType().getX(), 0,
|
mRS.nScriptIntrinsicBLAS_Z(getID(mRS), RsBlas_zhemm, 0, 0, Side, Uplo, 0, C.getType().getY(), C.getType().getX(), 0,
|
||||||
alpha, 0, A.getID(mRS), B.getID(mRS), beta, 0, C.getID(mRS), 0, 0, 0, 0);
|
alpha.x, alpha.y, A.getID(mRS), B.getID(mRS), beta.x, beta.y, C.getID(mRS), 0, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void validateHERK(Element e, @Transpose int Trans, Allocation A, Allocation C) {
|
static void validateHERK(Element e, @Transpose int Trans, Allocation A, Allocation C) {
|
||||||
|
Reference in New Issue
Block a user