github recp/cglm v0.8.1
v0.8.1: FMA Update + CMake Header Library

latest releases: v0.9.4, v0.9.3, v0.9.2...
3 years ago

New Features:

Implement FMA

SIMD operations are optimized with FMA instructions to reduce operations and increasee accuracy. The gennerated CPU instructions are reduced. All matrix and related-vector operations are optimized.

FMA must be enable for these optimizations (with -mfma flag on GCC and Clang, /arch:AVX2 /O1-2 on MSVC)

  • optimize mat4 SSE operations with FMA
  • optimize mat3 SSE operations with FMA
  • optimize mat2 SSE operations with FMA
  • optimize affine mat SSE operations with FMA
  • optimize vec4 muladd and muladds operations with FMA

New glmm functions (SSE + NEON):

  • glmm_vhadd() - broadcast-ed hadd
  • glmm_fmadd(a, b, c) - fused multiply add
  • glmm_fnmadd(a, b, c) - fused negative multiply add
  • glmm_fmsub(a, b, c) - fused multiply sub
  • glmm_fnmsub(a, b, c) - fused negative multiply sub

New glmm functions (AVX):

  • glmm256_fmadd(a, b, c) - fused multiply add AVX
  • glmm256_fnmadd(a, b, c) - fused negative multiply add AVX
  • glmm256_fmsub(a, b, c) - fused multiply sub AVX
  • glmm256_fnmsub(a, b, c) - fused negative multiply sub AVX
  • glm_mat4_scale_avx(mat4 m, float s) - scale matrix with scalar (if AVX enabled)

CMake

Use as header-only library with your CMake project

This requires no building or installation of cglm.

  • Example:
cmake_minimum_required(VERSION 3.8.2)

project(<Your Project Name>)

add_executable(${PROJECT_NAME} src/main.c)
target_link_libraries(${LIBRARY_NAME} PRIVATE
  cglm_headers)

add_subdirectory(external/cglm/ EXCLUDE_FROM_ALL)

Don't miss a new cglm release

NewReleases is sending notifications on new releases.