GCC Code Coverage Report


Directory: ./
File: TESTS/PERFORMANCE_TESTS/PERF_HADAMARD_PROXY/HadamardProductProxy/hadamard_product.cpp
Date: 2025-03-14 12:14:21
Exec Total Coverage
Lines: 0 6 0.0%
Branches: 0 2 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
8 #include "hadamard_product.h"
9
10
11 ///Do the Hadamard product
12 /** @param[out] ptabResult : table of results of tabX*tabY
13 * @param ptabX : input table
14 * @param ptabY : input table
15 * @param nbElement : number of elements in the tables
16 */
17 void hadamard_product(float* __restrict__ ptabResult, const float* __restrict__ ptabX, const float* __restrict__ ptabY, long unsigned int nbElement){
18 const float* tabX = (const float*)__builtin_assume_aligned(ptabX, FLOAT_VECTOR_ALIGNEMENT);
19 const float* tabY = (const float*)__builtin_assume_aligned(ptabY, FLOAT_VECTOR_ALIGNEMENT);
20 float* tabResult = (float*)__builtin_assume_aligned(ptabResult, FLOAT_VECTOR_ALIGNEMENT);
21
22 for(long unsigned int i(0lu); i < nbElement; ++i){
23 tabResult[i] = tabX[i]*tabY[i];
24 }
25 }
26
27
28