0

I'm using a ISPC-based program on Windows and I'm wondering if there's any way to limit the number of CPU threads to 1 since I have to run some experiments.

Royi
  • 4,640
  • 6
  • 46
  • 64
user129506
  • 337
  • 2
  • 10

1 Answers1

1

You could use the SetProcessAffinityMask (msdn link) API function:

BOOL SetProcessAffinityMask(
  HANDLE hProcess,
  DWORD_PTR dwProcessAffinityMask
);
alain
  • 11,939
  • 2
  • 31
  • 51