mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 21:02:50 +00:00
09a10f80e1
They take advantage of gcc's vector_size attribute and so only cross, dot, qmul, qvmul and qrot (create rotation quaternion from two vectors) are needed at this stage as basic (per-component) math is supported natively by gcc. The provided functions work on horizontal (array-of-structs) data, ie a vec4d_t or vec4f_t represents a single vector, or traditional vector layout. Vertical layout (struct-of-arrays) does not need any special functions as the regular math can be used to operate on four vectors at a time. Functions are provided for loading a vec4 from a vec3 (4th element set to 0) and storing a vec4 into a vec3 (discarding the 4th element). With this, QF will require AVX2 support (needed for vec4d_t). Without support for doubles, SSE is possible, but may not be worthwhile for horizontal data. Fused-multiply-add is NOT used because it alters the results between unoptimized and optimized code, resulting in -mfma really meaning -mfast-math-anyway. I really do not want to have to debug issues that occur only in optimized code.
95 lines
3.7 KiB
Text
95 lines
3.7 KiB
Text
libs_util_tests = \
|
|
libs/util/test/test-bary \
|
|
libs/util/test/test-cexpr \
|
|
libs/util/test/test-cmem \
|
|
libs/util/test/test-cs \
|
|
libs/util/test/test-darray \
|
|
libs/util/test/test-dq \
|
|
libs/util/test/test-half \
|
|
libs/util/test/test-mat3 \
|
|
libs/util/test/test-mat4 \
|
|
libs/util/test/test-plist \
|
|
libs/util/test/test-qfs \
|
|
libs/util/test/test-quat \
|
|
libs/util/test/test-seb \
|
|
libs/util/test/test-seg \
|
|
libs/util/test/test-set \
|
|
libs/util/test/test-simd \
|
|
libs/util/test/test-txtbuffer \
|
|
libs/util/test/test-vrect
|
|
|
|
TESTS += $(libs_util_tests)
|
|
|
|
check_PROGRAMS += $(libs_util_tests)
|
|
|
|
libs_util_test_test_bary_SOURCES=libs/util/test/test-bary.c
|
|
libs_util_test_test_bary_LDADD=libs/util/libQFutil.la
|
|
libs_util_test_test_bary_DEPENDENCIES=libs/util/libQFutil.la
|
|
|
|
libs_util_test_test_cexpr_SOURCES=libs/util/test/test-cexpr.c
|
|
libs_util_test_test_cexpr_LDADD=libs/util/libQFutil.la
|
|
libs_util_test_test_cexpr_DEPENDENCIES=libs/util/libQFutil.la
|
|
|
|
libs_util_test_test_cmem_SOURCES=libs/util/test/test-cmem.c
|
|
libs_util_test_test_cmem_LDADD=libs/util/libQFutil.la
|
|
libs_util_test_test_cmem_DEPENDENCIES=libs/util/libQFutil.la
|
|
|
|
libs_util_test_test_cs_SOURCES=libs/util/test/test-cs.c
|
|
libs_util_test_test_cs_LDADD=libs/util/libQFutil.la
|
|
libs_util_test_test_cs_DEPENDENCIES=libs/util/libQFutil.la
|
|
|
|
libs_util_test_test_darray_SOURCES=libs/util/test/test-darray.c
|
|
libs_util_test_test_darray_LDADD=libs/util/libQFutil.la
|
|
libs_util_test_test_darray_DEPENDENCIES=libs/util/libQFutil.la
|
|
|
|
libs_util_test_test_dq_SOURCES=libs/util/test/test-dq.c
|
|
libs_util_test_test_dq_LDADD=libs/util/libQFutil.la
|
|
libs_util_test_test_dq_DEPENDENCIES=libs/util/libQFutil.la
|
|
|
|
libs_util_test_test_half_SOURCES=libs/util/test/test-half.c
|
|
libs_util_test_test_half_LDADD=libs/util/libQFutil.la
|
|
libs_util_test_test_half_DEPENDENCIES=libs/util/libQFutil.la
|
|
|
|
libs_util_test_test_mat3_SOURCES=libs/util/test/test-mat3.c
|
|
libs_util_test_test_mat3_LDADD=libs/util/libQFutil.la
|
|
libs_util_test_test_mat3_DEPENDENCIES=libs/util/libQFutil.la
|
|
|
|
libs_util_test_test_mat4_SOURCES=libs/util/test/test-mat4.c
|
|
libs_util_test_test_mat4_LDADD=libs/util/libQFutil.la
|
|
libs_util_test_test_mat4_DEPENDENCIES=libs/util/libQFutil.la
|
|
|
|
libs_util_test_test_plist_SOURCES=libs/util/test/test-plist.c
|
|
libs_util_test_test_plist_LDADD=libs/util/libQFutil.la
|
|
libs_util_test_test_plist_DEPENDENCIES=libs/util/libQFutil.la
|
|
|
|
libs_util_test_test_qfs_SOURCES=libs/util/test/test-qfs.c
|
|
libs_util_test_test_qfs_LDADD=libs/util/libQFutil.la
|
|
libs_util_test_test_qfs_DEPENDENCIES=libs/util/libQFutil.la
|
|
|
|
libs_util_test_test_quat_SOURCES=libs/util/test/test-quat.c
|
|
libs_util_test_test_quat_LDADD=libs/util/libQFutil.la
|
|
libs_util_test_test_quat_DEPENDENCIES=libs/util/libQFutil.la
|
|
|
|
libs_util_test_test_seb_SOURCES=libs/util/test/test-seb.c
|
|
libs_util_test_test_seb_LDADD=libs/util/libQFutil.la
|
|
libs_util_test_test_seb_DEPENDENCIES=libs/util/libQFutil.la
|
|
|
|
libs_util_test_test_seg_SOURCES=libs/util/test/test-seg.c
|
|
libs_util_test_test_seg_LDADD=libs/util/libQFutil.la
|
|
libs_util_test_test_seg_DEPENDENCIES=libs/util/libQFutil.la
|
|
|
|
libs_util_test_test_set_SOURCES=libs/util/test/test-set.c
|
|
libs_util_test_test_set_LDADD=libs/util/libQFutil.la
|
|
libs_util_test_test_set_DEPENDENCIES=libs/util/libQFutil.la
|
|
|
|
libs_util_test_test_simd_SOURCES=libs/util/test/test-simd.c
|
|
libs_util_test_test_simd_LDADD=libs/util/libQFutil.la
|
|
libs_util_test_test_simd_DEPENDENCIES=libs/util/libQFutil.la
|
|
|
|
libs_util_test_test_txtbuffer_SOURCES=libs/util/test/test-txtbuffer.c
|
|
libs_util_test_test_txtbuffer_LDADD=libs/util/libQFutil.la
|
|
libs_util_test_test_txtbuffer_DEPENDENCIES=libs/util/libQFutil.la
|
|
|
|
libs_util_test_test_vrect_SOURCES=libs/util/test/test-vrect.c
|
|
libs_util_test_test_vrect_LDADD=libs/util/libQFutil.la
|
|
libs_util_test_test_vrect_DEPENDENCIES=libs/util/libQFutil.la
|