Registered Member
|
Hello folks,
We plan to port our particle simulation to iPhone. The simulation is based on the Eigen vector library. Especially we use linear solving (matrix inversion) and SVD. Is it possible to use Eigen on iPhone? (There are no libs needed to link, however there are many compiler flags in the headers) Regards, Johannes |
Registered Member
|
What CPU, OS, compiler does the iPhone have?
- Eigen runs very well at least on ARM embedded CPUs - Eigen runs very well on Mac OS X - Eigen is well tested with GCC. As for LLVM, it works with the LLVM-GCC C++ front-end. So if that is what's inside an iPhone, you can be optimistic. Might require a few adjustments as you're probably the first one to be doing that...
Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list! |
Registered Member
|
The iPhone uses an ARM 1176 (according to Wikipedia). For its "iPhone OS" there exists the iPhoneSDK API for Mac and it uses GCC. Languages are Objective-C but you can also compile C++. I will try if it works soon... Regards, Johannes |
Registered Member
|
ok, so in principle you should have no problem using Eigen there.
FYI, if this ARM CPU has NEON SIMD instructions, Eigen3 is able to use that (vectorization) for dynamic-sized matrices (a GCC bug is preventing us from using that with fixed-size matrices).
Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list! |
Registered Member
|
Well, Eigen 2.x runs on iPhone with the compiler described above. The Geometry and SVD runs, too.
However, I experience some issue with the LU module. When inverting a matrix I get a "branch out of range" error and the compilation aborts. I didn't look into that yet, maybe it is a smaller problem. Btw., the performance of my particle simulation is weak, compared to a PC (not surprisingly). Where on my Athlon XP 2600+ a simulation run takes 0.2 sec. on iPhone it takes 10 sec. in this first unadapted configuration. Regards, Johannes |
Registered Member
|
This "branch out of range" message sounds like an internal compiler error. What GCC version are you using? Apple has a very bad record of using completely outdated GCC versions, such as 4.0. For Eigen, we recommend GCC 4.2 or newer, although we support GCC all the way back to 3.3. FYI, GCC 4.2 produces 4x faster code with Eigen than GCC 4.1, in many cases. GCC 4.4 is even better.
Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list! |
Registered Member
|
It says "com.apple.compilers.gcc.4_2". |
Registered Member
|
ok, interesting. Can you then paste the whole compiler output?
Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list! |
Registered Member
|
Hmm, now the LU is working. I don't know what I changed since the last time, maybe it's because of sun flares. Thanks for your help, anyway. |
Registered Member
|
Np. By the way, see the last thread with kfriddile, he announced that there are several Eigen-based games in the iPhone app store.
Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list! |
Registered users: abc72656, Bing [Bot], daret, Google [Bot], Sogou [Bot], Yahoo [Bot]