A place to discuss everything related to Newton Dynamics.
Moderators: Sascha Willems, walaber
by Adversus » Wed Jul 06, 2011 7:03 pm
Hi Guys,
I've been using version 2.24 on iPhone for a while and it's been excellent however now I'm being forced due to another library to use the linker flag -all_load and this is causing linker errors with Newton, specifically:
"Duplicate symbol _NewtonGetMemoryUsed in /Lib/Newton/NewtonMac-2.24/iPhoneTutorials/iNewton/libnewton_iPhoneEmulation.a(Newton.o) and /Lib/Newton/NewtonMac-2.24/iPhoneTutorials/iNewton/libJointLibrary_iPhoneEmulation.a(Newton.o) for architecture i386"
Since the Newton project has been made open source what would be my best option to recompile these library files? Does anyone have the project files for iPhone as I looked in svn and couldn't see them? Newton runs pretty fast and I just want to be sure if I do this then it will be optimal ( like before

I use a completely c interface for Newton in my App so I don't need to worry about examples running in ObjC or having ObjC interfaces etc.
Thanks for listening,
John.
-
Adversus
-
- Posts: 29
- Joined: Tue Oct 12, 2010 8:39 am
by Adversus » Fri Jul 08, 2011 11:35 am
I have seen read through the Getting Started on iPhone thread and followed what I should do including setting the _MAC_IPHONE flag however when I try compiling it for iPhone I now get a compilation error in:
- Code: Select all
#ifdef DG_BUILD_SIMD_CODE
DG_INLINE dgVector::dgVector(const simd_type& val)
{
_ASSERTE ((dgUnsigned64(this) & 0x0f) == 0);
(simd_type&) *this = val;
_ASSERTE (dgCheckVector ((*this)));
}
#endif
As simd_type doesn't resolve to anything. Tracking this back it should be a __m128 which is an intrinsic that the iPhone doesn't have. Does that mean the the 2.24 version I've been using hasn't been using NEON (or even VFP for older devices) intrinsics so therefore should I just undefine DG_BUILD_SIMD_CODE to get it working as before? Obviously I don't want to do something wrong that would kill performance

Plus if this hasn't been implemented surely coding it using NEON intrinsics (using
http://gcc.gnu.org/onlinedocs/gcc/ARM-N ... nsics.html as a reference) wouldn't take that long? Has anyone done this successfully?
I don't mind doing it but just if anyone has any tips from doing it.
-
Adversus
-
- Posts: 29
- Joined: Tue Oct 12, 2010 8:39 am
by Julio Jerez » Mon Jul 18, 2011 8:53 am
The riphone in newton does no use simd, at the time I made teh post mac did no support it unless was writen usin inline assembly.
Plus if this hasn't been implemented surely coding it using NEON intrinsics (using
http://gcc.gnu.org/onlinedocs/gcc/ARM-N ... nsics.html as a reference) wouldn't take that long? Has anyone done this successfully?
the eaassiest way to make the iphone or any other platform to use simd intrisics is by writing the set of macros in file dgSimd_Instrutions.h
-
Julio Jerez
- 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 3 guests