Login  Register

64 bit QuantLib

Posted by Johannes Göttker-Schnetmann on Apr 30, 2013; 3:22pm
URL: http://quantlib.414.s1.nabble.com/64-bit-QuantLib-tp14235.html

Hi,

since I am using QuantLib in a 64 bit environment (Visual Studio C++ 2010) I have to add the x64 configuration with each release/update. I have read Luigi's suggestion  to add such a configuration on the quantlib-users mailing list last december.

The trunk still contains only 32 bit compilation for Windows - is someone working on a x64 configuration at the moment? Otherwise I could submit my *.vcproj- and *.sln-files (just straight-forward addition of the x64 build configuration in addition to the existing Win32 configuration).

Related to that: The 64 bit compilation throws a lot of warnings. The bulk of those are caused by assigning QuantLib::Size to QuantLib::Integer. The first ends up as a __int64 on a 64 bit Windows systems, the latter as an int, which is 32 bit. This is a known issue when porting to 64 bit, at least on Windows (http://msdn.microsoft.com/en-us/library/3b2e7499(v=vs.100).aspx). All tests are passed nevertheless.

Changing QL_INTEGER and QL_BIG_INTEGER to 64 bit cures most of the warnings, but causes some new ones when assigning integer types to QuantLib::Real.
Changing QuantLib::Size to a 32 bit type is not a viable alternative because it causes loads of warnings again, mostly from using standard library methods which return std:size_t, not QuantLib::Size.
The third possibility to get rid of the warnings is to use static_casts or dynamic_casts where appropriate. 

What do you think?

Kind regards,
Johannes

------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev