Visualization strategy/choosing a framework
Visualization strategy/choosing a framework
- Subject: Visualization strategy/choosing a framework
- From: "Adam Foltzer" <email@hidden>
- Date: Tue, 6 Jan 2009 10:31:47 -0500
To the list this time :D
---------- Forwarded message ----------
From: Adam Foltzer <email@hidden>
Date: Tue, Jan 6, 2009 at 10:00 AM
Subject: Re: Visualization strategy/choosing a framework
To: Andrew Farmer <email@hidden>
I found the Accelerate framework after posting this, and have had some good
success with it on my Intel Mac. For the iPhone, I found this bit of code
for accessing the VFP unit, since Accelerate is not available there:
http://code.google.com/p/vfpmathlibrary/ . I may wind up porting more
functions from Accelerate to ARM -F assembly, since nearly everything the
algorithm does is SIMD. The instruction set for the VFP seems capable enough
to reimplement many of the veclib.h functions, which makes me wonder why
Apple hasn't done it (at least not publicly ;)
Yes, I'm also getting sidetracked, but this project is all about practice,
and this seems like an informative rabbit hole :)
Cheers,
Adam
On Tue, Jan 6, 2009 at 1:53 AM, Andrew Farmer <email@hidden> wrote:
> On 01 Jan 09, at 10:56, Adam Foltzer wrote:
>
>> Off to do some refactoring of my Swarm class; at the risk of spawning a
>> tangent, am I just completely missing a Cocoa data structure that's suited
>> to matrices of scalar values? I had a working implementation using nested
>> NSMutableArrays, but the code wound up looking disgusting (my fault, not
>> the
>> API's ;-), so I rewrote it with good ol' C arrays, malloc, and free. It
>> has
>> no leaks now, and is really, really fast, but I feel like I shouldn't have
>> to reinvent the wheel in order to do matrix operations.
>>
>
> The Cocoa collection classes are primarily oriented towards dealing with
> ObjC objects. If all you're working with is homogeneous arrays of scalar
> values (or structures consisting of scalar values), you probably are best
> off using C arrays.
>
> That's not to say that Apple has nothing to offer. If you're performing
> SIMD-esque operations on large matrices or vectors, the Accelerate framework
> might have some tools you'd be interested in. It's listed under Carbon for
> some reason, but it's just as applicable to Cocoa applications.
>
> If that doesn't do it, but you're fine with targeting Intel machines only,
> dropping down to the SSE primitives may also be an option to consider.
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden