Skip to content

Commit 9fea633

Browse files
Partial addition of 'const' to all interfaces above the (micro)kernels. (#625)
Details: - Added 'const' qualifier to applicable function arguments wherever the the pointed-to object is not internally modified. This change affects all interfaces that reside above the level of the (micro)kernels. - Typecast certain function return values to discard 'const' qualifier. - Removed 'restrict' from various arguments, including cntx_t*, auxinfo_t*, rntm_t*, thrinfo_t*, mem_t*, and others - Removed parts of some APIs, such as bli_cntx_*(), due to limited use. - Merged some variable declarations with their corresponding initialization statements. - Whitespace changes.
1 parent ae10d94 commit 9fea633

File tree

446 files changed

+19651
-19345
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

446 files changed

+19651
-19345
lines changed

build/detect/config/config_detect.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@
6969

7070
int main( int argc, char** argv )
7171
{
72-
arch_t id = bli_cpuid_query_id();
73-
char* s = bli_arch_string( id );
72+
arch_t id = bli_cpuid_query_id();
73+
const char* s = bli_arch_string( id );
7474

7575
printf( "%s\n", s );
7676

config/template/kernels/1/bli_axpyv_template_noopt_var1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ void bli_zaxpyv_template_noopt
4242
dcomplex* restrict alpha,
4343
dcomplex* restrict x, inc_t incx,
4444
dcomplex* restrict y, inc_t incy,
45-
cntx_t* restrict cntx
45+
cntx_t* cntx
4646
)
4747
{
4848
/*

config/template/kernels/1/bli_dotv_template_noopt_var1.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ void bli_zdotv_template_noopt
4343
dcomplex* restrict x, inc_t incx,
4444
dcomplex* restrict y, inc_t incy,
4545
dcomplex* restrict rho,
46-
cntx_t* restrict cntx
46+
cntx_t* cntx
4747
)
4848
{
4949
/*
@@ -187,7 +187,7 @@ void bli_zdotv_template_noopt
187187
// Initialize accumulator to zero.
188188
bli_zset0s( dotxy );
189189

190-
190+
191191
conjx_use = conjx;
192192

193193
// If y must be conjugated, we compute the result indirectly by first

config/template/kernels/1f/bli_axpy2v_template_noopt_var1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ void bli_zaxpy2v_template_noopt
4545
dcomplex* restrict x, inc_t incx,
4646
dcomplex* restrict y, inc_t incy,
4747
dcomplex* restrict z, inc_t incz,
48-
cntx_t* restrict cntx
48+
cntx_t* cntx
4949
)
5050
{
5151
/*

config/template/kernels/1f/bli_axpyf_template_noopt_var1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ void bli_zaxpyf_template_noopt
4545
dcomplex* restrict a, inc_t inca, inc_t lda,
4646
dcomplex* restrict x, inc_t incx,
4747
dcomplex* restrict y, inc_t incy,
48-
cntx_t* restrict cntx
48+
cntx_t* cntx
4949
)
5050
{
5151
/*

config/template/kernels/1f/bli_dotaxpyv_template_noopt_var1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ void bli_zdotaxpyv_template_noopt
4646
dcomplex* restrict y, inc_t incy,
4747
dcomplex* restrict rho,
4848
dcomplex* restrict z, inc_t incz,
49-
cntx_t* restrict cntx
49+
cntx_t* cntx
5050
)
5151
{
5252
/*

config/template/kernels/1f/bli_dotxaxpyf_template_noopt_var1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ void bli_zdotxaxpyf_template_noopt
5050
dcomplex* restrict beta,
5151
dcomplex* restrict y, inc_t incy,
5252
dcomplex* restrict z, inc_t incz,
53-
cntx_t* restrict cntx
53+
cntx_t* cntx
5454
)
5555

5656
{

config/template/kernels/1f/bli_dotxf_template_noopt_var1.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ void bli_zdotxf_template_noopt
4646
dcomplex* restrict x, inc_t incx,
4747
dcomplex* restrict beta,
4848
dcomplex* restrict y, inc_t incy,
49-
cntx_t* restrict cntx
49+
cntx_t* cntx
5050
)
5151
{
5252
/*
@@ -239,7 +239,7 @@ void bli_zdotxf_template_noopt
239239
if ( bli_is_conj( conjx ) )
240240
bli_toggle_conj( &conjat_use );
241241

242-
242+
243243
// Iterate over columns of A and rows of x to compute:
244244
// Atx = conjat_use( A^T ) * x;
245245
if ( bli_is_noconj( conjat_use ) )

config/template/kernels/3/bli_gemm_template_noopt_mxn.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ void bli_zgemm_template_noopt
4545
dcomplex* restrict b1,
4646
dcomplex* restrict beta,
4747
dcomplex* restrict c11, inc_t rs_c, inc_t cs_c,
48-
auxinfo_t* restrict data,
49-
cntx_t* restrict cntx
48+
auxinfo_t* data,
49+
cntx_t* cntx
5050
)
5151
{
5252
/*

config/template/kernels/3/bli_gemmtrsm_l_template_noopt_mxn.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ void bli_zgemmtrsm_l_template_noopt
4444
dcomplex* restrict b01,
4545
dcomplex* restrict b11,
4646
dcomplex* restrict c11, inc_t rs_c, inc_t cs_c,
47-
auxinfo_t* restrict data,
48-
cntx_t* restrict cntx
47+
auxinfo_t* data,
48+
cntx_t* cntx
4949
)
5050
{
5151
/*

0 commit comments

Comments
 (0)