cglm icon indicating copy to clipboard operation
cglm copied to clipboard

Possible problem in glm_inv_tr SIMD implementations

Open pm4gh opened this issue 3 years ago • 2 comments

A static analyzer used on code indirectly including affine.h (but not using glm_inv_tr) gives me this warning:

cglm/simd/neon/affine.h:95:8: style: Variable 'r3' is assigned a value that is never used. [unreadVariable] r3 = vmat.val[3];

I'm not familiar with SSE or NEON intrinsics and can't affirm that something is wrong, but it seems strange that the SSE version uses the r3 input argument while the NEON one doesn't.

pm4gh avatar Mar 05 '22 20:03 pm4gh

Hi @pm4gh ,

Thanks for reporting this, I'll take a look at it asap. vld4q_f32() transposes matrix on the fly but it may be slow if we want to transpose matrix which is already in SIMD registers... it may also be replaced later.

recp avatar Mar 07 '22 10:03 recp

The https://github.com/recp/cglm/pull/244 PR should suppress the warning but as I said before, I'll re-check the implementation later.

recp avatar Mar 18 '22 09:03 recp