/aosp_15_r20/frameworks/base/rs/java/android/renderscript/ |
H A D | ScriptIntrinsicBLAS.java | 8 * http://www.apache.org/licenses/LICENSE-2.0 33 * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration 279 …static void validateGEMV(Element e, int TransA, Allocation A, Allocation X, int incX, Allocation Y… in validateGEMV() argument 284 !X.getType().getElement().isCompatible(e) || in validateGEMV() 288 if (X.getType().getY() > 1 || Y.getType().getY() > 1) { in validateGEMV() 295 int expectedXDim = -1, expectedYDim = -1; in validateGEMV() 297 expectedXDim = 1 + (N - 1) * incX; in validateGEMV() 298 expectedYDim = 1 + (M - 1) * incY; in validateGEMV() 300 expectedXDim = 1 + (M - 1) * incX; in validateGEMV() 301 expectedYDim = 1 + (N - 1) * incY; in validateGEMV() [all …]
|
/aosp_15_r20/external/pytorch/aten/src/ATen/native/ |
H A D | Distributions.h | 90 C10_DEVICE scalar_t sample_gamma(scalar_t alpha, BaseSampler<accscalar_t, uniform_sampler_t>& stand… in sample_gamma() argument 93 // Boost alpha for higher acceptance probability. in sample_gamma() 94 if (alpha < 1.0f) { in sample_gamma() 95 if (alpha == 0.f) return 0.f; in sample_gamma() 96 scale *= compat_pow(1 - standard_uniform.sample(), 1.0f / alpha); in sample_gamma() 97 alpha += 1.0f; in sample_gamma() 100 // This implements the acceptance-rejection method of Marsaglia and Tsang (2000) in sample_gamma() 102 const accscalar_t d = alpha - 1.0f / 3.0f; in sample_gamma() 105 accscalar_t x, y; in sample_gamma() local 107 x = standard_normal.sample(); in sample_gamma() [all …]
|
/aosp_15_r20/frameworks/rs/support/java/src/androidx/renderscript/ |
H A D | ScriptIntrinsicBLAS.java | 8 * http://www.apache.org/licenses/LICENSE-2.0 33 * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration 286 …static void validateGEMV(Element e, int TransA, Allocation A, Allocation X, int incX, Allocation Y… 291 !X.getType().getElement().isCompatible(e) || 295 if (X.getType().getY() > 1 || Y.getType().getY() > 1) { 302 int expectedXDim = -1, expectedYDim = -1; 304 expectedXDim = 1 + (N - 1) * incX; 305 expectedYDim = 1 + (M - 1) * incY; 307 expectedXDim = 1 + (M - 1) * incX; 308 expectedYDim = 1 + (N - 1) * incY; [all …]
|
/aosp_15_r20/frameworks/rs/cpp/ |
H A D | rsCppStructs.h | 8 * http://www.apache.org/licenses/LICENSE-2.0 28 * every row in a user-backed allocation must be aligned by this amount. 67 * Flags that can control RenderScript behavior on a per-context level. 80 int8_t x, y; 83 : x(initX), y(initY) {} in Byte2() 84 Byte2() : x(0), y(0) {} in Byte2() 89 int8_t x, y, z; 92 : x(initX), y(initY), z(initZ) {} in Byte3() 93 Byte3() : x(0), y(0), z(0) {} in Byte3() 98 int8_t x, y, z, w; [all …]
|
H A D | ScriptIntrinsicBLAS.cpp | 8 * http://www.apache.org/licenses/LICENSE-2.0 71 // For Single-precision BLAS. in setUpBLASCall() 72 call.alpha.f = alphaF; in setUpBLASCall() 76 // For Double-precision BLAS. in setUpBLASCall() 77 call.alpha.d = alphaD; in setUpBLASCall() 81 // For Single-precision complex BLAS. in setUpBLASCall() 82 call.alpha.c.r = alphaCX; in setUpBLASCall() 83 call.alpha.c.i = alphaCY; in setUpBLASCall() 88 // For Double-precision complex BLAS. in setUpBLASCall() 89 call.alpha.z.r = alphaZX; in setUpBLASCall() [all …]
|
/aosp_15_r20/external/skia/src/core/ |
H A D | SkAlphaRuns.h | 4 * Use of this source code is governed by a BSD-style license that can be 19 /** Sparse array of run-length-encoded alpha (supersampling coverage) values. 29 // Return 0-255 given 0-256 30 static inline SkAlpha CatchOverflow(int alpha) { in CatchOverflow() argument 31 SkASSERT(alpha >= 0 && alpha <= 256); in CatchOverflow() 32 return alpha - (alpha >> 8); in CatchOverflow() 36 /// of alpha value 0. 46 * Insert into the buffer a run starting at (x-offsetX): 58 SK_ALWAYS_INLINE int add(int x, U8CPU startAlpha, int middleCount, U8CPU stopAlpha, in add() argument 61 SkASSERT(x >= 0 && x + (startAlpha != 0) + middleCount + (stopAlpha != 0) <= fWidth); in add() [all …]
|
H A D | SkScan_AAAPath.cpp | 4 * Use of this source code is governed by a BSD-style license that can be 35 The following is a high-level overview of our analytic anti-aliasing 38 generality, let's assume that the draw region is [0, W] x [0, H]. 41 sampling-based algorithm did. However, our algorithm uses non-equal-spaced 42 scan lines, while the previous method always uses equal-spaced scan lines, 43 such as (y = 1/2 + 0, 1/2 + 1, 1/2 + 2, ...) in the previous non-AA algorithm, 45 16-supersampling AA algorithm. 63 (e.g., [0, 1] x [c_i, c_{i+1}]) and our trapezoid. However, that intersection 66 +-----------\----+ 74 +----\-----------+ [all …]
|
/aosp_15_r20/external/tensorflow/tensorflow/compiler/xla/stream_executor/ |
H A D | blas.h | 7 http://www.apache.org/licenses/LICENSE-2.0 16 // Exposes the family of BLAS routines as pre-canned high performance calls for 23 // a Stream -- users typically will not use this API directly, but will use the 27 // DeviceMemory<float> x = stream_exec->AllocateArray<float>(1024); 28 // DeviceMemory<float> y = stream_exec->AllocateArray<float>(1024); 29 // // ... populate x and y ... 33 // .ThenBlasAxpy(1024, 5.5, x, 1, &y, 1); 37 // kernel launches (via StreamExecutor::ThenLaunch()) with these pre-canned BLAS 69 using DeviceMemorySlice = port::ArraySlice<DeviceMemory<T> *>; // non-absl ok 106 kF16, // 16-bit floating-point [all …]
|
/aosp_15_r20/frameworks/rs/cpu_ref/ |
H A D | rsCpuIntrinsicBLAS.cpp | 8 * http://www.apache.org/licenses/LICENSE-2.0 60 s->mHal.info.exportedVariableCount = 0; in populateScript() 73 *A = ain[0]->mHal.drvState.lod[0].mallocPtr; in initABC() 74 *lda = (int)(ain[0]->mHal.drvState.lod[0].stride/size); in initABC() 77 *B = ain[1]->mHal.drvState.lod[0].mallocPtr; in initABC() 78 *ldb = (int)(ain[1]->mHal.drvState.lod[0].stride/size); in initABC() 81 *C = ain[2]->mHal.drvState.lod[0].mallocPtr; in initABC() 82 *ldc = (int)(ain[2]->mHal.drvState.lod[0].stride/size); in initABC() 90 mm = call->M; in setupGEMM() 91 nn = call->N; in setupGEMM() [all …]
|
/aosp_15_r20/cts/tests/tests/rsblas/assets/ |
H A D | blas_gen.py | 8 # http://www.apache.org/licenses/LICENSE-2.0 33 for i in range(0, a.shape[0]-1): 49 a[i, j] = complex(a[j, i].real, -a[j, i].imag); 182 # Write a float band matrix into a given file, in a banded-storage form. 189 for j in range(max(0, i-kl), min(i+ku+1, n)): 190 b[i, j-i+kl] = a[i, j] 194 for j in range(max(0, i-kl), min(i+ku+1, n)): 195 a[i, j] = b[i, j-i+kl] 197 # Write a double band matrix into a given file, in a banded-storage form. 204 for j in range(max(0, i-kl), min(i+ku+1, n)): [all …]
|
/aosp_15_r20/external/cblas/testing/ |
H A D | c_s2chke.c | 30 X[2] = {0.0,0.0}, in F77_s2chke() local 32 ALPHA=0.0, BETA=0.0; in F77_s2chke() local 50 ALPHA, A, 1, X, 1, BETA, Y, 1 ); in F77_s2chke() 54 ALPHA, A, 1, X, 1, BETA, Y, 1 ); in F77_s2chke() 58 ALPHA, A, 1, X, 1, BETA, Y, 1 ); in F77_s2chke() 62 ALPHA, A, 1, X, 1, BETA, Y, 1 ); in F77_s2chke() 66 ALPHA, A, 1, X, 1, BETA, Y, 1 ); in F77_s2chke() 70 ALPHA, A, 1, X, 0, BETA, Y, 1 ); in F77_s2chke() 74 ALPHA, A, 1, X, 1, BETA, Y, 0 ); in F77_s2chke() 79 ALPHA, A, 1, X, 1, BETA, Y, 1 ); in F77_s2chke() [all …]
|
H A D | c_d2chke.c | 30 X[2] = {0.0,0.0}, in F77_d2chke() local 32 ALPHA=0.0, BETA=0.0; in F77_d2chke() local 50 ALPHA, A, 1, X, 1, BETA, Y, 1 ); in F77_d2chke() 54 ALPHA, A, 1, X, 1, BETA, Y, 1 ); in F77_d2chke() 58 ALPHA, A, 1, X, 1, BETA, Y, 1 ); in F77_d2chke() 62 ALPHA, A, 1, X, 1, BETA, Y, 1 ); in F77_d2chke() 66 ALPHA, A, 1, X, 1, BETA, Y, 1 ); in F77_d2chke() 70 ALPHA, A, 1, X, 0, BETA, Y, 1 ); in F77_d2chke() 74 ALPHA, A, 1, X, 1, BETA, Y, 0 ); in F77_d2chke() 79 ALPHA, A, 1, X, 1, BETA, Y, 1 ); in F77_d2chke() [all …]
|
H A D | c_c2chke.c | 30 X[2] = {0.0,0.0}, in F77_c2chke() local 32 ALPHA[2] = {0.0,0.0}, in F77_c2chke() local 52 ALPHA, A, 1, X, 1, BETA, Y, 1 ); in F77_c2chke() 56 ALPHA, A, 1, X, 1, BETA, Y, 1 ); in F77_c2chke() 60 ALPHA, A, 1, X, 1, BETA, Y, 1 ); in F77_c2chke() 64 ALPHA, A, 1, X, 1, BETA, Y, 1 ); in F77_c2chke() 68 ALPHA, A, 1, X, 1, BETA, Y, 1 ); in F77_c2chke() 72 ALPHA, A, 1, X, 0, BETA, Y, 1 ); in F77_c2chke() 76 ALPHA, A, 1, X, 1, BETA, Y, 0 ); in F77_c2chke() 81 ALPHA, A, 1, X, 1, BETA, Y, 1 ); in F77_c2chke() [all …]
|
H A D | c_z2chke.c | 30 X[2] = {0.0,0.0}, in F77_z2chke() local 32 ALPHA[2] = {0.0,0.0}, in F77_z2chke() local 52 ALPHA, A, 1, X, 1, BETA, Y, 1 ); in F77_z2chke() 56 ALPHA, A, 1, X, 1, BETA, Y, 1 ); in F77_z2chke() 60 ALPHA, A, 1, X, 1, BETA, Y, 1 ); in F77_z2chke() 64 ALPHA, A, 1, X, 1, BETA, Y, 1 ); in F77_z2chke() 68 ALPHA, A, 1, X, 1, BETA, Y, 1 ); in F77_z2chke() 72 ALPHA, A, 1, X, 0, BETA, Y, 1 ); in F77_z2chke() 76 ALPHA, A, 1, X, 1, BETA, Y, 0 ); in F77_z2chke() 81 ALPHA, A, 1, X, 1, BETA, Y, 1 ); in F77_z2chke() [all …]
|
/aosp_15_r20/external/tensorflow/tensorflow/python/kernel_tests/distributions/ |
H A D | dirichlet_test.py | 7 # http://www.apache.org/licenses/LICENSE-2.0 31 def try_import(name): # pylint: disable=invalid-name 48 alpha = np.random.rand(3) 49 dist = dirichlet_lib.Dirichlet(alpha) 56 alpha = np.random.rand(3, 2, 2) 57 dist = dirichlet_lib.Dirichlet(alpha) 64 alpha = [[1., 2, 3]] 65 dist = dirichlet_lib.Dirichlet(alpha) 67 self.assertAllClose(alpha, self.evaluate(dist.concentration)) 70 alpha = [[1., 2, 3]] [all …]
|
/aosp_15_r20/external/eigen/blas/ |
H A D | level2_cplx_impl.h | 4 // Copyright (C) 2009-2010 Gael Guennebaud <[email protected]> 12 /** ZHEMV performs the matrix-vector operation 14 * y := alpha*A*x + beta*y, 16 * where alpha and beta are scalars, x and y are n element vectors and 31 const Scalar* x = reinterpret_cast<const Scalar*>(px); in EIGEN_BLAS_FUNC() local 33 Scalar alpha = *reinterpret_cast<const Scalar*>(palpha); in EIGEN_BLAS_FUNC() local 49 const Scalar* actual_x = get_compact_vector(x,*n,*incx); in EIGEN_BLAS_FUNC() 58 if(alpha!=Scalar(0)) in EIGEN_BLAS_FUNC() 64 func[code](*n, a, *lda, actual_x, actual_y, alpha); in EIGEN_BLAS_FUNC() 67 if(actual_x!=x) delete[] actual_x; in EIGEN_BLAS_FUNC() [all …]
|
/aosp_15_r20/external/eigen/blas/testing/ |
H A D | dblat2.f | 6 * http://www.netlib.org/lapack/explore-html/ 22 *> of the file are read using list-directed input, the last 16 records 29 *> -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0) 39 *> 1 2 -1 -2 VALUES OF INCX AND INCY 40 *> 3 NUMBER OF VALUES OF ALPHA 41 *> 0.0 1.0 0.7 VALUES OF ALPHA 78 *> Street, Suite 100, Downers Grove, Illinois 60515-1263, USA. 81 *> -- Written on 10-August-1987. 85 *> 10-9-00: Change STATUS='NEW' to 'UNKNOWN' so that the testers 105 * -- Reference BLAS test routine (version 3.4.1) -- [all …]
|
H A D | sblat2.f | 6 * http://www.netlib.org/lapack/explore-html/ 22 *> of the file are read using list-directed input, the last 16 records 29 *> -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0) 39 *> 1 2 -1 -2 VALUES OF INCX AND INCY 40 *> 3 NUMBER OF VALUES OF ALPHA 41 *> 0.0 1.0 0.7 VALUES OF ALPHA 78 *> Street, Suite 100, Downers Grove, Illinois 60515-1263, USA. 81 *> -- Written on 10-August-1987. 85 *> 10-9-00: Change STATUS='NEW' to 'UNKNOWN' so that the testers 105 * -- Reference BLAS test routine (version 3.4.1) -- [all …]
|
H A D | zblat2.f | 6 * http://www.netlib.org/lapack/explore-html/ 22 *> of the file are read using list-directed input, the last 17 records 29 *> -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0) 39 *> 1 2 -1 -2 VALUES OF INCX AND INCY 40 *> 3 NUMBER OF VALUES OF ALPHA 41 *> (0.0,0.0) (1.0,0.0) (0.7,-0.9) VALUES OF ALPHA 43 *> (0.0,0.0) (1.0,0.0) (1.3,-1.1) VALUES OF BETA 79 *> Street, Suite 100, Downers Grove, Illinois 60515-1263, USA. 82 *> -- Written on 10-August-1987. 86 *> 10-9-00: Change STATUS='NEW' to 'UNKNOWN' so that the testers [all …]
|
H A D | cblat2.f | 6 * http://www.netlib.org/lapack/explore-html/ 22 *> of the file are read using list-directed input, the last 17 records 29 *> -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0) 39 *> 1 2 -1 -2 VALUES OF INCX AND INCY 40 *> 3 NUMBER OF VALUES OF ALPHA 41 *> (0.0,0.0) (1.0,0.0) (0.7,-0.9) VALUES OF ALPHA 43 *> (0.0,0.0) (1.0,0.0) (1.3,-1.1) VALUES OF BETA 79 *> Street, Suite 100, Downers Grove, Illinois 60515-1263, USA. 82 *> -- Written on 10-August-1987. 86 *> 10-9-00: Change STATUS='NEW' to 'UNKNOWN' so that the testers [all …]
|
/aosp_15_r20/external/tensorflow/tensorflow/stream_executor/rocm/ |
H A D | rocm_blas.cc | 7 http://www.apache.org/licenses/LICENSE-2.0 206 bool ROCMBlas::DoBlasAxpy(Stream *stream, uint64_t elem_count, float alpha, in DoBlasAxpy() argument 207 const DeviceMemory<float> &x, int incx, in DoBlasAxpy() argument 211 /* pointer_mode_host = */ true, elem_count, &alpha, in DoBlasAxpy() 212 GpuMemory(x), incx, GpuMemoryMutable(y), incy); in DoBlasAxpy() 215 bool ROCMBlas::DoBlasAxpy(Stream *stream, uint64_t elem_count, double alpha, in DoBlasAxpy() argument 216 const DeviceMemory<double> &x, int incx, in DoBlasAxpy() argument 220 /* pointer_mode_host = */ true, elem_count, &alpha, in DoBlasAxpy() 221 GpuMemory(x), incx, GpuMemoryMutable(y), incy); in DoBlasAxpy() 225 std::complex<float> alpha, in DoBlasAxpy() argument [all …]
|
/aosp_15_r20/external/eigen/blas/f2c/ |
H A D | zhpmv.c | 1 /* zhpmv.f -- translated by f2c (version 20100827). 4 on Linux or Unix systems, link with .../path/to/libf2c.a -lm 5 or, if you install libf2c.a in a standard place, with -lf2c -lm 6 -- in that order, at the end of the command line, as in 7 cc *.o -lf2c -lm 15 /* Subroutine */ int zhpmv_(char *uplo, integer *n, doublecomplex *alpha, in zhpmv_() argument 16 doublecomplex *ap, doublecomplex *x, integer *incx, doublecomplex * in zhpmv_() argument 41 /* ZHPMV performs the matrix-vector operation */ in zhpmv_() 43 /* y := alpha*A*x + beta*y, */ in zhpmv_() 45 /* where alpha and beta are scalars, x and y are n element vectors and */ in zhpmv_() [all …]
|
H A D | chpmv.c | 1 /* chpmv.f -- translated by f2c (version 20100827). 4 on Linux or Unix systems, link with .../path/to/libf2c.a -lm 5 or, if you install libf2c.a in a standard place, with -lf2c -lm 6 -- in that order, at the end of the command line, as in 7 cc *.o -lf2c -lm 15 /* Subroutine */ int chpmv_(char *uplo, integer *n, complex *alpha, complex * in chpmv_() argument 16 ap, complex *x, integer *incx, complex *beta, complex *y, integer * in chpmv_() argument 41 /* CHPMV performs the matrix-vector operation */ in chpmv_() 43 /* y := alpha*A*x + beta*y, */ in chpmv_() 45 /* where alpha and beta are scalars, x and y are n element vectors and */ in chpmv_() [all …]
|
H A D | chbmv.c | 1 /* chbmv.f -- translated by f2c (version 20100827). 4 on Linux or Unix systems, link with .../path/to/libf2c.a -lm 5 or, if you install libf2c.a in a standard place, with -lf2c -lm 6 -- in that order, at the end of the command line, as in 7 cc *.o -lf2c -lm 16 alpha, complex *a, integer *lda, complex *x, integer *incx, complex * in chbmv_() argument 42 /* CHBMV performs the matrix-vector operation */ in chbmv_() 44 /* y := alpha*A*x + beta*y, */ in chbmv_() 46 /* where alpha and beta are scalars, x and y are n element vectors and */ in chbmv_() 47 /* A is an n by n hermitian band matrix, with k super-diagonals. */ in chbmv_() [all …]
|
/aosp_15_r20/external/webp/src/enc/ |
H A D | picture_tools_enc.c | 3 // Use of this source code is governed by a BSD-style license 8 // ----------------------------------------------------------------------------- 10 // WebPPicture tools: alpha handling, etc. 19 //------------------------------------------------------------------------------ 25 int y, x; in IsTransparentARGBArea() local 27 for (x = 0; x < size; ++x) { in IsTransparentARGBArea() 28 if (ptr[x] & 0xff000000u) { in IsTransparentARGBArea() 46 int x, y; in FlattenARGB() local 48 for (x = 0; x < size; ++x) ptr[x] = v; in FlattenARGB() 58 int x, y; in SmoothenBlock() local [all …]
|