Mercurial > vec
comparison CMakeLists.txt @ 25:92156fe32755
impl/ppc/altivec: update to new implementation
the signed average function is wrong; it needs to round up the number
when only one of them is odd, but that doesn't necessarily seem to be
true because altivec is weird, and that's what we need to emulate the
quirks for. ugh.
also the altivec backend uses the generic functions instead of fallbacks
because it does indeed use the exact same memory structure as the generic
implementation...
author | Paper <paper@tflc.us> |
---|---|
date | Sun, 24 Nov 2024 11:15:59 +0000 |
parents | e26874655738 |
children | d00b95f95dd1 |
comparison
equal
deleted
inserted
replaced
24:e49e70f7012f | 25:92156fe32755 |
---|---|
1 cmake_minimum_required(VERSION 3.23) | 1 cmake_minimum_required(VERSION 3.23) |
2 | 2 |
3 project(vec VERSION 3.0.0 DESCRIPTION "a tiny C99 SIMD vector library") | 3 project(vec VERSION 3.0.0 DESCRIPTION "a tiny C99 SIMD vector library" LANGUAGES C) |
4 | 4 |
5 add_library(vec SHARED "src/vec.c;src/cpu.c;src/impl/generic.c;src/impl/fallback.c") | 5 add_library(vec SHARED "src/vec.c;src/cpu.c;src/impl/generic.c;src/impl/fallback.c") |
6 | 6 |
7 include(CheckCCompilerFlag) | 7 include(CheckCCompilerFlag) |
8 | 8 |
31 if(COMPILER_HAS_AVX512F) | 31 if(COMPILER_HAS_AVX512F) |
32 set(COMPILER_AVX512F_FLAGS "/arch:AVX512") | 32 set(COMPILER_AVX512F_FLAGS "/arch:AVX512") |
33 endif() | 33 endif() |
34 # TODO we have to try_compile to detect NEON | 34 # TODO we have to try_compile to detect NEON |
35 else() | 35 else() |
36 #check_c_compiler_flag("-maltivec" COMPILER_HAS_ALTIVEC) | 36 check_c_compiler_flag("-maltivec" COMPILER_HAS_ALTIVEC) |
37 #if(COMPILER_HAS_ALTIVEC) | 37 if(COMPILER_HAS_ALTIVEC) |
38 # set(COMPILER_ALTIVEC_FLAGS "-maltivec") | 38 set(COMPILER_ALTIVEC_FLAGS "-maltivec") |
39 #endif() | 39 endif() |
40 #check_c_compiler_flag("-mfpu=neon" COMPILER_HAS_NEON) | 40 #check_c_compiler_flag("-mfpu=neon" COMPILER_HAS_NEON) |
41 #if(COMPILER_HAS_NEON) | 41 #if(COMPILER_HAS_NEON) |
42 # set(COMPILER_NEON_FLAGS "-mfpu=neon") | 42 # set(COMPILER_NEON_FLAGS "-mfpu=neon") |
43 #endif() | 43 #endif() |
44 check_c_compiler_flag("-mmmx" COMPILER_HAS_MMX) | 44 check_c_compiler_flag("-mmmx" COMPILER_HAS_MMX) |