How to compile a double-precision version?

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

How to compile a double-precision version?

Postby jiandingzhe » Sat Jul 09, 2011 7:23 am

In dgTypes.h, there has following codes:
Code: Select all
#ifdef __USE_DOUBLE_PRECISION__
   typedef double dgFloat32;
#else
   typedef float dgFloat32;
#endif


However, if I define __USE_DOUBLE_PRECISION__, it will not compile, because there are polymorphisms related with dgFloat32 and dgFloat64 in other parts of Newton.

How can I get a double-precision version of Newton?
User avatar
jiandingzhe
 
Posts: 48
Joined: Fri Jul 08, 2011 11:21 am
Location: Beijing

Re: How to compile a double-precision version?

Postby Julio Jerez » Sat Jul 09, 2011 10:14 am

Update to SVN I just added the nessesary #ifndef __USE_DOUBLE_PRECISION__
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: How to compile a double-precision version?

Postby jiandingzhe » Sat Jul 09, 2011 10:34 pm

Julio Jerez wrote:Update to SVN I just added the nessesary #ifndef __USE_DOUBLE_PRECISION__

Not solved all niches.

I added -D__USE_DOUBLE_PRECISION__ to FLAGS of linux64 makefile. It still have something wrong with SIMD:
Code: Select all
../../source/physics/dgCollisionConvex.cpp: In member function ‘virtual dgVector dgCollisionConvex::SupportVertexSimd(const dgVector&) const’:
../../source/physics/dgCollisionConvex.cpp:919:2: error: ‘simd_type’ was not declared in this scope


After modified that, it compiles correctly.
Code: Select all
dgVector dgCollisionConvex::SupportVertexSimd (const dgVector& direction) const
{
#ifdef DG_BUILD_SIMD_CODE
    blah blah blah
#else
    return 0;
#endif
User avatar
jiandingzhe
 
Posts: 48
Joined: Fri Jul 08, 2011 11:21 am
Location: Beijing

Re: How to compile a double-precision version?

Postby jiandingzhe » Sun Jul 10, 2011 2:30 am

Julio Jerez wrote:Update to SVN I just added the nessesary #ifndef __USE_DOUBLE_PRECISION__

Moreover, dMath, dScene, dCustomJoints, dContainers still requires a patch...

And why does dMath exists? There are dgVector, dgMatrix in the coreLibrary_200 which looks similiar.
User avatar
jiandingzhe
 
Posts: 48
Joined: Fri Jul 08, 2011 11:21 am
Location: Beijing

Re: How to compile a double-precision version?

Postby Julio Jerez » Mon Jul 18, 2011 8:33 am

but the dMath and teh rest librarys uses if __USE_DOUBLE_PRECISION__
if you just use that it soudl compiel fine.

I fixe the convexhull sind error.
thanks
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron