mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
Fixed some compilation warnings
This commit is contained in:
parent
094f4a56c8
commit
1ae2567861
@ -625,7 +625,7 @@ struct TensorEvaluator<const TensorContractionOp<Indices, LeftArgType, RightArgT
|
||||
};
|
||||
|
||||
// Decide whether we want to shard m x n contraction by columns or by rows.
|
||||
static bool shardByCol(Index m, Index n, int num_threads) {
|
||||
static bool shardByCol(Index m, Index n, Index num_threads) {
|
||||
// Note: we are comparing both n and m against Traits::nr, it is not
|
||||
// a mistake. We are trying to figure out how both n and m will fit into
|
||||
// the main sharding dimension.
|
||||
|
@ -155,7 +155,7 @@ class NonBlockingThreadPoolTempl : public Eigen::ThreadPoolInterface {
|
||||
// Steal tries to steal work from other worker threads in best-effort manner.
|
||||
Task Steal() {
|
||||
PerThread* pt = GetPerThread();
|
||||
unsigned size = queues_.size();
|
||||
const size_t size = queues_.size();
|
||||
unsigned r = Rand(&pt->rand);
|
||||
unsigned inc = coprimes_[r % coprimes_.size()];
|
||||
unsigned victim = r % size;
|
||||
@ -219,7 +219,7 @@ class NonBlockingThreadPoolTempl : public Eigen::ThreadPoolInterface {
|
||||
|
||||
int NonEmptyQueueIndex() {
|
||||
PerThread* pt = GetPerThread();
|
||||
unsigned size = queues_.size();
|
||||
const size_t size = queues_.size();
|
||||
unsigned r = Rand(&pt->rand);
|
||||
unsigned inc = coprimes_[r % coprimes_.size()];
|
||||
unsigned victim = r % size;
|
||||
@ -240,7 +240,7 @@ class NonBlockingThreadPoolTempl : public Eigen::ThreadPoolInterface {
|
||||
PerThread* pt = &per_thread_;
|
||||
if (pt->inited) return pt;
|
||||
pt->inited = true;
|
||||
pt->rand = std::hash<std::thread::id>()(std::this_thread::get_id());
|
||||
pt->rand = static_cast<unsigned>(std::hash<std::thread::id>()(std::this_thread::get_id()));
|
||||
return pt;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user