mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
fix arm build warnings
This commit is contained in:
committed by
Antonio Sánchez
parent
81fe2d424f
commit
6e7abeae69
@@ -91,8 +91,8 @@ struct TensorContractionBlockMemAllocator {
|
||||
eigen_assert(rhs_block);
|
||||
BlockSizes sz = ComputeLhsRhsBlockSizes(bm, bk, bn);
|
||||
char* block_mem = static_cast<char*>(d.allocate(sz.lhs_size + sz.rhs_size));
|
||||
*lhs_block = reinterpret_cast<LhsScalar*>(block_mem);
|
||||
*rhs_block = reinterpret_cast<RhsScalar*>(block_mem + sz.lhs_size);
|
||||
*lhs_block = static_cast<LhsScalar*>(static_cast<void*>(block_mem));
|
||||
*rhs_block = static_cast<RhsScalar*>(static_cast<void*>(block_mem + sz.lhs_size));
|
||||
return block_mem;
|
||||
}
|
||||
|
||||
@@ -115,12 +115,12 @@ struct TensorContractionBlockMemAllocator {
|
||||
for (Index x = 0; x < num_slices; x++) {
|
||||
if (num_lhs > 0) lhs_blocks[x].resize(num_lhs);
|
||||
for (Index m = 0; m < num_lhs; m++) {
|
||||
lhs_blocks[x][m] = reinterpret_cast<LhsScalar*>(mem);
|
||||
lhs_blocks[x][m] = static_cast<LhsScalar*>(static_cast<void*>(mem));
|
||||
mem += sz.lhs_size;
|
||||
}
|
||||
if (num_rhs > 0) rhs_blocks[x].resize(num_rhs);
|
||||
for (Index n = 0; n < num_rhs; n++) {
|
||||
rhs_blocks[x][n] = reinterpret_cast<RhsScalar*>(mem);
|
||||
rhs_blocks[x][n] = static_cast<RhsScalar*>(static_cast<void*>(mem));
|
||||
mem += sz.rhs_size;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -423,7 +423,7 @@ struct sizes_match_below_dim {
|
||||
template <typename Dims1, typename Dims2, ptrdiff_t n>
|
||||
struct sizes_match_below_dim<Dims1, Dims2, n, n> {
|
||||
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool run(Dims1& dims1, Dims2& dims2) {
|
||||
return (array_get<n-1>(dims1) == array_get<n-1>(dims2)) &&
|
||||
return numext::equal_strict(array_get<n - 1>(dims1), array_get<n - 1>(dims2)) &&
|
||||
sizes_match_below_dim<Dims1, Dims2, n-1, n-1>::run(dims1, dims2);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user