1. avx실행가능 확인
2. define 매크로
#ifdef __SSE__
#ifdef __SSE2__
#ifdef __SSE3__
#ifdef __SSE4_1__
#ifdef __AVX__
...etc...
3. avx 실행
gcc foo.c -mavx2
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_FLAGS "-O3 -Wall -Werror")
target_compile_options(xndarr PUBLIC "--std=c++17")
target_compile_options(xndarr PUBLIC "-mavx2")
'IT > Basic' 카테고리의 다른 글
col, row Major (0) | 2020.07.16 |
---|---|
single floating point (0) | 2020.07.15 |
load, store 명령어 / 메모리 계층 (0) | 2020.07.15 |
비트 연산 (0) | 2020.07.09 |
cmake란? (0) | 2020.07.07 |