ioam / topographica

A general-purpose neural simulator focusing on topographic maps.
topographica.org
BSD 3-Clause "New" or "Revised" License
53 stars 32 forks source link

Generic "cf loop" in C/Cython? #480

Open sf-issues opened 12 years ago

sf-issues commented 12 years ago

Converted from SourceForge issue 3515514, submitted by ceball Submit Date: 2012-04-06 15:25 GMT

Could all cf-looping operations (at least ones not occurring in python) be multi-threaded in the same way?

Haven't thought about the details, but we might need a few such objects: one for calling python code on each CF (the most general case), maybe one for cython, and one doing a C function call on each CF. If we can get the C function call version to work well, then maybe we could get rid of all the CFOF, CFRF, CFLF, etc. functions! (Or at least their tricky implementations.) I.e., maybe we could implement just the bare underlying OF, RF, LF, etc. code as C functions, and then the iteration over cfs would be handled by this separate class, calling the bare C functions. That would be a much nicer way to program it than we have now. I don't know how to get one bit of Weave C code to know about other bits of C code defined in different files, though. If we did get it to work, it could vastly simplify things like the OpenMP, MPI, and GPU support.