From 6e35d927ebc336c7c6cabacca34c4cc0d009ff2b Mon Sep 17 00:00:00 2001 From: krishna2803 <47917477+krishna2803@users.noreply.github.com> Date: Sun, 2 Apr 2023 16:20:45 +0530 Subject: [PATCH 1/3] Updated parameter name (d -> dest) --- docs/source/cam.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/cam.rst b/docs/source/cam.rst index 7afc5db..bbaea80 100644 --- a/docs/source/cam.rst +++ b/docs/source/cam.rst @@ -101,7 +101,7 @@ Functions documentation Parameters: | *[in]* **box** AABB | *[in]* **padding** padding - | *[out]* **d** result matrix + | *[out]* **dest** result matrix .. c:function:: void glm_ortho_aabb_pz(vec3 box[2], float padding, mat4 dest) @@ -113,7 +113,7 @@ Functions documentation Parameters: | *[in]* **box** AABB | *[in]* **padding** padding for near and far - | *[out]* **d** result matrix + | *[out]* **dest** result matrix Returns: square of norm / magnitude From a542d54fca72d4fe9677a6ee44e4925efbbeca78 Mon Sep 17 00:00:00 2001 From: Recep Aslantas Date: Sat, 8 Apr 2023 00:59:06 +0300 Subject: [PATCH 2/3] utility to print selected simd path --- include/cglm/io.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/include/cglm/io.h b/include/cglm/io.h index 3381cff..97837f3 100644 --- a/include/cglm/io.h +++ b/include/cglm/io.h @@ -60,6 +60,27 @@ # define CGLM_PRINT_COLOR_RESET "\033[0m" #endif +CGLM_INLINE +void +glm_arch_print_name(FILE* __restrict ostream) { +#ifdef CGLM_SIMD_x86 + fprintf(ostream, CGLM_PRINT_COLOR "\ncglm arch: x86 SSE*" +#ifdef __AVX__ + " AVX" +#endif + "\n\n" CGLM_PRINT_COLOR_RESET); +#elif defined(CGLM_SIMD_ARM) + fprintf(ostream, CGLM_PRINT_COLOR "\ncglm arch: arm" +#ifndef __ARM_NEON_FP + " NEON_FP" +#endif +#ifdef CGLM_ARM64 + " ARM64" +#endif + "\n\n" CGLM_PRINT_COLOR_RESET); +#endif +} + CGLM_INLINE void glm_mat4_print(mat4 matrix, From 0b3049dca0c300dbe80e76052569408f49c26c7b Mon Sep 17 00:00:00 2001 From: Recep Aslantas Date: Sat, 8 Apr 2023 01:03:31 +0300 Subject: [PATCH 3/3] utility to print selected simd path (docs) --- include/cglm/io.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/cglm/io.h b/include/cglm/io.h index 97837f3..12c3db0 100644 --- a/include/cglm/io.h +++ b/include/cglm/io.h @@ -60,6 +60,11 @@ # define CGLM_PRINT_COLOR_RESET "\033[0m" #endif +/*! + * @brief prints current SIMD path in general + * + * @param[in] ostream stream to print e.g. stdout, stderr, FILE ... + */ CGLM_INLINE void glm_arch_print_name(FILE* __restrict ostream) {