Skip to content

Commit

Permalink
sse3
Browse files Browse the repository at this point in the history
  • Loading branch information
guzba committed Dec 1, 2020
1 parent edf24f1 commit daa8705
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Instruction Set | Bindings
--- | ---:
SSE | ✅
SSE2 | ✅
SSE3 |
SSE3 |
SSSE3 | ⛔
SSE4.1 | ⛔
SSE4.2 | ⛔
Expand Down
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.3"
version = "0.4.4"
author = "Ryan Oldenburg"
description = "."
license = "MIT"
Expand Down
4 changes: 2 additions & 2 deletions src/nimsimd/sse2.nim
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ type

# "xmmintrin.h"

func mm_add_ps*(a: M128, b: M128): M128
func mm_add_ps*(a, b: M128): M128
{.importc: "_mm_add_ps", header: "xmmintrin.h".}

func mm_add_ss*(a: M128, b: M128): M128
func mm_add_ss*(a, b: M128): M128
{.importc: "_mm_add_ss", header: "xmmintrin.h".}

func mm_and_ps*(a, b: M128): M128
Expand Down
39 changes: 39 additions & 0 deletions src/nimsimd/sse3.nim
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
## SSE3 instructions

import sse2
export sse2

# "pmmintrin.h"

func mm_addsub_pd*(a, b: M128d): M128d
{.importc: "_mm_addsub_pd", header: "pmmintrin.h".}

func mm_addsub_ps*(a, b: M128): M128
{.importc: "_mm_addsub_ps", header: "pmmintrin.h".}

func mm_hadd_pd*(a, b: M128d): M128d
{.importc: "_mm_hadd_pd", header: "pmmintrin.h".}

func mm_hadd_ps *(a, b: M128): M128
{.importc: "_mm_hadd_ps", header: "pmmintrin.h".}

func mm_hsub_pd*(a, b: M128d): M128d
{.importc: "_mm_hsub_pd", header: "pmmintrin.h".}

func mm_hsub_ps*(a, b: M128): M128
{.importc: "_mm_hsub_ps", header: "pmmintrin.h".}

func mm_lddqu_si128*(p: pointer): M128i
{.importc: "_mm_lddqu_si128", header: "pmmintrin.h".}

func mm_loaddup_pd*(p: pointer): M128d
{.importc: "_mm_loaddup_pd", header: "pmmintrin.h".}

func mm_movedup_pd*(a: M128d): M128d
{.importc: "_mm_movedup_pd", header: "pmmintrin.h".}

func mm_movehdup_ps*(a: M128): M128
{.importc: "_mm_movehdup_ps", header: "pmmintrin.h".}

func mm_moveldup_ps*(a: M128): M128
{.importc: "_mm_moveldup_ps", header: "pmmintrin.h".}

0 comments on commit daa8705

Please sign in to comment.