Chapter 6.1 : What is the Hadamard product ?

The Hadamard product is a multiplication of two vector, element-wise, in a third vector :
nothing

In C++ code :

1
2
3
4
5
void hadamard_product(float* tabResult, const float * tabX, const float* tabY, long unsigned int nbElement){
	for(long unsigned int i(0lu); i < nbElement; ++i){
		tabResult[i] = tabX[i]*tabY[i];
	}
}