-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:marcel303/framework
- Loading branch information
Showing
51 changed files
with
5,614 additions
and
5,472 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
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,73 @@ | ||
#include "audioTypes.h" | ||
|
||
#if AUDIO_USE_SSE && defined(WIN32) | ||
|
||
// Clang and GCC support this nice syntax where vector types support the same basic operations as floats or integers. on Windows we need to re-implement a subset here to make the code compile | ||
|
||
inline __m128 operator+(__m128 a, __m128 b) | ||
{ | ||
return _mm_add_ps(a, b); | ||
} | ||
|
||
inline __m128 operator-(__m128 a, __m128 b) | ||
{ | ||
return _mm_sub_ps(a, b); | ||
} | ||
|
||
inline __m128 operator*(__m128 a, __m128 b) | ||
{ | ||
return _mm_mul_ps(a, b); | ||
} | ||
|
||
inline __m128d operator+(__m128d a, __m128d b) | ||
{ | ||
return _mm_add_pd(a, b); | ||
} | ||
|
||
inline __m128d operator-(__m128d a, __m128d b) | ||
{ | ||
return _mm_sub_pd(a, b); | ||
} | ||
|
||
inline __m128d operator*(__m128d a, __m128d b) | ||
{ | ||
return _mm_mul_pd(a, b); | ||
} | ||
|
||
#if __AVX__ | ||
|
||
#include <immintrin.h> | ||
|
||
inline __m256 operator+(__m256 a, __m256 b) | ||
{ | ||
return _mm256_add_ps(a, b); | ||
} | ||
|
||
inline __m256 operator-(__m256 a, __m256 b) | ||
{ | ||
return _mm256_sub_ps(a, b); | ||
} | ||
|
||
inline __m256 operator*(__m256 a, __m256 b) | ||
{ | ||
return _mm256_mul_ps(a, b); | ||
} | ||
|
||
inline __m256d operator+(__m256d a, __m256d b) | ||
{ | ||
return _mm256_add_pd(a, b); | ||
} | ||
|
||
inline __m256d operator-(__m256d a, __m256d b) | ||
{ | ||
return _mm256_sub_pd(a, b); | ||
} | ||
|
||
inline __m256d operator*(__m256d a, __m256d b) | ||
{ | ||
return _mm256_mul_pd(a, b); | ||
} | ||
|
||
#endif | ||
|
||
#endif |
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
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
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
Binary file not shown.
Binary file not shown.
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
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
Oops, something went wrong.