Skip to content

Commit

Permalink
fix glm_arch_print_name and print it on tests
Browse files Browse the repository at this point in the history
  • Loading branch information
recp committed May 6, 2023
1 parent c4a348a commit ed09fb5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
27 changes: 14 additions & 13 deletions include/cglm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,25 +68,26 @@
CGLM_INLINE
void
glm_arch_print_name(FILE* __restrict ostream) {
fprintf(ostream, CGLM_PRINT_COLOR "\ncglm arch: "
#if defined(CGLM_SIMD_WASM)
fprintf(ostream, CGLM_PRINT_COLOR "\ncglm arch: wasm SIMD128"
"\n\n" CGLM_PRINT_COLOR_RESET);
"wasm SIMD128"
#elif defined(CGLM_SIMD_x86)
fprintf(ostream, CGLM_PRINT_COLOR "\ncglm arch: x86 SSE*"
#ifdef __AVX__
" AVX"
#endif
"\n\n" CGLM_PRINT_COLOR_RESET);
"x86 SSE* "
# ifdef __AVX__
" AVX"
# endif
#elif defined(CGLM_SIMD_ARM)
fprintf(ostream, CGLM_PRINT_COLOR "\ncglm arch: arm"
#ifndef __ARM_NEON_FP
"arm"
# ifndef __ARM_NEON_FP
" NEON_FP"
#endif
#ifdef CGLM_ARM64
# endif
# ifdef CGLM_ARM64
" ARM64"
# endif
#else
"uncommon"
#endif
"\n\n" CGLM_PRINT_COLOR_RESET);
#endif
"\n\n" CGLM_PRINT_COLOR_RESET);
}

CGLM_INLINE
Expand Down
4 changes: 3 additions & 1 deletion test/runner.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ main(int argc, const char * argv[]) {
(void)argc;
(void)argv;

glm_arch_print_name(stderr);

passed = failed = maxlen = 0;
total = 0.0;
count = sizeof(tests) / sizeof(tests[0]);

fprintf(stderr, CYAN "\nWelcome to cglm tests\n\n" RESET);
fprintf(stderr, CYAN "Welcome to cglm tests\n\n" RESET);

srand((unsigned int)time(NULL));

Expand Down

0 comments on commit ed09fb5

Please sign in to comment.