We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexSuggestions & BugsSoftware,  Documentation,  Website Suggestions › Using multi core processors, Using Time, Vector
Page Index Toggle Pages: 1
Using multi core processors, Using Time, Vector (Read 829 times)
Using multi core processors, Using Time, Vector
Apr 27th, 2008, 5:04pm
 
I´ve just registered and logged in.
Although "Processing" seems to be not a general purpose language and is interpreted I would like to see some commands which I know from other programming languages.
Is it possible to use multi core processing systems by statements like "sequential" and "parallel" (Remember Occam for Transputers) ?
Parallel
{
 BLOCK 1;
 BLOCK 2;
}
The blocks are processed in parallel on different cores (Manuell or automatic assignment ?).
Is it possible to use statements like "Every 5 seconds" or "After 5 seconds" or "At" like in PEARL ?
Every 5 seconds
{
 BLOCK;
}
I also would like some operations for vectors like in Matlab for example "unique" to get all different elements (Call it the alphabet) of a vector as a vector or to get the distinct  elements of two vectors. Is a string a vector in Processing ?
a = unique("The quick brown fox jumps over the lazy dog")
b = unique(5 6 8 11 7 3 4 9 6 11)
c = unique(8 7 9 3 12 2 1)
d = distinct(a, b)
Or is it possible to use and, or, xor with vectors ?
d = xor (a, b)
------> d = (5 6 11 4 6)

Thanks for reading
I´m waiting for a new programming language
Re: Using multi core processors, Using Time, Vecto
Reply #1 - Apr 27th, 2008, 5:16pm
 
Processing is just a wrapper to Java, with a little bit of behind the scenes munging of stuff. So you have all of the Java Thread implementation to play with, and Java will run threads on separate cores.
Page Index Toggle Pages: 1