1{{title|Libsimdpp reference}} 2{| class="mainpagetable" cellspacing=0 style="width:100%; white-space:nowrap;" 3|- class="row rowtop" 4| colspan=4 | <span style="font-size: 2em;">Libsimdpp documentation</span> 5|- class="row" 6| colspan=4 | 7<div style="white-space:normal;"> 8libsimdpp is a portable header-only zero-overhead C++ wrapper around 9single-instruction multiple-data (SIMD) intrinsics found in many compilers. The 10library presents a single interface over several instruction sets in such a way 11that the same source code may be compiled for different instruction sets. The 12resulting object files then may be hooked into internal dynamic dispatch 13mechanism. 14 15 16The library resolves differences between instruction sets by implementing the 17missing functionality as a combination of several intrinsics. Moreover, the 18library supplies a lot of additional, commonly used functionality, such as 19various variants of matrix transpositions, interleaving loads/stores, optimized 20compile-time shuffling instructions, etc. Each of these are implemented in the 21most efficient manner for the target instruction set. Finally, it's possible 22to fall back to native intrinsics when necessary, without compromising 23maintanability. 24 25 26The library sits somewhere in the middle between programming directly in 27intrinsics and even higher-level SIMD libraries. As much control as possible 28is given to the developer, so that it's possible to exactly predict what code 29the compiler will generate. 30</div> 31|- class="row" 32| 33 34'''Instruction sets''' 35<div class="mainpagediv"> 36[[arch/selection|Instruction set selection]]<br/> 37[[arch/dispatch|Dynamic dispatch]]<br/> 38</div> 39 40'''[[depr|Deprecations]]''' 41 42'''[[types|Types]]''' 43<div class="mainpagediv"> 44[[types/overview|Overview]]<br/> 45[[types/promotion|Vector type promotion]]<br/> 46</div> 47 48'''[[cap|Capabilities]]''' 49 50'''[[util | Utilities]]''' 51<div class="mainpagediv"> 52{{ltt|util#zzz|SIMDPP_ALIGN}}<br/> 53{{ltt|util/aligned_allocator}}<br/> 54[[util#Vector_size_macros|Vector size macros]]<br/> 55[[util#Enabled_instruction_set | Enabled instruction set]] 56</div> 57 58'''[[conv | Conversions]]''' 59<div class="mainpagediv"> 60{{ltt|conv/to_int8}} {{ltt|conv/to_uint8}}<br/> 61{{ltt|conv/to_int16}} {{ltt|conv/to_uint16}}<br/> 62{{ltt|conv/to_int32}} {{ltt|conv/to_uint32}}<br/> 63{{ltt|conv/to_int64}} {{ltt|conv/to_uint64}}<br/> 64{{ltt|conv/to_float32}} {{ltt|conv/to_float64}}<br/> 65{{ltt|conv/to_mask}} 66</div> 67 68| 69 70'''[[bitwise | Bitwise operations]]''' 71<div class="mainpagediv"> 72{{ltt|bitwise/bit_and}} {{ltt|bitwise/bit_andnot}} <br/> 73{{ltt|bitwise/bit_or}} {{ltt|bitwise/bit_xor}} <br/> 74{{ltt|bitwise/bit_not}} <br/> 75</div> 76 77'''[[fp | Floating-point operations]]''' 78<div class="mainpagediv"> 79{{ltt|fp/add}} {{ltt|fp/sub}} <br/> 80{{ltt|fp/mul}} {{ltt|fp/div}} <br/> 81{{ltt|fp/fmadd}} {{ltt|fp/fmsub}} <br/> 82{{ltt|fp/neg}} <br/> 83{{ltt|fp/round}} {{ltt|fp/trunc}} <br/> 84{{ltt|fp/floor}} {{ltt|fp/ceil}} <br/> 85{{ltt|fp/cmp_eq}} {{ltt|fp/cmp_neq}} <br/> 86{{ltt|fp/cmp_lt}} {{ltt|fp/cmp_gt}} <br/> 87{{ltt|fp/cmp_le}} {{ltt|fp/cmp_ge}} <br/> 88{{ltt|fp/abs}} {{ltt|fp/sign}} <br/> 89{{ltt|fp/min}} {{ltt|fp/max}} <br/> 90{{ltt|fp/isnan}} {{ltt|fp/isnan2}} <br/> 91{{ltt|fp/sqrt}} <br/> 92{{ltt|fp/rcp_e}} {{ltt|fp/rcp_rh}} <br/> 93{{ltt|fp/rsqrt_e}} {{ltt|fp/rsqrt_rh}} <br/> 94{{ltt|fp/reduce_add}} {{ltt|fp/reduce_mul}} <br/> 95{{ltt|fp/reduce_min}} {{ltt|fp/reduce_max}} <br/> 96</div> 97 98'''[[operator | Operators]]''' 99<div class="mainpagediv"> 100{{tt|+}} {{tt|-}} 101{{tt|*}} {{tt|/}} 102{{tt|<<}} {{tt|>>}}<br/> 103{{tt|&}} {{tt|{{!}}}} 104{{tt|^}} {{tt|~}}<br/> 105{{tt|{{==}}}} {{tt|!{{=}}}} 106{{tt|>}} {{tt|>{{=}}}} 107{{tt|<}} {{tt|<{{=}}}}<br/> 108</div> 109| 110 111'''[[int | Integer operations]]''' 112 113<div class="mainpagediv"> 114{{ltt|int/add}} {{ltt|int/sub}} <br/> 115{{ltt|int/add_sat}} {{ltt|int/sub_sat}} <br/> 116{{ltt|int/mul_lo}} {{ltt|int/mul_hi}} <br/> 117{{ltt|int/mull}} {{ltt|int/neg}} <br/> 118{{ltt|int/cmp_eq}} {{ltt|int/cmp_neq}} <br/> 119{{ltt|int/cmp_lt}} {{ltt|int/cmp_gt}} <br/> 120{{ltt|int/cmp_le}} {{ltt|int/cmp_ge}} <br/> 121{{ltt|int/abs}} <br/> 122{{ltt|int/avg}} {{ltt|int/avg_trunc}} <br/> 123{{ltt|int/min}} {{ltt|int/max}} <br/> 124{{ltt|int/shift_l}} {{ltt|int/shift_r}} <br/> 125{{ltt|int/reduce_add}} {{ltt|int/reduce_mul}} <br/> 126{{ltt|int/reduce_min}} {{ltt|int/reduce_max}} <br/> 127{{ltt|int/reduce_and}} {{ltt|int/reduce_or}} <br/> 128</div> 129 130'''[[mem | Memory access]]''' 131<div class="mainpagediv"> 132{{ltt|mem/load}} {{ltt|mem/load_u}} <br/> 133{{ltt|mem/load_splat}} <br/> 134{{ltt|mem/load_packed2}}<br/> 135{{ltt|mem/load_packed3}} <br/> 136{{ltt|mem/load_packed4}} <br/> 137{{ltt|mem/store}} {{ltt|mem/stream}} <br/> 138{{ltt|mem/store_first}} {{ltt|mem/store_last}} <br/> 139{{ltt|mem/store_packed2}}<br/> 140{{ltt|mem/store_packed3}} <br/> 141{{ltt|mem/store_packed4}} <br/> 142</div> 143 144| 145 146'''[[shuffle | Shuffle operations]]''' 147<div class="mainpagediv"> 148{{ltt|shuffle/blend}} {{ltt|shuffle/splat}} <br/> 149{{ltt|shuffle/combine}} {{ltt|shuffle/split}} <br/> 150{{ltt|shuffle/permute2}} {{ltt|shuffle/permute4}} <br/> 151{{ltt|shuffle/shuffle2x2}} {{ltt|shuffle/shuffle4x2}} <br/> 152{{ltt|shuffle/transpose2}} {{ltt|shuffle/transpose4}} <br/><br/> 153 Shuffles operating on 128-bit blocks <br/> 154{{ltt | shuffle/alignX_128 | align16 align8 align4 align2 }} <br/> 155{{ltt | shuffle/splatX_128 | splat16 splat8 splat4 splat2 }} <br/> 156{{ltt | shuffle/moveX_l_128 | move16_l move8_l move4_l move2_l }} <br/> 157{{ltt | shuffle/moveX_r_128 | move16_r move8_r move4_r move2_r }} <br/> 158{{ltt | shuffle/zipX_hi_128 | zip16_hi zip8_hi zip4_hi zip2_hi }} <br/> 159{{ltt | shuffle/zipX_lo_128 | zip16_lo zip8_lo zip4_lo zip2_lo }} <br/> 160{{ltt | shuffle/unzipX_hi_128 | unzip16_hi unzip8_hi<br/>unzip4_hi unzip2_hi }} <br/> 161{{ltt | shuffle/unzipX_lo_128 | unzip16_lo unzip8_lo<br/>unzip4_lo unzip2_lo }} <br/> 162{{ltt | shuffle/make_shuffle_bytes16_mask}}<br/> 163{{ltt | shuffle/shuffle_bytes16}} {{ltt | shuffle/shuffle_zbytes16}}<br/> 164{{ltt | shuffle/permute_bytes16}} {{ltt | shuffle/permute_zbytes16}}<br/> 165</div> 166 167'''[[misc | Miscellaneous operations]]''' 168<div class="mainpagediv"> 169{{ltt|misc/make_int}} {{ltt|misc/make_uint}} {{ltt|misc/make_float}} <br/> 170{{ltt|misc/extract}} {{ltt|misc/insert}} {{ltt|misc/splat|splat{{small|(scalar)}}}} <br/> 171{{ltt|misc/for_each}} {{ltt|misc/test_bits_any}}<br/> 172{{ltt|misc/bit_cast}}<br/> 173{{ltt|misc/prefetch_read}} {{ltt|misc/prefetch_write}} 174</div> 175 176|- class="row rowbottom" 177| colspan=4| 178|} 179