Skip to content

Commit 0538961

Browse files
committed
feat: add C implementation for blas/base/zdscal
1 parent 63756c5 commit 0538961

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/**
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2024 The Stdlib Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
#include "stdlib/blas/base/zdscal.h"
20+
#include "stdlib/blas/base/shared.h"
21+
#include "stdlib/complex/float64/base/scale.h"
22+
23+
/**
24+
* Scales a double-precision complex floating-point vector by a double-precision floating-point constant using alternative indexing semantics.
25+
*
26+
* @param N number of indexed elements
27+
* @param alpha constant
28+
* @param X input array
29+
* @param strideX X stride length
30+
* @param offsetX starting index for X
31+
*/
32+
void API_SUFFIX(c_zdscal_ndarray)( const CBLAS_INT N, const double alpha, void *X, const CBLAS_INT strideX, const CBLAS_INT offsetX ) {
33+
double *x = (double *)X;
34+
CBLAS_INT ix;
35+
CBLAS_INT sx;
36+
CBLAS_INT i;
37+
double tmp;
38+
39+
if ( N <= 0 || alpha == 1.0 ) {
40+
return;
41+
}
42+
sx = strideX * 2;
43+
ix = offsetX * 2;
44+
for ( i = 0; i < N; i++ ) {
45+
}
46+
return;
47+
}

0 commit comments

Comments
 (0)