How to enable multi-core in openframeworks program?


#1

I am new using the VisualStudio。I made a partical system to test in it。The frameRate is about 20fps, But the cpu CPU utility is very low。And i fount it seems just use one core to run this program。 How can i released the whole CPU power to render this?May it belong to a muti- thread problem?


#2

hello,

your program is using one thread at a time.
You need to code multi-threaded app to optimize cpu usage

One simple way would be to use OpenMP when possible.


#3

The ofBook has a nice article about threads here, hope it helps.


#4

Thansks,Gallo :slight_smile:


#5

Thanks justadude.That’s helpful.I’ll give it a try~~


#6

@Wenzy90 Did you get it done?