bug #1369: fix type mismatch warning.

Returned values of omp thread id and numbers are int,
o let's use int instead of Index here.
(grafted from 97812ff0d30c2fd5c93791a63a941d0960a64b69
)
This commit is contained in:
Gael Guennebaud 2016-12-28 23:29:35 +01:00
parent 9e55467b4c
commit 2f31c6b1d8

View File

@ -83,8 +83,8 @@ static void run(Index rows, Index cols, Index depth,
if(info)
{
// this is the parallel version!
Index tid = omp_get_thread_num();
Index threads = omp_get_num_threads();
int tid = omp_get_thread_num();
int threads = omp_get_num_threads();
LhsScalar* blockA = blocking.blockA();
eigen_internal_assert(blockA!=0);
@ -116,9 +116,9 @@ static void run(Index rows, Index cols, Index depth,
info[tid].sync = k;
// Computes C_i += A' * B' per A'_i
for(Index shift=0; shift<threads; ++shift)
for(int shift=0; shift<threads; ++shift)
{
Index i = (tid+shift)%threads;
int i = (tid+shift)%threads;
// At this point we have to make sure that A'_i has been updated by the thread i,
// we use testAndSetOrdered to mimic a volatile access.