Added AVX2 detection to cmake and created CPU acceleration macro