Skip to content

Commit eab9a77

Browse files
authored
Rename the local utility function to my_?copy to avoid symbol clash with the BLAS function
1 parent 37a4ca7 commit eab9a77

File tree

10 files changed

+6522
-6522
lines changed

10 files changed

+6522
-6522
lines changed

utest/test_extensions/common.c

Lines changed: 259 additions & 259 deletions
Large diffs are not rendered by default.

utest/test_extensions/common.h

Lines changed: 76 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,76 @@
1-
/*****************************************************************************
2-
Copyright (c) 2023, The OpenBLAS Project
3-
All rights reserved.
4-
5-
Redistribution and use in source and binary forms, with or without
6-
modification, are permitted provided that the following conditions are
7-
met:
8-
9-
1. Redistributions of source code must retain the above copyright
10-
notice, this list of conditions and the following disclaimer.
11-
12-
2. Redistributions in binary form must reproduce the above copyright
13-
notice, this list of conditions and the following disclaimer in
14-
the documentation and/or other materials provided with the
15-
distribution.
16-
3. Neither the name of the OpenBLAS project nor the names of
17-
its contributors may be used to endorse or promote products
18-
derived from this software without specific prior written
19-
permission.
20-
21-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22-
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24-
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
25-
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26-
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27-
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28-
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29-
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
30-
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31-
32-
**********************************************************************************/
33-
34-
#ifndef _TEST_EXTENSION_COMMON_H_
35-
#define _TEST_EXTENSION_COMMON_H_
36-
37-
#include <cblas.h>
38-
#include <ctype.h>
39-
40-
#define TRUE 1
41-
#define FALSE 0
42-
#define INVALID -1
43-
#define SINGLE_TOL 1e-02f
44-
#define DOUBLE_TOL 1e-10
45-
46-
extern int check_error(void);
47-
extern void set_xerbla(char* current_rout, int expected_info);
48-
extern int BLASFUNC(xerbla)(char *name, blasint *info, blasint length);
49-
50-
extern void srand_generate(float *alpha, blasint n);
51-
extern void drand_generate(double *alpha, blasint n);
52-
53-
extern float smatrix_difference(float *a, float *b, blasint cols, blasint rows, blasint ld);
54-
extern double dmatrix_difference(double *a, double *b, blasint cols, blasint rows, blasint ld);
55-
56-
extern void cconjugate_vector(blasint n, blasint inc_x, float *x_ptr);
57-
extern void zconjugate_vector(blasint n, blasint inc_x, double *x_ptr);
58-
59-
extern void stranspose(blasint rows, blasint cols, float alpha, float *a_src, int lda_src,
60-
float *a_dst, blasint lda_dst);
61-
extern void dtranspose(blasint rows, blasint cols, double alpha, double *a_src, int lda_src,
62-
double *a_dst, blasint lda_dst);
63-
extern void ctranspose(blasint rows, blasint cols, float *alpha, float *a_src, int lda_src,
64-
float *a_dst, blasint lda_dst, int conj);
65-
extern void ztranspose(blasint rows, blasint cols, double *alpha, double *a_src, int lda_src,
66-
double *a_dst, blasint lda_dst, int conj);
67-
68-
extern void scopy(blasint rows, blasint cols, float alpha, float *a_src, int lda_src,
69-
float *a_dst, blasint lda_dst);
70-
extern void dcopy(blasint rows, blasint cols, double alpha, double *a_src, int lda_src,
71-
double *a_dst, blasint lda_dst);
72-
extern void ccopy(blasint rows, blasint cols, float *alpha, float *a_src, int lda_src,
73-
float *a_dst, blasint lda_dst, int conj);
74-
extern void zcopy(blasint rows, blasint cols, double *alpha, double *a_src, int lda_src,
75-
double *a_dst, blasint lda_dst, int conj);
76-
#endif
1+
/*****************************************************************************
2+
Copyright (c) 2023, The OpenBLAS Project
3+
All rights reserved.
4+
5+
Redistribution and use in source and binary forms, with or without
6+
modification, are permitted provided that the following conditions are
7+
met:
8+
9+
1. Redistributions of source code must retain the above copyright
10+
notice, this list of conditions and the following disclaimer.
11+
12+
2. Redistributions in binary form must reproduce the above copyright
13+
notice, this list of conditions and the following disclaimer in
14+
the documentation and/or other materials provided with the
15+
distribution.
16+
3. Neither the name of the OpenBLAS project nor the names of
17+
its contributors may be used to endorse or promote products
18+
derived from this software without specific prior written
19+
permission.
20+
21+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
25+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
30+
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31+
32+
**********************************************************************************/
33+
34+
#ifndef _TEST_EXTENSION_COMMON_H_
35+
#define _TEST_EXTENSION_COMMON_H_
36+
37+
#include <cblas.h>
38+
#include <ctype.h>
39+
40+
#define TRUE 1
41+
#define FALSE 0
42+
#define INVALID -1
43+
#define SINGLE_TOL 1e-02f
44+
#define DOUBLE_TOL 1e-10
45+
46+
extern int check_error(void);
47+
extern void set_xerbla(char* current_rout, int expected_info);
48+
extern int BLASFUNC(xerbla)(char *name, blasint *info, blasint length);
49+
50+
extern void srand_generate(float *alpha, blasint n);
51+
extern void drand_generate(double *alpha, blasint n);
52+
53+
extern float smatrix_difference(float *a, float *b, blasint cols, blasint rows, blasint ld);
54+
extern double dmatrix_difference(double *a, double *b, blasint cols, blasint rows, blasint ld);
55+
56+
extern void cconjugate_vector(blasint n, blasint inc_x, float *x_ptr);
57+
extern void zconjugate_vector(blasint n, blasint inc_x, double *x_ptr);
58+
59+
extern void stranspose(blasint rows, blasint cols, float alpha, float *a_src, int lda_src,
60+
float *a_dst, blasint lda_dst);
61+
extern void dtranspose(blasint rows, blasint cols, double alpha, double *a_src, int lda_src,
62+
double *a_dst, blasint lda_dst);
63+
extern void ctranspose(blasint rows, blasint cols, float *alpha, float *a_src, int lda_src,
64+
float *a_dst, blasint lda_dst, int conj);
65+
extern void ztranspose(blasint rows, blasint cols, double *alpha, double *a_src, int lda_src,
66+
double *a_dst, blasint lda_dst, int conj);
67+
68+
extern void my_scopy(blasint rows, blasint cols, float alpha, float *a_src, int lda_src,
69+
float *a_dst, blasint lda_dst);
70+
extern void my_dcopy(blasint rows, blasint cols, double alpha, double *a_src, int lda_src,
71+
double *a_dst, blasint lda_dst);
72+
extern void my_ccopy(blasint rows, blasint cols, float *alpha, float *a_src, int lda_src,
73+
float *a_dst, blasint lda_dst, int conj);
74+
extern void my_zcopy(blasint rows, blasint cols, double *alpha, double *a_src, int lda_src,
75+
double *a_dst, blasint lda_dst, int conj);
76+
#endif

0 commit comments

Comments
 (0)