mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-15 07:10:37 +08:00
Fix some sign-compare warnings
This commit is contained in:
parent
0851d5d210
commit
25a03c02d6
@ -273,7 +273,7 @@ struct TensorEvaluator<const TensorContractionOp<Indices, LeftArgType, RightArgT
|
||||
// First, we are interested in parallel packing if there are few tasks.
|
||||
bool parallel_pack = num_threads >= nm * nn;
|
||||
// Also do parallel packing if all data fits into L2$.
|
||||
if (m * bk * sizeof(LhsScalar) + n * bk * sizeof(RhsScalar) <=
|
||||
if (m * bk * Index(sizeof(LhsScalar)) + n * bk * Index(sizeof(RhsScalar)) <=
|
||||
l2CacheSize() * num_threads)
|
||||
parallel_pack = true;
|
||||
// But don't do it if we will use each rhs only once. Locality seems to be
|
||||
@ -361,7 +361,7 @@ struct TensorEvaluator<const TensorContractionOp<Indices, LeftArgType, RightArgT
|
||||
packed_mem_ = static_cast<char*>(internal::aligned_malloc(
|
||||
(nm0_ * lhs_size + nn0_ * rhs_size) * std::min<size_t>(nk_, P - 1)));
|
||||
char* mem = static_cast<char*>(packed_mem_);
|
||||
for (Index x = 0; x < numext::mini<size_t>(nk_, P - 1); x++) {
|
||||
for (Index x = 0; x < numext::mini<Index>(nk_, P - 1); x++) {
|
||||
packed_lhs_[x].resize(nm0_);
|
||||
for (Index m = 0; m < nm0_; m++) {
|
||||
packed_lhs_[x][m] = reinterpret_cast<LhsScalar*>(mem);
|
||||
|
Loading…
Reference in New Issue
Block a user