Skip to content

Commit 69f26df

Browse files
Shabareesh ShettyShabareesh Shetty
authored andcommitted
chore: add ndarray api
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: missing_dependencies - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 0c8b93b commit 69f26df

File tree

2 files changed

+37
-2
lines changed

2 files changed

+37
-2
lines changed

lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy_cblas.c

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,24 @@ void API_SUFFIX(c_zaxpy)( const CBLAS_INT N, const stdlib_complex128_t alpha, vo
3535
stdlib_complex128_t *x = (stdlib_complex128_t *)X;
3636
stdlib_complex128_t *y = (stdlib_complex128_t *)Y;
3737

38-
API_SUFFIX(cblas_zaxpy)( N, alpha, (void *)x, strideX, (void *)y, strideY );
38+
cblas_zaxpy( N, alpha, (void *)x, strideX, (void *)y, strideY );
39+
}
40+
41+
/**
42+
* Scales a double-precision complex floating-point vector by a double-precision complex floating-point constant and adds the result to a double-precision complex floating-point vector using alternative indexing semantics.
43+
*
44+
* @param N number of indexed elements
45+
* @param alpha scalar constant
46+
* @param X input array
47+
* @param strideX X stride length
48+
* @param offsetX starting index for X
49+
* @param Y output array
50+
* @param strideY Y stride length
51+
* @param offsetY starting index for Y
52+
*/
53+
void API_SUFFIX(c_zaxpy_ndarray)( const CBLAS_INT N, const stdlib_complex128_t alpha, const void *X, const CBLAS_INT strideX, const CBLAS_INT offsetX, void *Y, const CBLAS_INT strideY, const CBLAS_INT offsetY ) {
54+
stdlib_complex128_t *x = (stdlib_complex128_t *)X;
55+
stdlib_complex128_t *y = (stdlib_complex128_t *)Y;
56+
57+
cblas_zaxpy( N, alpha, (void *)x, strideX, (void *)y, strideY );
3958
}

lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy_f.c

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,21 @@ void API_SUFFIX(c_zaxpy)( const CBLAS_INT N, const stdlib_complex128_t alpha, co
3636
stdlib_complex128_t *y = (stdlib_complex128_t *)Y;
3737

3838
zaxpy( &N, &alpha, (void *)x, &strideX, (void *)y, &strideY );
39-
return;
39+
}
40+
41+
/**
42+
* Scales a double-precision complex floating-point vector by a double-precision complex floating-point constant and adds the result to a double-precision complex floating-point vector.
43+
*
44+
* @param N number of indexed elements
45+
* @param alpha scalar constant
46+
* @param X input array
47+
* @param strideX X stride length
48+
* @param Y output array
49+
* @param strideY Y stride length
50+
*/
51+
void API_SUFFIX(c_zaxpy_ndarray)( const CBLAS_INT N, const stdlib_complex128_t alpha, const void *X, const CBLAS_INT strideX, const CBLAS_INT offsetX, void *Y, const CBLAS_INT strideY, const CBLAS_INT offsetY ) {
52+
stdlib_complex128_t *x = (stdlib_complex128_t *)X;
53+
stdlib_complex128_t *y = (stdlib_complex128_t *)Y;
54+
55+
zaxpy( N, alpha, (void *)x, strideX, (void *)y, strideY );
4056
}

0 commit comments

Comments
 (0)