본문 바로가기

IT/Basic

[Basic] avx

1. avx실행가능 확인

 

AVX (Advanced Vector eXtensions) 란?

AVX는 Advanced Vector eXtensions의 약자로 2008년 4월 인텔 개발자 포럼에서 x86 SIMD Instruction Set로 SSE Instruction Set series의 후속작이다. 2011년에 출시된 Intel SandyBridge microarchitecture 부..

corona-world.tistory.com

 

 

How to tell if a Linux machine supports AVX/AVX2 instructions?

I'm on SUSE Linux Enterprise 10/11 machines. I launch my regressions to a farm of machines running Intel processors. Some of my tests fail because my tools are built using a library which requires ...

stackoverflow.com

 

 

Are different mmx, sse and avx versions complementary or supersets of each other?

I'm thinking I should familiarize myself with x86 SIMD extensions. But before I even began I ran into trouble. I can't find a good overview on which of them are still relevant. The x86 architectur...

stackoverflow.com

 

2. define 매크로

 

미리 정의된 매크로

Microsoft C++ 컴파일러의 미리 정의된 전처리기 매크로가 나열 및 설명되어 있습니다.

docs.microsoft.com

 

#ifdef __SSE__

#ifdef __SSE2__

#ifdef __SSE3__

#ifdef __SSE4_1__

#ifdef __AVX__

...etc...
 

Detect the availability of SSE/SSE2 instruction set in Visual Studio

How can I check in code whether SSE/SSE2 is enabled or not by the Visual Studio compiler? I have tried #ifdef __SSE__ but it didn't work.

stackoverflow.com


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")
 

kshitijl/avx2-examples

Short examples illustrating AVX2 intrinsics for simple tasks. - kshitijl/avx2-examples

github.com

 

 

Add cmake support to build with AVX2 & C++14/17 · aerosayan/xndarr@2b3d75b

- Addresses #1 - Added AVX2 and C++17 compilation support. - Added CMAKE_CXX_FLAGS i.e C++ flags support.

github.com

 

'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