Re: [eigen] RE: minor warning fix

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Eigen generates lots of warnings unless you install it in a special directory and use a system flag for that directory; for example, see SYSTEM on
	https://cmake.org/cmake/help/v3.0/command/include_directories.html
and -isystem on
	https://gcc.gnu.org/onlinedocs/gcc-3.0/gcc_3.html
	

On 07/21/2017 02:01 PM, Matt Richardson wrote:
Sorry, but I also forgot one other warning, which is here:



      IsAligned = bool(EIGEN_MAX_ALIGN_BYTES>0) & !(Options_&DontAlign),



In unsupported/Eigen/CXX11/src/Tensor/Tensor.h



The warning is about potential confusion over the operator precedence
with the & (don’t ask me why this is somehow confusing). Changing it to
this removes the warning:



      IsAligned = (bool(EIGEN_MAX_ALIGN_BYTES>0)) & !(Options_&DontAlign),



In both cases, I’m compiling with MSVC 2015.



Matt



*From:* Matt Richardson [mailto:mattri@xxxxxxxxxxxxx]
*Sent:* Friday, July 21, 2017 1:52 PM
*To:* eigen@xxxxxxxxxxxxxxxxxxx
*Subject:* [eigen] minor warning fix



	

This sender failed our fraud detection checks and may not be who they appear to be. Learn about spoofing
<http://aka.ms/LearnAboutSpoofing>

	

Feedback <http://aka.ms/SafetyTipsFeedback>

Hi,



This function in unsupported\Eigen\CXX11\src\Tensor\TensorDeviceCuda.h
(lines 290-292):



EIGEN_STRONG_INLINE int sharedMemPerBlock() const {

  return stream_->deviceProperties().sharedMemPerBlock;

}



Is causing a compile warning (about the conversion from size_t to int)
for me. I don’t have access to Bugzilla to report the bug. Is it
possible to change the return type to size_t?



Thanks!

Matt










Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/