[Bf-committers] GSOC - Math Library Project

Daniel Barbeau danielpgb_vasquez at hotmail.com
Sat Mar 29 23:21:39 CET 2008




Hi again!

> How would you use C code with a C++ template library? Blender renderer 
> (which is the time consuming module) is written in C, Blitz++ is 
> written in C++. 

Wouldn't
creating extern "C" functions which wrap the C++ templated code work?
Ugh no, well yes but no, I just did some tests and I understand there
are problems in other places like the fact that at one point one would
need to expose the C++ types directly to the C code. That would then
require the C++ compiler a bit everywhere ( just renaming legitimate .c
files to .cpp would do it, but that is bad ). A problem indeed. Doing
mainly C++ didn't help me in foreseeing that issue!

> Personally, I would choose SIMDx86 (http://simdx86.sourceforge.net), 
> which provides optimized versions of each arch (SSE/3dNow, and I'm 
> working on the AltiVec/Cell parts myself, check 
> http://freevec.org/category/simd/algorithms/algebra/matrix_multiplication) 
> and includes both C and C++ interfaces, but that would require a 
> fundamental change in Blender. Such a thing has been discouraged 
> (from discussions in #blendercoders), so unless you're prepared to 
> redo most of Blender code only to have a rejected patch of ~3MB, I'd 
> suggest you help in reworking the existing infrastructure instead. 
> Same goes for GSL and other math libraries.


Convinced!
:) However, I'll let math people do the math job, I don't have the
knowledge to actually CODE math-related things ( although I have learnt
some bits in the last months ). I'm more interested in MVC and UI (
that is my full time job ) so when the 2.5 branch takes off I'll look
into it ( and try to get rid of the C++ habits )!

Ciao
Daniel

PS:I didn't know SIMDx86  ! thanks for the link!
PPS: Konstantinos: sorry if you already received this mail, I messed up with the reply buttons!

_________________________________________________________________
Créez gratuitement votre disque dur virtuel Windows Live SkyDrive !
http://skydrive.live.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/bf-committers/attachments/20080329/9b3b9458/attachment.htm 


More information about the Bf-committers mailing list