Fix implicit narrowing warning in Parallelizer.h.

This commit is contained in:
Rasmus Munk Larsen 2023-11-13 21:30:39 +00:00
parent 3a9635b20c
commit b33dbb5765

View File

@ -212,7 +212,7 @@ EIGEN_STRONG_INLINE void parallelize_gemm(const Functor& func, Index rows, Index
// Note that the actual number of threads might be lower than the number of // Note that the actual number of threads might be lower than the number of
// requested ones // requested ones
Index actual_threads = omp_get_num_threads(); Index actual_threads = omp_get_num_threads();
GemmParallelInfo<Index> info(i, actual_threads, task_info); GemmParallelInfo<Index> info(i, int(actual_threads), task_info);
Index blockCols = (cols / actual_threads) & ~Index(0x3); Index blockCols = (cols / actual_threads) & ~Index(0x3);
Index blockRows = (rows / actual_threads); Index blockRows = (rows / actual_threads);
@ -237,7 +237,7 @@ EIGEN_STRONG_INLINE void parallelize_gemm(const Functor& func, Index rows, Index
auto task = [=, &func, &barrier, &task_info](int i) auto task = [=, &func, &barrier, &task_info](int i)
{ {
Index actual_threads = threads; Index actual_threads = threads;
GemmParallelInfo<Index> info(i, actual_threads, task_info); GemmParallelInfo<Index> info(i, int(actual_threads), task_info);
Index blockCols = (cols / actual_threads) & ~Index(0x3); Index blockCols = (cols / actual_threads) & ~Index(0x3);
Index blockRows = (rows / actual_threads); Index blockRows = (rows / actual_threads);
blockRows = (blockRows/Functor::Traits::mr)*Functor::Traits::mr; blockRows = (blockRows/Functor::Traits::mr)*Functor::Traits::mr;