| MIL 10 Reference
| Customize Help
| Save Settings

MappInquireMp



See also
Availability
Available in MIL-Lite
Available in MIL

Available on Windows
Available on Linux

Available on Non-Matrox computer
Available on Matrox 4Sight-X
Available on Matrox 4Sight GP
Available on Matrox Supersight
function map Function map
Examples
Synopsis
Inquire about a MIL multi-core processing application environment setting.
Syntax
MIL_INT MappInquireMp(
MIL_ID ContextAppId, //in
MIL_INT64 InquireType, //in
MIL_INT64 TypeFlag, //in
MIL_INT64 TypeValue, //in
void *UserVarPtr //out
)
Description

This function inquires about a setting of a MIL multi-core processing application environment. This function can return whether MIL can use multi-core processing to execute certain parts of MIL functions. It can also return how multi-core processing is performed.

In multi-thread environments, an MappInquireMp() call returns information that applies to all application threads running MIL, unless the specific setting was overridden for a specific thread using MthrControlMp(); in which case, you should use MthrInquireMp() to obtain information about that thread.

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see if there is complementary information.
Parameters
This function is not supported on the selected boards.
Parameters
ContextAppId

Specifies the identifier of the application context to use. This only applies to a DMIL environment.

function map For specifying the application context
CollapseValue Description
Collapse M_DEFAULT

Specifies the current application context.

Collapse Application Context Identifier

Specifies the application context identifier.

InquireType

Specifies the type of multi-core processing application environment setting about which to inquire.

See the Parameter associations section for possible values that can be specified.

TypeFlag

Reserved for future expansion and must be set to M_DEFAULT.

TypeValue

Specifies additional information regarding the inquired setting. This parameter must be set to M_DEFAULT if not used.

See the Parameter associations section for possible values that can be specified.

UserVarPtr
Accepts the address of one of the following (see the Parameter associations section for specifics on which is expected):
  • array of type MIL_UINT64
  • MIL_INT

Specifies the address in which to write the requested information.

See the Parameter associations section for possible values that can be returned.

The table below lists possible values for the InquireType and TypeValue parameters and possible values returned to the UserVarPtr parameter.

Note that TypeValue should be set to M_DEFAULT if it is not used.

Unless otherwise specified, the following values require that you pass the UserVarPtr parameter the address of a MIL_INT.

function map For inquiring about multi-core processing application environment setting
CollapseInquireType Description
TypeValue
UserVarPtr
- Possible values returned
Collapse M_CORE_AFFINITY_MASK

Inquires about the core affinity bit-mask, which indicates the CPU cores that can be used to run the multi-core processing part of MIL functions.

The first element of the array represents the first 64 CPU cores. The least-significant bit of the first element represents CPU core 0. The most-significant bit of the first element represents CPU core 63. The least-significant bit of the second element represents CPU core 64 and so on. A CPU core is available if its corresponding bit is enabled (1). If its corresponding bit is disabled (0), the CPU core is not available. CPU cores always have the same indices, as long as the hardware in your computer and the operating system does not change. SET

(summarize)
Collapse UserVarPtr
Data type info

Data type: array of type MIL_UINT64
Array size: Use M_CORE_AFFINITY_MASK_ARRAY_SIZE to determine the required size of the array.

Returns one of the following.

(summarize)
Collapse Non-zero initialized bit-mask array

Specifies an array of MIL_UINT64 with a size equal to the value retrieved using MappInquireMp() with M_CORE_AFFINITY_MASK_ARRAY_SIZE. INFO

Collapse Zero-initialized bit-mask

Specifies that all CPU cores that are available to the process running your MIL application can be used (M_CORE_AFFINITY_MASK is set to M_ALL).

Collapse M_CORE_AFFINITY_MASK_ARRAY_SIZE

Inquires the size of the array required to store the core affinity bit-mask. See M_CORE_AFFINITY_MASK in MappControlMp() for more details.

The size of the array might represent a larger number of CPU cores than there are available in your computer. This is because the CPU cores might not be indexed by the operating system successively and/or are less than a multiple of 64.

(summarize)
Collapse UserVarPtr

Returns the following.

(summarize)
Collapse Value >= 1

Specifies the size of the core affinity mask array.

Collapse M_CORE_AFFINITY_MASK_PROCESS

Inquires about the core affinity bit-mask that the operating system assigned to the process running your MIL application. This mask indicates all CPU cores available to the process at the time when the application was allocated using MappAlloc().

The first element of the array represents the first 64 CPU cores. The least-significant bit of the first element represents CPU core 0. The most-significant bit of the first element represents CPU core 63. The least-significant bit of the second element represents CPU core 64 and so on. A CPU core is available if its corresponding bit is enabled (1). If its corresponding bit is disabled (0), the CPU core is not available. CPU cores always have the same indices, as long as the hardware in your computer and the operating system does not change.

(summarize)
Collapse UserVarPtr
Data type info

Data type: array of type MIL_UINT64
Array size: Use M_CORE_AFFINITY_MASK_ARRAY_SIZE to determine the required size of the array.

Returns the core affinity bit-mask.

Collapse M_CORE_MAX

Inquires the maximum number of CPU cores to use to process the multi-core processing part of each MIL function. SET

(summarize)
Collapse UserVarPtr

Returns the following.

(summarize)
Collapse 1 <= Value <= 65535

Specifies the maximum number of CPU cores to use. INFO

Collapse M_CORE_MAX_FOR_COPY

Inquires the maximum number of CPU cores to use to process the multi-core processing part of copy type functions. SET

(summarize)
Collapse UserVarPtr

Returns one of the following.

(summarize)
Collapse M_FOLLOW_CORE_MAX

Specifies to use the current value of M_CORE_MAX.

Collapse 1 <= Value <= 65535

Specifies the maximum number of CPU cores to use. INFO

Collapse M_CORE_MEMORY_BANK

Inquires the index of a memory bank local to the specified CPU core.

(summarize)
Collapse TypeValue

Specifies the CPU core.

(summarize)
Collapse UserVarPtr

Returns one of the following.

(summarize)
Collapse -1

Specifies that no memory bank is local to the specified CPU core or the CPU core is not available to the process running your MIL application.

Collapse Value >= 0

Specifies the memory bank index.

Collapse M_CORE_NUM_PROCESS

Inquires the number of CPU cores available to the process running your MIL application. Note that if the operating system restricts the available CPU cores, the number of CPU cores returned differs from the number of CPU cores present in your computer. Use M_CORE_AFFINITY_MASK_PROCESS to establish which CPU cores are available to the process running your MIL application.

(summarize)
Collapse UserVarPtr

Returns the following.

(summarize)
Collapse Value >= 1

Specifies the number of CPU cores.

Collapse M_CORE_SHARING

Inquires whether MIL multi-core processing can use multiple logical cores per physical CPU core, when hyper-threading is enabled and supported. SET

(summarize)
Collapse UserVarPtr

Returns one of the following.

(summarize)
Collapse M_DISABLE

Specifies to use only one logical core per physical CPU core, if hyper-threading is enabled.

Collapse M_ENABLE

Specifies to use all the logical cores of a physical CPU core, if hyper-threading is enabled.

Collapse M_MEMORY_BANK_AFFINITY_MASK

Inquires about a memory bank affinity bit-mask. This mask identifies the memory banks local to the CPU cores available to the process running your MIL application. The operating system establishes the CPU cores available to the process.

The first element of the array represents the first 64 memory banks. The least-significant bit of the first element represents memory bank 0. The most-significant bit of the first element represents memory bank 63. The least-significant bit of the second element represents memory bank 64 and so on. A memory bank is local to the CPU cores available to the process if the memory bank's corresponding bit is enabled (1). If its corresponding bit is disabled (0), the memory bank is not local to the CPU cores available to the process or is not present in your computer.

(summarize)
Collapse TypeValue

Specifies the following.

(summarize)
Collapse M_LOCAL

Specifies that M_MEMORY_BANK_AFFINITY_MASK returns an affinity bit-mask that identifies local memory banks.

Collapse UserVarPtr
Data type info

Data type: array of type MIL_UINT64
Array size: Use M_MEMORY_BANK_AFFINITY_MASK_ARRAY_SIZE to determine the required size of the array.

Returns the memory bank affinity bit-mask.

Collapse M_MEMORY_BANK_AFFINITY_MASK_ARRAY_SIZE

Inquires the size of the array required to store the memory bank affinity bit-mask.

The size of the array might represent a larger number of memory banks than available in your computer. This is because the memory banks might not be indexed by the operating system successively and/or are less than a multiple of 64.

(summarize)
Collapse UserVarPtr

Returns the following.

(summarize)
Collapse Value >= 1

Specifies the size of the memory bank affinity array.

Collapse M_MEMORY_BANK_CORE_AFFINITY_MASK

Inquires about the core affinity bit-mask representing the CPU cores local to the specified memory bank.

The first element of the array represents the first 64 CPU cores. The least-significant bit of the first element represents CPU core 0. The most-significant bit of the first element represents CPU core 63. The least-significant bit of the second element represents CPU core 64 and so on. A CPU core is available if its corresponding bit is enabled (1). If its corresponding bit is disabled (0), the CPU core is not available. CPU cores always have the same indices, as long as the hardware in your computer and the operating system does not change.

(summarize)
Collapse TypeValue

Specifies the memory bank.

(summarize)
Collapse UserVarPtr
Data type info

Data type: array of type MIL_UINT64
Array size: Use M_CORE_AFFINITY_MASK_ARRAY_SIZE to determine the required size of the array.

Returns the core affinity bit-mask.

Collapse M_MEMORY_BANK_NUM

Inquires the number of memory banks local to the CPU cores available to the process running your MIL application. The operating system establishes the CPU cores available to the process.

(summarize)
Collapse UserVarPtr

Returns the following.

(summarize)
Collapse Value >= 0

Specifies the number of memory banks.

Collapse M_MP_FORCED_DISABLE

Inquires whether MIL applications can use multi-core processing to execute certain parts of MIL functions. This is set using the MILConfig utility.

This setting takes precedence over M_MP_USE.

(summarize)
Collapse UserVarPtr

Returns one of the following.

(summarize)
Collapse M_NO

Specifies that multi-core processing works normally and all control types are in effect.

Collapse M_YES

Specifies that multi-core processing in MIL is disabled regardless of any other control type.

Collapse M_MP_PRIORITY

Inquires the processing priority of the multi-core processing part of MIL functions. SET

(summarize)
Collapse UserVarPtr

Returns one of the following.

(summarize)
Collapse M_ABOVE_NORMAL

Specifies that the multi-core processing part of MIL functions will be executed with above normal priority.

Collapse M_BELOW_NORMAL

Specifies that the multi-core processing part of MIL functions will be executed with below normal priority.

Collapse M_HIGHEST

Specifies that the multi-core processing part of MIL functions will be executed with high priority. INFO

Collapse M_IDLE

Specifies that the multi-core processing part of MIL functions will be executed with idle priority. INFO

Collapse M_LOWEST

Specifies that the multi-core processing part of MIL functions will be executed with low priority.

Collapse M_NORMAL

Specifies that the multi-core processing part of MIL functions will be executed with normal priority.

Collapse M_TIME_CRITICAL

Specifies that the multi-core processing part of MIL functions will be executed with time critical priority. INFO

Collapse M_MP_USE

Inquires whether multi-core processing can be used to execute certain parts of MIL functions.

M_MP_FORCED_DISABLE takes precedence over this setting. SET

(summarize)
Collapse UserVarPtr

Returns one of the following.

(summarize)
Collapse M_DISABLE

Specifies that multi-core processing cannot be used.

Collapse M_ENABLE

Specifies that multi-core processing can be used.

Return value
The returned value is the requested information, cast to a MIL_INT. The return value is undefined for M_CORE_AFFINITY_MASK, M_CORE_AFFINITY_MASK_PROCESS, M_MEMORY_BANK_AFFINITY_MASK, and M_MEMORY_BANK_CORE_AFFINITY_MASK.
Compilation information
Header Include mil.h.
Library Use mil.lib.
DLL Requires mil.dll, milmp.dll.
DEFAULT CORE AFFINITY MASK CORE AFFINITY MASK ARRAY SIZE CORE AFFINITY MASK PROCESS CORE MAX CORE MAX FOR COPY FOLLOW CORE MAX CORE MEMORY BANK CORE NUM PROCESS CORE SHARING DISABLE ENABLE MEMORY BANK AFFINITY MASK LOCAL MEMORY BANK AFFINITY MASK ARRAY SIZE MEMORY BANK CORE AFFINITY MASK MEMORY BANK NUM MP FORCED DISABLE NO YES MP PRIORITY ABOVE NORMAL BELOW NORMAL HIGHEST IDLE LOWEST NORMAL TIME CRITICAL MP USE DISABLE ENABLE