-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement experimental SIMD 4x4 matrix products with AVX2
- The new functions are enabled only when compiling with MSVC and "/arch:AVX2".
- Loading branch information
1 parent
b8721b6
commit 34b6e4f
Showing
19 changed files
with
1,003 additions
and
362 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
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,23 +1,23 @@ | ||
/*------------------------------------------------------------------------- | ||
@@COPYRIGHT@@ | ||
*-----------------------------------------------------------------------*/ | ||
|
||
#pragma once | ||
|
||
#include <cml/matrix/readable_matrix.h> | ||
#include <cml/matrix/promotion.h> | ||
|
||
namespace cml { | ||
|
||
/** Multiply two matrices, and return the result as a temporary. */ | ||
template<class Sub1, class Sub2, enable_if_matrix_t<Sub1>* = nullptr, | ||
enable_if_matrix_t<Sub2>* = nullptr> | ||
auto operator*(Sub1&& sub1, Sub2&& sub2) | ||
-> matrix_inner_product_promote_t<actual_operand_type_of_t<decltype(sub1)>, | ||
actual_operand_type_of_t<decltype(sub2)>>; | ||
|
||
} // namespace cml | ||
|
||
#define __CML_MATRIX_MATRIX_PRODUCT_TPP | ||
#include <cml/matrix/matrix_product.tpp> | ||
#undef __CML_MATRIX_MATRIX_PRODUCT_TPP | ||
/*------------------------------------------------------------------------- | ||
@@COPYRIGHT@@ | ||
*-----------------------------------------------------------------------*/ | ||
|
||
#pragma once | ||
|
||
#include <cml/matrix/readable_matrix.h> | ||
#include <cml/matrix/promotion.h> | ||
#include <cml/matrix/detail/resize.h> | ||
|
||
namespace cml { | ||
|
||
/** Multiply two matrices and return the result as a temporary. */ | ||
template<class Sub1, class Sub2, typename = enable_if_matrix_t<Sub1>, | ||
typename = enable_if_matrix_t<Sub2>> | ||
auto operator*(Sub1&& sub1, Sub2&& sub2) -> matrix_inner_product_promote_t< | ||
actual_type_of_t<Sub1>, actual_type_of_t<Sub2>>; | ||
|
||
} // namespace cml | ||
|
||
#define __CML_MATRIX_MATRIX_PRODUCT_TPP | ||
#include <cml/matrix/matrix_product.tpp> | ||
#undef __CML_MATRIX_MATRIX_PRODUCT_TPP |
Oops, something went wrong.