[ITK] [ITK Community] ITK 3.20 and MSVC12 (VS2013)
Bradley Lowekamp
blowekamp at mail.nih.gov
Wed Mar 19 08:18:24 EDT 2014
That is an interesting solution. I'll be curious what the results of the testing are.
So by default this SizeValueType is going to be a long, which is 32-bits or 4 bytes. So for 3-D, the size of itkSize will be 12 bytes. So when an array of these types, there will be padding or gaps between the elements this may case problems in some situation and also is not memory efficient.
Another option may be to explicitly disable auto-vectorization for problematic loops:
http://msdn.microsoft.com/en-us/library/hh872235.aspx
Brad
On Mar 19, 2014, at 7:19 AM, Мар'ян Климов <nekto1989 at gmail.com> wrote:
> Hello,
>
> I've added #if .. #endif to itkSize.h
>
> class
> #if (_MSC_VER == 1800) && (_WIN64) && (!DEBUG)
> __declspec(align(16))
> #endif
> Size {
>
> and itkIndex.h
>
> class
> #if (_MSC_VER == 1800) && (_WIN64) && (!DEBUG)
> __declspec(align(16))
> #endif
> Index {
>
> It doesn't crash at old place. Need to run full tests and see if it will crash in some other.
>
> Best regards,
> Marian
>
>
> 2014-03-18 17:36 GMT+02:00 Bradley Lowekamp <blowekamp at mail.nih.gov>:
> Hello,
>
> We also are having similar issues with ITK v4.5 in the current dashboard. I suspect there is an issue with the optimizer and vectorization and alignment. Please let us know if you can figure out a work around or have any additional information on the issue.
>
> Thanks,
> Brad
>
> On Mar 18, 2014, at 11:25 AM, Мар'ян Климов <nekto1989 at gmail.com> wrote:
>
> > I have some strange problem with ITK 3.20 built using MSVC12 compiler. Problem looks similar to "[ITK Community] [Insight-developers] Expecting a good dashboard tomorrow". Program crashes inside itkImageRegion.h
> > bool
> > IsInside(const Self ®ion) const
> > ...
> > on endCorner[i] = beginCorner[i] + size[i] - 1;
> >
> > Generated code looks like 000007FEE17C48A2 paddq xmm2,xmmword ptr [rsi+18h]. rsi+18h isn't 16-byte aligned. Can this be the problem? It happens only in Release x64. Debug Win32/x64, Release Win32 work without crashing.
> > _______________________________________________
> > Community mailing list
> > Community at itk.org
> > http://public.kitware.com/cgi-bin/mailman/listinfo/community
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20140319/f822f020/attachment-0002.html>
More information about the Community
mailing list