mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-05-01 08:14:10 +08:00
Made the comparison of Eigen::array GPU friendly
This commit is contained in:
parent
25f69cb932
commit
b72ffcb05e
@ -180,7 +180,7 @@ template <typename T> class array<T, 0> {
|
|||||||
// Comparison operator
|
// Comparison operator
|
||||||
// Todo: implement !=, <, <=, >, and >=
|
// Todo: implement !=, <, <=, >, and >=
|
||||||
template<class T, std::size_t N>
|
template<class T, std::size_t N>
|
||||||
bool operator==(const array<T,N>& lhs, const array<T,N>& rhs) {
|
EIGEN_DEVICE_FUNC bool operator==(const array<T,N>& lhs, const array<T,N>& rhs) {
|
||||||
for (std::size_t i = 0; i < N; ++i) {
|
for (std::size_t i = 0; i < N; ++i) {
|
||||||
if (lhs[i] != rhs[i]) {
|
if (lhs[i] != rhs[i]) {
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user