mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-21 07:19:46 +08:00
Silenced some compilation warnings
This commit is contained in:
parent
bb483313f6
commit
56ea45ff0f
@ -34,7 +34,7 @@ static void test_fixed_size()
|
||||
VERIFY_IS_EQUAL((int)Eigen::internal::array_get<0>(dimensions), 2);
|
||||
VERIFY_IS_EQUAL((int)Eigen::internal::array_get<1>(dimensions), 3);
|
||||
VERIFY_IS_EQUAL((int)Eigen::internal::array_get<2>(dimensions), 7);
|
||||
VERIFY_IS_EQUAL(dimensions.TotalSize(), 2*3*7);
|
||||
VERIFY_IS_EQUAL(dimensions.TotalSize(), 2ul*3*7);
|
||||
}
|
||||
|
||||
|
||||
|
@ -44,7 +44,7 @@ struct MyGenerator {
|
||||
// location of the entry to set in the tensor, it can typically
|
||||
// be ignored.
|
||||
int operator()(Eigen::DenseIndex element_location, Eigen::DenseIndex /*unused*/ = 0) const {
|
||||
return 3 * element_location;
|
||||
return static_cast<int>(3 * element_location);
|
||||
}
|
||||
|
||||
// Same as above but generates several numbers at a time.
|
||||
@ -53,7 +53,7 @@ struct MyGenerator {
|
||||
const int packetSize = internal::packet_traits<int>::size;
|
||||
EIGEN_ALIGN_DEFAULT int values[packetSize];
|
||||
for (int i = 0; i < packetSize; ++i) {
|
||||
values[i] = 3 * (packet_location + i);
|
||||
values[i] = static_cast<int>(3 * (packet_location + i));
|
||||
}
|
||||
return internal::pload<typename internal::packet_traits<int>::type>(values);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user