-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
65 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,10 +8,6 @@ TODO List: | |
|
||
### vfrstp.b/h | ||
|
||
### vfsub.s/d | ||
|
||
### vfmul.s/d | ||
|
||
### vfmax.s/d | ||
|
||
### vfmin.s/d | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
for (int i = 0; i < 2; i++) { | ||
dst.fp64[i] = a.fp64[i] + b.fp64[i]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
for (int i = 0; i < 2; i++) { | ||
dst.fp32[i] = a.fp32[i] + b.fp32[i]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
for (int i = 0; i < 2; i++) { | ||
dst.fp64[i] = a.fp64[i] * b.fp64[i]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
for (int i = 0; i < 2; i++) { | ||
dst.fp32[i] = a.fp32[i] * b.fp32[i]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
for (int i = 0; i < 2; i++) { | ||
dst.fp64[i] = a.fp64[i] - b.fp64[i]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
for (int i = 0; i < 2; i++) { | ||
dst.fp32[i] = a.fp32[i] - b.fp32[i]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,13 @@ | ||
# Floating Point Computation | ||
|
||
## __m128d __lsx_vfadd_d (__m128d a, __m128d b) | ||
|
||
### Synopsis | ||
|
||
```c++ | ||
__m128d __lsx_vfadd_d (__m128d a, __m128d b) | ||
#include <lsxintrin.h> | ||
Instruction: vfadd.d vr, vr, vr | ||
CPU Flags: LSX | ||
``` | ||
### Description | ||
Add double precision floating point elements in `a` to `b` and store the result in `dst`. | ||
### Operation | ||
```c++ | ||
for (int i = 0;i < 2;i++) { | ||
dst.fp64[i] = a.fp64[i] + b.fp64[i]; | ||
} | ||
``` | ||
|
||
## __m128 __lsx_vfadd_s (__m128 a, __m128 b) | ||
|
||
### Synopsis | ||
|
||
```c++ | ||
__m128d __lsx_vfadd_s (__m128d a, __m128d b) | ||
#include <lsxintrin.h> | ||
Instruction: vfadd.s vr, vr, vr | ||
CPU Flags: LSX | ||
``` | ||
### Description | ||
Add single precision floating point elements in `a` to `b` and store the result in `dst`. | ||
### Operation | ||
```c++ | ||
for (int i = 0;i < 4;i++) { | ||
dst.fp32[i] = a.fp32[i] + b.fp32[i]; | ||
} | ||
``` | ||
{{ vfadd('s') }} | ||
{{ vfadd('d') }} | ||
|
||
{{ vfdiv('s') }} | ||
{{ vfdiv('d') }} | ||
|
||
{{ vfmul('s') }} | ||
{{ vfmul('d') }} | ||
|
||
{{ vfsub('s') }} | ||
{{ vfsub('d') }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters