project(PERFORMANCE_WITH_NAN) cmake_minimum_required(VERSION 3.0) include(${CMAKE_SOURCE_DIR}/Examples/1-HadamardProduct/multiplePerfTest.cmake) set(CONFIG_SQRT "512, 1024, 2048, 2664, 4096, 5008, 10000") set(NAN_DEF "std::numeric_limits::signaling_NaN()") set(INF_DEF "std::numeric_limits::infinity()") set(DENORM_DEF "std::numeric_limits::denorm_min()") set(MIN_TO_DENORM_DEF "std::numeric_limits::min()") set(SQRT_BASE_SRC sqrt_base.cpp main_sqrt.cpp) set(SQRT_VECTORIZE_SRC sqrt_vectorize.cpp main_sqrt.cpp) set(SQRT_INTRINSICS_SRC sqrt_intrinsics.cpp main_sqrt.cpp) multiplePerfTest("sqrtBase" sqrt base "" "${CONFIG_SQRT}" ${SQRT_BASE_SRC}) multiplePerfTest("sqrtVectorize" sqrt vectorize "${VECTORIZED_OPTION}" "${CONFIG_SQRT}" ${SQRT_VECTORIZE_SRC}) multiplePerfTest("sqrtIntrinsics" sqrt intrinsics "${VECTORIZED_OPTION}" "${CONFIG_SQRT}" ${SQRT_INTRINSICS_SRC}) phoenix_plotPerf("cmpSqrtSafe03" sqrt_base_O3 sqrt_vectorize_O3 sqrt_intrinsics_O3) phoenix_plotPerf("cmpSqrtSafe0fast" sqrt_base_Ofast sqrt_vectorize_Ofast sqrt_intrinsics_Ofast) multiplePerfTestValue("sqrtBaseNanO3" sqrt base nan -O3 "${NAN_DEF}" "" "${CONFIG_SQRT}" ${SQRT_BASE_SRC}) multiplePerfTestValue("sqrtVectorizeNanO3" sqrt vectorize nan -O3 "${NAN_DEF}" "${VECTORIZED_OPTION}" "${CONFIG_SQRT}" ${SQRT_VECTORIZE_SRC}) multiplePerfTestValue("sqrtIntrinsicsNanO3" sqrt intrinsics nan -O3 "${NAN_DEF}" "${VECTORIZED_OPTION}" "${CONFIG_SQRT}" ${SQRT_INTRINSICS_SRC}) multiplePerfTestValue("sqrtBaseInfO3" sqrt base inf -O3 "${INF_DEF}" "" "${CONFIG_SQRT}" ${SQRT_BASE_SRC}) multiplePerfTestValue("sqrtVectorizeInfO3" sqrt vectorize inf -O3 "${INF_DEF}" "${VECTORIZED_OPTION}" "${CONFIG_SQRT}" ${SQRT_VECTORIZE_SRC}) multiplePerfTestValue("sqrtIntrinsicsInfO3" sqrt intrinsics inf -O3 "${INF_DEF}" "${VECTORIZED_OPTION}" "${CONFIG_SQRT}" ${SQRT_INTRINSICS_SRC}) multiplePerfTestValue("sqrtBaseDenormO3" sqrt base denorm -O3 "${DENORM_DEF}" "" "${CONFIG_SQRT}" ${SQRT_BASE_SRC}) multiplePerfTestValue("sqrtVectorizeDenormO3" sqrt vectorize denorm -O3 "${DENORM_DEF}" "${VECTORIZED_OPTION}" "${CONFIG_SQRT}" ${SQRT_VECTORIZE_SRC}) multiplePerfTestValue("sqrtIntrinicsDenormO3" sqrt intrinsics denorm -O3 "${DENORM_DEF}" "${VECTORIZED_OPTION}" "${CONFIG_SQRT}" ${SQRT_INTRINSICS_SRC}) multiplePerfTestValue("sqrtBaseDenormDazO3" sqrt base denormDaz -O3 "${DENORM_DEF}" "${DENORM_DAZ_OPTION}" "${CONFIG_SQRT}" ${SQRT_BASE_SRC}) multiplePerfTestValue("sqrtVectorizeDenormDazO3" sqrt vectorize denormDaz -O3 "${DENORM_DEF}" "${VECTORIZED_OPTION} ${DENORM_DAZ_OPTION}" "${CONFIG_SQRT}" ${SQRT_VECTORIZE_SRC}) multiplePerfTestValue("sqrtIntrinicsDenormDazO3" sqrt intrinsics denormDaz -O3 "${DENORM_DEF}" "${VECTORIZED_OPTION} ${DENORM_DAZ_OPTION}" "${CONFIG_SQRT}" ${SQRT_INTRINSICS_SRC}) multiplePerfTestValue("sqrtBaseMakeDenormO3" sqrt base make_denorm -O3 "${MIN_TO_DENORM_DEF}" "" "${CONFIG_SQRT}" ${SQRT_BASE_SRC}) multiplePerfTestValue("sqrtVectorizeMakeDenormO3" sqrt vectorize make_denorm -O3 "${MIN_TO_DENORM_DEF}" "${VECTORIZED_OPTION}" "${CONFIG_SQRT}" ${SQRT_VECTORIZE_SRC}) multiplePerfTestValue("sqrtIntrinicsMakeDenormO3" sqrt intrinsics make_denorm -O3 "${MIN_TO_DENORM_DEF}" "${VECTORIZED_OPTION}" "${CONFIG_SQRT}" ${SQRT_INTRINSICS_SRC})