/***************************************
	Auteur : Pierre Aubert
	Mail : pierre.aubert@lapp.in2p3.fr
	Licence : CeCILL-C
****************************************/
#include "phoenix_intrinsics.h"
#include "sqrt_intrinsics.h"
///Do the Hadamard product
/**	@param[out] tabResult : table of results of tabX*tabY
 * 	@param tabX : input table
 * 	@param nbElement : number of elements in the tables
*/
void sqrt_intrinsics(float* tabResult, const float* tabX, size_t nbElement){
	size_t vecSize(PLIB_VECTOR_SIZE_FLOAT);
	size_t nbVec(nbElement/vecSize);
	for(size_t i(0lu); i < nbVec; ++i){
		PRegVecf vecX = plib_load_ps(tabX + i*vecSize);
		PRegVecf vecRes = plib_sqrt_ps(vecX);
		plib_store_ps(tabResult + i*vecSize, vecRes);
	}
}



