IsActivityCoordinatorResourceSupported function (activitycoordinator.h)

This function allows apps to check for supported resources at runtime. Some resource types, such as Neural Processing Unit (NPU) resources, may not be supported on all systems.

Syntax

BOOL IsActivityCoordinatorResourceSupported(
  ACTIVITY_COORDINATOR_RESOURCE Resource
);

Parameters

Resource

The ACTIVITY_COORDINATOR_RESOURCE type to check for support.

Return value

Returns a BOOL value indicating whether the resource is supported on the current system.

Remarks

The version of Activity Coordinator that an application compiles with may be different than what is on the system at runtime. Applications will need to check for resource availability using the provided API and adapt their program as necessary. This enables applications to differentiate between a lack of feature support and passing invalid parameters to an API.

Developers should keep in mind that Activity Coordinator resource support does not indicate if such resources are present on the system. Devices like GPUs and NPUs can be added and removed at runtime, and developers should refer to the library or framework they are using for how to best handle such situations. As Activity Coordinator does not control how or when work runs, developers must take care to create policies that reflect how their application consumes resources. If, for example, work is run on the Graphics Processing Unit (GPU) when no NPUs are present, developers should create policies that monitor both or switch between an NPU or GPU based policy as needed.

Requirements

Requirement Value
Header activitycoordinator.h

See also