Skip to content

Commit

Permalink
Merge pull request #977 from kubo39/patch-avx2
Browse files Browse the repository at this point in the history
Add has_avx2/has_avx512f
  • Loading branch information
Cobrand authored Apr 20, 2020
2 parents 2b460ff + 746cad7 commit 6b7dbb6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/sdl2/cpuinfo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ pub fn has_avx() -> bool {
unsafe { sys::SDL_HasAVX() == SDL_bool::SDL_TRUE }
}

pub fn has_avx2() -> bool {
unsafe { sys::SDL_HasAVX2() == SDL_bool::SDL_TRUE }
}

pub fn has_avx512f() -> bool {
unsafe { sys::SDL_HasAVX512F() == SDL_bool::SDL_TRUE }
}

pub fn system_ram() -> i32 {
unsafe { sys::SDL_GetSystemRAM() }
}

0 comments on commit 6b7dbb6

Please sign in to comment.