Add num_cores() stdlib routine. Issue #102.

This commit is contained in:
Matt Pharr
2011-09-28 16:16:58 -07:00
parent aad269fdf4
commit c999c8a237
3 changed files with 39 additions and 0 deletions

View File

@@ -91,6 +91,7 @@ Contents:
+ `Conversions To and From Half-Precision Floats`_
+ `Atomic Operations and Memory Fences`_
+ `Prefetches`_
+ `System Information`_
+ `Low-Level Bits`_
* `Interoperability with the Application`_
@@ -2142,6 +2143,20 @@ These functions are available for all of the basic types in the
language--``int8``, ``int16``, ``int32``, ``float``, and so forth.
System Information
------------------
A routine is available to find the number of CPU cores available in the
system:
::
int num_cores()
This value can be useful for adapting the granularity of parallel task
decomposition depending on the number of processors in the system.
Low-Level Bits
--------------