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 diff --git a/include/cglm/io.h b/include/cglm/io.h index 3381cff..12c3db0 100644 --- a/include/cglm/io.h +++ b/include/cglm/io.h @@ -60,6 +60,32 @@ # 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) { +#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,