Results 1 to 4 of 4

Thread: Parallel Processing

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2000
    Location
    Over There
    Posts
    522

    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.

  2. #2
    Fanatic Member twanvl's Avatar
    Join Date
    Dec 2001
    Posts
    771
    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)

  3. #3
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    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

  4. #4
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    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
  •  



Click Here to Expand Forum to Full Width