Jump to content

boost thread slow with only one thread

- - - - -

  • Please log in to reply
1 reply to this topic

#1
Chatte

Chatte

    Newbie

  • Members
  • Pip
  • 2 posts
hi!
here is my problem
i am multithreading my program with boost but i don't get what i expect, and i can't understand why!
i just run one thread and wait for it, and the fps are divide by 3. basically with no thread i have 30fps, and with 1 thread i have 10fps. :cursing: here is the code:

boost::thread_group forces_threads;

forces_threads.create_thread(boost::bind(&ElasticRods::computeBendingForces,this,edges,kb,edges_initial));

forces_threads.join_all();
i use thread_group because i want to run 7 thread but it is already too slow!
do you have an idea of why this is so slow?
thank you for your help! :)

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
You haven't given us a lot of code to work with, here.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users