December 23, 2007
Originally posted at http://cs.ucsb.edu/~cgb/stateOfTheCell.html, and thus, looks much better there.
The Cell Broadband Engine Architecture (which we shall refer to as simply the Cell architecture) was designed as a compromise between the general-purpose but slower CPU and the specific-purpose and faster GPU. It is a heterogeneous architecture: it contains processing units that specialize in different tasks. However, critics (and even some fans) of the Cell architecture claim that it is incredibly difficult to produce good, fast code on it. Having spent the last quarter working with the Cell architecture, we agree with this sentiment. But why?
Read the rest of this entry »
Leave a Comment » |
C++, Cell, Programming, RapidMind, School, UCSB Projects |
Permalink
Posted by shatterednirvana
November 2, 2007
While running a Poisson Equation Finite Difference approximation algorithm (whew, a mouthful there!) today on Cell, I got the greatest error message ever:
[cgb@cell pfd]$ ./withRapidMind
terminate called after throwing an instance of ‘rapidmind::Exception’
what(): The type ‘double’ is not supported by the Cell backend.
Aborted
What the hell indeed. Much thanks to the RapidMind guys for an awesome function called “what” and not supporting the double type (although I’m sure there’s a long explanation about that I haven’t found yet).
Leave a Comment » |
C++, Cell, Programming, RapidMind |
Permalink
Posted by shatterednirvana
August 22, 2007
Over the last few weeks I’ve been trying to learn OpenGL. However, I’ve had a miserable time trying to get various implementations of it to work on my Mac, notably with C++ and Java. I was surprised to learn that installing the Perl OpenGL implementation (or POGL) is pretty simple, and that converting OpenGL code written in C++ to Perl is also reasonably easy. The following is a heuristic method you can use to do the same, using an example from the OpenGL SuperBible by Richard S. Wright, Jr. The code is freely available from his site at http://www.starstonesoftware.com/OpenGL/, and feel free to use my Perl conversion of his code.
Read the rest of this entry »
Leave a Comment » |
C++, HowTo, Perl, Programming |
Permalink
Posted by shatterednirvana
July 12, 2007
Looking over some of the reports on my blog reveal that pretty much everyone to this point looking at this blog look at the Java / Matlab post and not much else. Therefore, here’s everything I’ve learned concretely on how to call Matlab from Java and what NOT to do to save you some grief:
What I did:
Make a file that contains all the commands you want to run when MATLAB starts. My script file looks like this (named scriptName):
cd /directoryWithMATLABScript/
myMATLABScript
quit
The Java code I have used is a modified version of the code here. Now, use the following Java code to call MATLAB with the commands from your script:
Read the rest of this entry »
19 Comments |
HowTo, Java, Matlab, Programming |
Permalink
Posted by shatterednirvana
June 6, 2007
UPDATE: The follow-up to this article can be found here.
Normally I’m not one to rant about programming or computer science stuff here (despite that degree I have in it), as I like to keep this more about philosophical crap (which I don’t have a degree in). However, I’ve spent quite a while on a research project and had a couple problems that all boil down to one thing: Matlab’s Java interface sucks. Bad.
If you don’t care for Computer Science stuff or when someone says “Java”, you think “Coffee”, this probably isn’t for you. In fact, it’s probably only really for me to bitch about randomly since I’ve wasted so much time on this.
Read the rest of this entry »
2 Comments |
Java, Matlab, Programming |
Permalink
Posted by shatterednirvana