Bugzilla – Attachment 764 Details for
Bug 1369
silence compiler warnings due to type mismatch (GeneralMatrixMatrix.h, Parallelizer.h)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Forgot Password
Login:
[x]
This bugzilla service is closed. All entries have been migrated to
https://gitlab.com/libeigen/eigen
[patch]
Git patch file
0001-silence-compiler-warnings-due-to-type-mismatch.patch (text/plain), 2.08 KB, created by
Jeff Hammond
on 2016-12-27 23:36:27 UTC
(
hide
)
Description:
Git patch file
Filename:
MIME Type:
Creator:
Jeff Hammond
Created:
2016-12-27 23:36:27 UTC
Size:
2.08 KB
patch
obsolete
>From 1f9f77b1dfa3a74ad81ac2b649a3740ac35ec1b2 Mon Sep 17 00:00:00 2001 >From: Jeff Hammond <jeff.science@gmail.com> >Date: Wed, 21 Dec 2016 21:51:17 -0800 >Subject: [PATCH] silence compiler warnings due to type mismatch > >1) omp thread ids are always int, so the return values of > the associated runtime functions should be stored in > int values, not Index values. > >2) because sync and users are compared or stored to from Index, > they need to be Index, not int, because Index can (and is in my case) > a ptrdiff_t, which is a 64b type (when int is a 32b type). > >It is not clear why Index is not an int, but presumably Eigen supports >matrices of rank greater than INT_MAX. > >The use of volatile qualifier on sync suggests unsafe assumptions about >how inter-thread synchronization works, but that is a problem for >another day. >--- > Eigen/src/Core/products/GeneralMatrixMatrix.h | 4 ++-- > Eigen/src/Core/products/Parallelizer.h | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) > >diff --git a/Eigen/src/Core/products/GeneralMatrixMatrix.h b/Eigen/src/Core/products/GeneralMatrixMatrix.h >index 61df3be57..75e56ea22 100644 >--- a/Eigen/src/Core/products/GeneralMatrixMatrix.h >+++ b/Eigen/src/Core/products/GeneralMatrixMatrix.h >@@ -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); >diff --git a/Eigen/src/Core/products/Parallelizer.h b/Eigen/src/Core/products/Parallelizer.h >index 2a31e4cbe..4b4ca669a 100644 >--- a/Eigen/src/Core/products/Parallelizer.h >+++ b/Eigen/src/Core/products/Parallelizer.h >@@ -75,8 +75,8 @@ template<typename Index> struct GemmParallelInfo > { > GemmParallelInfo() : sync(-1), users(0), lhs_start(0), lhs_length(0) {} > >- int volatile sync; >- int volatile users; >+ Index volatile sync; >+ Index volatile users; > > Index lhs_start; > Index lhs_length; >-- >2.11.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1369
: 764