views:

362

answers:

2

I think I've found some gems in the iPhone OS (iOS 4).

I found that there're 128-bit, 256-bit, 512-bit and 1024-bit integer data types, provided by the Accelerate Framework. There're also Apple's implementation of Basic Linear Algebra Subprograms (BLAS), Apple's implementation of LAPACK (Linear Algebra PACKage), and Digital Signal Processing (DSP) routines.

I'm so excited because BLAS and LAPACK are the best (and the most famous) libraries as far as I know. (In case if you've never heard their names, just Google them and you'll understand.) They let you solve simultaneous linear equations (i.e. Ax = b in vector / matrix notation), do fast matrix multiplications, and more.

I'm quite sure that the libraries are available on both PowerPC- and Intel-based Mac's. However, when I look up the "What's new in iOS4" documentation in Xcode, it says that the data types are "not supported on any architecture". When I compare the vecLib Reference for Mac OS X and vecLlib Reference for iOS, I also found that functions are missing in the iOS version.

My question is:
Has anyone compiled any program using these libraries (bignum is my primary area of interest) and run them successfully on a real iPhone device? (Answerers who can demonstrate their actual experience on the librarie(s) are more appreciated.)

Here are the links to the Reference Library:
Accelerate Framework (iOS Reference Library)
vecLib Reference (Mac OS X Reference Library)
vecLib Reference (iOS Reference Library)

Here are official FAQs of BLAS and LAPACK:
BLAS FAQ
LAPACK FAQ

A: 

Even though I have not yet used Accelerate in a shipping application, I did get a lot out of Apple's WWDC 2010 session 202 - "The Accelerate framework for iPhone OS". If you are interested in this framework, I highly recommend watching that video.

While it is possible to use many of these functions on the iPhone, not all of them have been ported over yet. Only vDSP, BLAS, and LAPACK are available for use in iOS 4.0, although it sounds like others might join them soon.

Although written for the Mac, the "Taking Advantage of the Accelerate Framework" article gives a nice introduction to the framework, in addition to the resources you list above.

Brad Larson
Thanks for your information! It's exactly why I'm puzzling! It seems that Apple advertises the Accelerate Framework a lot, but it also seems it is somehow "under construction". I've run some tests on the iPhone Simulator, and they seemed to be okay! But, as usual, okay on the simulator (which is Intel-based!) doesn't mean okay on the actual device. Since I've not yet gone through the CSR -> App ID process (not yet have time to understand the process, and not willing to go through it without understanding), I asked this question here. Thanks for your links! I'll visit them when I have time.
Siu Ching Pong - Asuka Kenji
A: 

I've done some work in OpenCV based on Yoshimasa Niwa's project here:

http://niw.at/articles/2009/03/14/using-opencv-on-iphone/en

His current code builds using the Accelerate framework (see the custom patches).

C4H5As