Skip to content
Advertisement

Provide windows avilable cores

I use the following in my script to find how many available cores I can use.

This is for Linux:

JavaScript

This is for Mac (darwin):

JavaScript

How should it be in Windows?

Advertisement

Answer

You can use one of those commands:

JavaScript

(here you have two physical processors)

Or as suggested in comments:

JavaScript

In Makefile the record should be something like:

JavaScript

P.S. And the commands you write in question are wrong! You must remove space around =

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement