GCC Code Coverage Report


Directory: ./
File: TESTS/PERFORMANCE_TESTS/PERF_HADAMARD_PROXY/main.cpp
Date: 2025-03-14 12:14:21
Exec Total Coverage
Lines: 0 13 0.0%
Branches: 0 18 0.0%

Line Branch Exec Source
1 /***************************************
2 Auteur : Pierre Aubert
3 Mail : pierre.aubert@lapp.in2p3.fr
4 Licence : CeCILL-C
5 ****************************************/
6
7 #include <iostream>
8
9 #include "micro_benchmark.h"
10 #include "custom_malloc.h"
11
12 #include "hadamard_product.h"
13
14 ///Get the number of nanoseconds per elements
15 /** @param nbElement : number of elements of the tables
16 */
17 void evaluateHadamardProduct(size_t nbElement){
18 float * tabX = (float*)custom_aligned_malloc(sizeof(float)*nbElement);
19 float * tabY = (float*)custom_aligned_malloc(sizeof(float)*nbElement);
20 float * tabRes = (float*)custom_aligned_malloc(sizeof(float)*nbElement);
21
22 for(size_t i(0lu); i < nbElement; ++i){
23 tabX[i] = i*19lu%11;
24 tabY[i] = i*27lu%19;
25 }
26 micro_benchmarkAutoNsPrint("evaluate hadamard product", nbElement, hadamard_product, tabRes, tabX, tabY, nbElement);
27
28 custom_aligned_free(tabRes);
29 custom_aligned_free(tabY);
30 custom_aligned_free(tabX);
31 }
32
33 int main(int argc, char** argv){
34 return micro_benchmarkParseArg(argc, argv, evaluateHadamardProduct);
35 }
36
37
38