/*************************************** Auteur : Pierre Aubert Mail : aubertp7@gmail.com Licence : CeCILL-C ****************************************/ #include #include "phoenix_intrinsics.h" #include "function_vectorize.h" ///Do the function call /** @param[out] ptabResult : table of results of function(tabX) * @param ptabX : input table * @param nbElement : number of elements in the tables */ void function_vectorize(float* __restrict__ ptabResult, const float* __restrict__ ptabX, size_t nbElement){ float* tabResult = (float*)__builtin_assume_aligned(ptabResult, PLIB_VECTOR_SIZE_BYTE_FLOAT); const float* tabX = (const float*)__builtin_assume_aligned(ptabX, PLIB_VECTOR_SIZE_BYTE_FLOAT); for(size_t i(0lu); i < nbElement; ++i){ tabResult[i] = std::COMPUTE_FUNCTION_DEF(tabX[i]); } }