Skip to content

Commit

Permalink
0.4.5
Browse files Browse the repository at this point in the history
  • Loading branch information
guzba committed Dec 9, 2020
1 parent daa8705 commit 28b37c4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nimsimd.nimble
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "0.4.4"
version = "0.4.5"
author = "Ryan Oldenburg"
description = "."
license = "MIT"
Expand Down
10 changes: 8 additions & 2 deletions src/nimsimd/sse2.nim
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ type
M128i* {.importc: "__m128i", header: "emmintrin.h".} = object
M128d* {.importc: "__m128d", header: "emmintrin.h".} = object

# template MM_SHUFFLE*(z, y, x, w: int | uint): uint32 =
# ((w shl 6) or (x shl 4) or (y shl 2) or z).uint32

# "xmmintrin.h"

func mm_add_ps*(a, b: M128): M128
Expand Down Expand Up @@ -609,13 +612,13 @@ func mm_loadl_pd*(a: M128d, p: pointer): M128i
func mm_loadr_pd*(p: pointer): M128d
{.importc: "_mm_loadr_pd", header: "emmintrin.h".}

func mm_loadu_pd*(a: M128d, p: pointer): M128d
func mm_loadu_pd*(p: pointer): M128d
{.importc: "_mm_loadu_pd", header: "emmintrin.h".}

func mm_loadu_si128*(p: pointer): M128i
{.importc: "_mm_loadu_si128", header: "emmintrin.h".}

func mm_loadu_si32*(a: M128d, p: pointer): M128i
func mm_loadu_si32*(p: pointer): M128i
{.importc: "_mm_loadu_si32", header: "emmintrin.h".}

func mm_madd_epi16*(a, b: M128i): M128i
Expand Down Expand Up @@ -972,6 +975,9 @@ func m128*(): M128 {.inline.} =
func m128*(a: float32): M128 {.inline.} =
mm_set1_ps(a)

func m128*(a, b, c, d: float32): M128 {.inline.} =
mm_set_ps(a, b, c, d)

func m128d*(): M128d {.inline.} =
mm_setzero_pd()

Expand Down

0 comments on commit 28b37c4

Please sign in to comment.