Skip to content

Commit

Permalink
Fixed a number of compiler warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
hfp committed Dec 20, 2018
1 parent 4bf4191 commit c3be773
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
10 changes: 5 additions & 5 deletions src/generator_packed_aux.h
Expand Up @@ -71,7 +71,7 @@ LIBXSMM_API_INLINE void compact_load_parameter_ (
} else if ( (number == 16) && (regset=='z') ) {
datasize = 4;
} else {
fprintf(stderr,"Unknown number=%d regset=%c combo for compact_load_parameter\n",number,regset);
fprintf(stderr,"Unknown number=%u regset=%c combo for compact_load_parameter\n",number,regset);
exit(-1);
}

Expand All @@ -82,7 +82,7 @@ LIBXSMM_API_INLINE void compact_load_parameter_ (
libxsmm_x86_instruction_full_vec_load_of_constants ( io_code, (unsigned char*) vector, "loadconst", regset, reg );
} else {
float vector[16];
for ( i = 0 ; i < (int)number ; i++ ) vector[i]=alpha;
for ( i = 0 ; i < (int)number ; i++ ) vector[i]=(float)alpha;

libxsmm_x86_instruction_full_vec_load_of_constants ( io_code, (unsigned char*) vector, "loadconst", regset, reg );
}
Expand Down Expand Up @@ -160,7 +160,7 @@ LIBXSMM_API_INLINE void compact_store_matrix_gen_ (
else element = number*(i-1)*lda + number*(j-1);
offset = element * datasize;
if ( /*(reg < 0) ||*/ (reg >=32) ) {
printf("compact_store_matrix_gen trying to store from an invalid register: %d\n",reg);
printf("compact_store_matrix_gen trying to store from an invalid register: %u\n",reg);
exit(-1);
}
if ( datasize == 8 )
Expand Down Expand Up @@ -356,8 +356,8 @@ LIBXSMM_API_INLINE void compact_load_matrix_gen_ (
int i_instruction_set;

if ( /*(reg < 0) ||*/ (reg >=32) ) {
printf("compact_load_matrix_gen trying to load to an invalid register: %d\n",reg);
printf("lda=%d i=%d j=%d reg=%d number=%d datasize=%d regset=%c matrix_gpreg=%d\n",lda,i,j,reg,number,datasize,regset,matrix_gpreg);
printf("compact_load_matrix_gen trying to load to an invalid register: %u\n",reg);
printf("lda=%u i=%u j=%u reg=%u number=%u datasize=%u regset=%c matrix_gpreg=%u\n",lda,i,j,reg,number,datasize,regset,matrix_gpreg);
exit(-1);
}
if ( !trans ) element = number*(j-1)*lda + number*(i-1);
Expand Down
24 changes: 12 additions & 12 deletions src/generator_packed_gemmnn.h
Expand Up @@ -109,43 +109,43 @@ LIBXSMM_API_INLINE void compact_gemmnn_ (

/* Test that the dimensions conform */
if ( (am2-am1) != (cm2-cm1) ) {
printf("compact_gemmnn m-dimensions don't conform: %d != %d\n",am2-am1+1,cm2-cm1+1);
printf("compact_gemmnn m-dimensions don't conform: %u != %u\n",am2-am1+1,cm2-cm1+1);
exit(-1);
}
if ( (ak2-ak1) != (bk2-bk1) ) {
printf("compact_gemmnn k-dimensions don't conform: %d != %d\n",ak2-ak1+1,bk2-bk1+1);
printf("compact_gemmnn k-dimensions don't conform: %u != %u\n",ak2-ak1+1,bk2-bk1+1);
exit(-1);
}
if ( (bn2-bn1) != (cn2-cn1) ) {
printf("compact_gemmnn n-dimensions don't conform: %d != %d\n",ak2-ak1+1,bk2-bk1+1);
printf("compact_gemmnn n-dimensions don't conform: %u != %u\n",ak2-ak1+1,bk2-bk1+1);
exit(-1);
}

/* See that all dimensions are at least 1 */
if ( am2 < am1) {
printf("compact_gemmnn m-dimension too small: %d\n",am2-am1+1);
printf("compact_gemmnn m-dimension too small: %u\n",am2-am1+1);
exit(-1);
}
if ( ak2 < ak1) {
printf("compact_gemmnn k-dimension too small: %d\n",ak2-ak1+1);
printf("compact_gemmnn k-dimension too small: %u\n",ak2-ak1+1);
exit(-1);
}
if ( bn2 < bn1) {
printf("compact_gemmnn n-dimension too small: %d\n",bn2-bn1+1);
printf("compact_gemmnn n-dimension too small: %u\n",bn2-bn1+1);
exit(-1);
}

/* Check that areg, breg, creg is valid */
if ( /*(areg < 0) ||*/ (areg > 15) ) {
printf("compact_gemmnn A gp register invalid: %d\n",areg);
printf("compact_gemmnn A gp register invalid: %u\n",areg);
exit(-1);
}
if ( /*(breg < 0) ||*/ (breg > 15) ) {
printf("compact_gemmnn B gp register invalid: %d\n",breg);
printf("compact_gemmnn B gp register invalid: %u\n",breg);
exit(-1);
}
if ( /*(creg < 0) ||*/ (creg > 15) ) {
printf("compact_gemmnn C gp register invalid: %d\n",creg);
printf("compact_gemmnn C gp register invalid: %u\n",creg);
exit(-1);
}

Expand All @@ -154,7 +154,7 @@ LIBXSMM_API_INLINE void compact_gemmnn_ (
else if ( (numb == 8) && (regset=='y') ) { datasz = 4; }
else if ( (numb == 4) && (regset=='y') ) { datasz = 8; }
else {
printf("compact_gemmnn Unknown number=%d or regset=%c\n",numb,regset);
printf("compact_gemmnn Unknown number=%u or regset=%c\n",numb,regset);
exit(-1);
}

Expand Down Expand Up @@ -634,8 +634,8 @@ if (c70>0) printf("c7,0:7=%d %d %d %d %d %d %d %d\n",c70,c71,c72,c73,c74,c75,c76
j0 = 1; /* Turn everything back on again */
}
} /* N-loop */
#if 1
printf("Inlined Compact GEMM code pointer ends at: %d\n",io_code->code_size);
#ifdef COMPACT_GEMMNN_DEBUG
printf("Inlined Compact GEMM code pointer ends at: %u\n",io_code->code_size);
#endif
}

Expand Down
2 changes: 1 addition & 1 deletion version.txt
@@ -1 +1 @@
develop-1.10-173
develop-1.10-174

0 comments on commit c3be773

Please sign in to comment.