1 use crate::sys; 2 3 pub const CACHELINESIZE: u8 = 128; 4 cpu_count() -> i325pub fn cpu_count() -> i32 { 6 unsafe { sys::SDL_GetCPUCount() } 7 } 8 cpu_cache_line_size() -> i329pub fn cpu_cache_line_size() -> i32 { 10 unsafe { sys::SDL_GetCPUCacheLineSize() } 11 } 12 has_rdtsc() -> bool13pub fn has_rdtsc() -> bool { 14 unsafe { sys::SDL_HasRDTSC() == sys::SDL_bool::SDL_TRUE } 15 } 16 has_alti_vec() -> bool17pub fn has_alti_vec() -> bool { 18 unsafe { sys::SDL_HasAltiVec() == sys::SDL_bool::SDL_TRUE } 19 } 20 has_mmx() -> bool21pub fn has_mmx() -> bool { 22 unsafe { sys::SDL_HasMMX() == sys::SDL_bool::SDL_TRUE } 23 } 24 has_3d_now() -> bool25pub fn has_3d_now() -> bool { 26 unsafe { sys::SDL_Has3DNow() == sys::SDL_bool::SDL_TRUE } 27 } 28 has_sse() -> bool29pub fn has_sse() -> bool { 30 unsafe { sys::SDL_HasSSE() == sys::SDL_bool::SDL_TRUE } 31 } 32 has_sse2() -> bool33pub fn has_sse2() -> bool { 34 unsafe { sys::SDL_HasSSE2() == sys::SDL_bool::SDL_TRUE } 35 } 36 has_sse3() -> bool37pub fn has_sse3() -> bool { 38 unsafe { sys::SDL_HasSSE3() == sys::SDL_bool::SDL_TRUE } 39 } 40 has_sse41() -> bool41pub fn has_sse41() -> bool { 42 unsafe { sys::SDL_HasSSE41() == sys::SDL_bool::SDL_TRUE } 43 } 44 has_sse42() -> bool45pub fn has_sse42() -> bool { 46 unsafe { sys::SDL_HasSSE42() == sys::SDL_bool::SDL_TRUE } 47 } 48 has_avx() -> bool49pub fn has_avx() -> bool { 50 unsafe { sys::SDL_HasAVX() == sys::SDL_bool::SDL_TRUE } 51 } 52 system_ram() -> i3253pub fn system_ram() -> i32 { 54 unsafe { sys::SDL_GetSystemRAM() } 55 } 56