|
-
Mar 26th, 2003, 12:25 PM
#1
Thread Starter
Fanatic Member
Parallel Processing
Is C++ an implicit or explict parallel processing language??
Implicit: The compiler can decide how to use multiple processors if available
Explicit: You can in code determine what to run on each processor.
We're having a discussion with one of our teachers. He says that only Java and ADA allow for explicit multiprocessing.
Thanks
It Never Fails. Everytime I try to make a program idiot proof, the world makes a better idiot.
-
Mar 26th, 2003, 03:09 PM
#2
C++ itsself says nothing about multiple processors or multiple threads, and I don't think Java and ADA do.
You can however use platoform specific APIs (like Win32 API) and portable APIs (like the C library) to do things like threads and maybe even processor scheduling.
However, all scheduling stuff is decided at runtime by the operating system, no matter what language you program in. (unless you're writing your own OS and use Assambly)
-
Mar 27th, 2003, 12:12 PM
#3
Monday Morning Lunatic
As was said, threading is possible with OS support and portable libraries.
Certain compilers (like the SGI MIPSpro compiler) have functions which internally use multiple CPUs, such as for performing a sqrt on an array of numbers. These will, obviously, only work on that platform.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Mar 27th, 2003, 03:22 PM
#4
Neither the C nor the C++ standard libraries have any functions for threading. The boost library has a threading part, but of course this too relies on OS support and needs a seperate implementation for every platform.
He says that only Java and ADA allow for explicit multiprocessing.
Crap. Typical programming teacher.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|