Research Article
Inastemp: A Novel Intrinsics-as-Template Library for Portable SIMD-Vectorization
| (1) template <VecType> | | (2) void user_function( / … / ) | | (3) | | (4) | | (5) | | (6) // To compute in release mode | | (7) user_function<InaVecBestType<double>>(/ … /); | | (8) | | (9) // To record the number of Flops | | (10) user_function<InaVecFLOPS<InaVecBestType<double>>>(/ … /); | | (11) | | (12) // Flops counters | | (13) InaVecFLOPS<InaVecBestType<double>>::GetFlopsStats().getMulOp(); | | (14) InaVecFLOPS<InaVecBestType<double>>::GetFlopsStats().getDivOp(); | | (15) InaVecFLOPS<InaVecBestType<double>>::GetFlopsStats().getAddOp(); | | (16) InaVecFLOPS<InaVecBestType<double>>::GetFlopsStats().getSubOp(); | | (17) // For Sqrt and Rsqrt it will be the number of calls times the length of the vector | | (18) InaVecFLOPS<InaVecBestType<double>>::GetFlopsStats().getRsqrt(); | | (19) InaVecFLOPS<InaVecBestType<double>>::GetFlopsStats().getSqrt(); |
|