diff --git a/README.md b/README.md index 9e06926..0370e57 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ This repo provides pleasant Nim bindings for various SIMD instructions. Each SIMD instruction set is in its own file for importing. -## Basic Example +In addition to direct bindings to the SIMD instructions, there are also operator overloads to make for much more readable code (that is also easier to write!). See this basic example: ```nim import nimsimd/sse2 diff --git a/src/nimsimd/sse2.nim b/src/nimsimd/sse2.nim index 8a03a7d..8f32cdf 100644 --- a/src/nimsimd/sse2.nim +++ b/src/nimsimd/sse2.nim @@ -73,6 +73,9 @@ func mm_and_si128*(a, b: M128i): M128i func m128*(a: float32): M128 {.inline.} = mm_set1_ps(a) +func m128i*(a: int32): M128i {.inline.} = + mm_set1_epi32(a) + func `and`*(a, b: M128): M128 {.inline.} = mm_and_ps(a, b)