Mercurial > vec
comparison src/impl/fallback.c @ 24:e49e70f7012f
impl/x86: add static assertions for alignment and size
author | Paper <paper@tflc.us> |
---|---|
date | Sun, 24 Nov 2024 03:32:53 -0500 |
parents | e26874655738 |
children | 92156fe32755 |
comparison
equal
deleted
inserted
replaced
23:e26874655738 | 24:e49e70f7012f |
---|---|
5 // Fallback implementations - this is what an implementation should use if it | 5 // Fallback implementations - this is what an implementation should use if it |
6 // doesn't support a specific function *and* the actual representation in | 6 // doesn't support a specific function *and* the actual representation in |
7 // memory is unknown or yields incorrect results from the generic functions. | 7 // memory is unknown or yields incorrect results from the generic functions. |
8 // This is *extremely* unlikely; for x86 the layout is exactly the same in | 8 // This is *extremely* unlikely; for x86 the layout is exactly the same in |
9 // memory as the generic functions (i.e. it is literally stored as an array of | 9 // memory as the generic functions (i.e. it is literally stored as an array of |
10 // integers). | 10 // integers). This is likely true for AltiVec and NEON as well, but those |
11 // | 11 // aren't tested for now. |
12 // These functions can probably be removed if every current implementation is | |
13 // found to have the same | |
14 | 12 |
15 #define VEC_FALLBACK_OPERATION(op, sign, csign, bits, size) \ | 13 #define VEC_FALLBACK_OPERATION(op, sign, csign, bits, size) \ |
16 do { \ | 14 do { \ |
17 V##csign##INT##bits##x##size##_ALIGNED_ARRAY(varr1); \ | 15 V##csign##INT##bits##x##size##_ALIGNED_ARRAY(varr1); \ |
18 V##csign##INT##bits##x##size##_ALIGNED_ARRAY(varr2); \ | 16 V##csign##INT##bits##x##size##_ALIGNED_ARRAY(varr2); \ |