mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 11:49:02 +08:00
Fix maybe-unitialized warnings in TensorContractionThreadPool
This commit is contained in:
parent
553caeb6a3
commit
bf8866b466
@ -56,7 +56,7 @@
|
|||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#endif
|
#endif
|
||||||
// g++ warns about local variables shadowing member functions, which is too strict
|
// g++ warns about local variables shadowing member functions, which is too strict
|
||||||
#pragma GCC diagnostic ignored "-Wshadow"
|
// #pragma GCC diagnostic ignored "-Wshadow"
|
||||||
#if __GNUC__ == 4 && __GNUC_MINOR__ < 8
|
#if __GNUC__ == 4 && __GNUC_MINOR__ < 8
|
||||||
// Until g++-4.7 there are warnings when comparing unsigned int vs 0, even in templated functions:
|
// Until g++-4.7 there are warnings when comparing unsigned int vs 0, even in templated functions:
|
||||||
#pragma GCC diagnostic ignored "-Wtype-limits"
|
#pragma GCC diagnostic ignored "-Wtype-limits"
|
||||||
|
@ -679,10 +679,10 @@ struct TensorEvaluator<const TensorContractionOp<Indices, LeftArgType, RightArgT
|
|||||||
|
|
||||||
// Reuse pre-allocated thread local buffers.
|
// Reuse pre-allocated thread local buffers.
|
||||||
BlockType* thread_local_pre_allocated_base_ = nullptr;
|
BlockType* thread_local_pre_allocated_base_ = nullptr;
|
||||||
size_t grain_size_;
|
size_t grain_size_ = 0;
|
||||||
|
|
||||||
// These will be initialized only if `is_pre_allocated == false`.
|
// These will be initialized only if `is_pre_allocated == false`.
|
||||||
BlockMemHandle mem_handle_;
|
BlockMemHandle mem_handle_{};
|
||||||
std::vector<BlockType> blocks_;
|
std::vector<BlockType> blocks_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user