| Customize Help
| Save Settings

MappInquireMp



Function Map
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
Click to summarizeValue Description
Click to summarize M_DEFAULT

Specifies the current application context.

Click to summarize 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 [optionally, in C++: a reference to a std::vector<MIL_UINT64> ]
  • MIL_INT

Specifies the address in which to write the requested information. Since the MappInquireMp() function also returns the requested information, you can set this parameter to M_NULL.

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.

function map For inquiring about multi-core processing application environment setting
Click to summarizeInquireType Description
TypeValue
UserVarPtr
- Possible values returned
Click to summarize 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)
Click to summarize UserVarPtr
Data type info: Data type: array of type MIL_UINT64 [optionally, in C++: a reference to a std::vector<MIL_UINT64> ] MORE

Returns one of the following.

(summarize)
Click to summarize Non-zero initialized bit-mask array

Specifies a non-zero initialized bit-mask array. INFO

Click to summarize 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).

Click to summarize 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)
Click to summarize UserVarPtr
Data type info: Data type: address of a MIL_INT

Returns the following.

(summarize)
Click to summarize Value >= 1

Specifies the size of the core affinity mask array.

Click to summarize 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)
Click to summarize UserVarPtr
Data type info: Data type: array of type MIL_UINT64 [optionally, in C++: a reference to a std::vector<MIL_UINT64> ] MORE

Returns the core affinity bit-mask.

Click to summarize 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)
Click to summarize UserVarPtr
Data type info: Data type: address of a MIL_INT

Returns the following.

(summarize)
Click to summarize 1 <= Value <= 65535

Specifies the maximum number of CPU cores to use. INFO

Click to summarize 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)
Click to summarize UserVarPtr
Data type info: Data type: address of a MIL_INT

Returns one of the following.

(summarize)
Click to summarize M_FOLLOW_CORE_MAX

Specifies to use the current value of M_CORE_MAX.

Click to summarize 1 <= Value <= 65535

Specifies the maximum number of CPU cores to use. INFO

Click to summarize M_CORE_MEMORY_BANK

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

(summarize)
Click to summarize TypeValue

Specifies the CPU core.

(summarize)
Click to summarize UserVarPtr
Data type info: Data type: address of a MIL_INT

Returns one of the following.

(summarize)
Click to summarize -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.

Click to summarize Value >= 0

Specifies the memory bank index.

Click to summarize 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)
Click to summarize UserVarPtr
Data type info: Data type: address of a MIL_INT

Returns the following.

(summarize)
Click to summarize Value >= 1

Specifies the number of CPU cores.

Click to summarize 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)
Click to summarize UserVarPtr
Data type info: Data type: address of a MIL_INT

Returns one of the following.

(summarize)
Click to summarize M_DISABLE

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

Click to summarize M_ENABLE

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

Click to summarize 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)
Click to summarize TypeValue

Specifies the following.

(summarize)
Click to summarize M_LOCAL

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

Click to summarize UserVarPtr
Data type info: Data type: array of type MIL_UINT64 [optionally, in C++: a reference to a std::vector<MIL_UINT64> ] MORE

Returns the memory bank affinity bit-mask.

Click to summarize 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)
Click to summarize UserVarPtr
Data type info: Data type: address of a MIL_INT

Returns the following.

(summarize)
Click to summarize Value >= 1

Specifies the size of the memory bank affinity array.

Click to summarize 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)
Click to summarize TypeValue

Specifies the memory bank.

(summarize)
Click to summarize UserVarPtr
Data type info: Data type: array of type MIL_UINT64 [optionally, in C++: a reference to a std::vector<MIL_UINT64> ] MORE

Returns the core affinity bit-mask.

Click to summarize 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)
Click to summarize UserVarPtr
Data type info: Data type: address of a MIL_INT

Returns the following.

(summarize)
Click to summarize Value >= 0

Specifies the number of memory banks.

Click to summarize 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)
Click to summarize UserVarPtr
Data type info: Data type: address of a MIL_INT

Returns one of the following.

(summarize)
Click to summarize M_NO

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

Click to summarize M_YES

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

Click to summarize M_MP_PRIORITY

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

(summarize)
Click to summarize UserVarPtr
Data type info: Data type: address of a MIL_INT

Returns one of the following.

(summarize)
Click to summarize M_ABOVE_NORMAL

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

Click to summarize M_BELOW_NORMAL

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

Click to summarize M_HIGHEST

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

Click to summarize M_IDLE

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

Click to summarize M_LOWEST

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

Click to summarize M_NORMAL

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

Click to summarize M_TIME_CRITICAL

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

Click to summarize 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)
Click to summarize UserVarPtr
Data type info: Data type: address of a MIL_INT

Returns one of the following.

(summarize)
Click to summarize M_DISABLE

Specifies that multi-core processing cannot be used.

Click to summarize M_ENABLE

Specifies that multi-core processing can be used.

Return value
The returned value is the requested information, cast to a MIL_INT. If the requested information does not fit into a MIL_INT, this function will return M_NULL or truncate the information. 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