Поделиться через


accelerator::set_default Method

Sets the default accelerator to be used for any operation that implicitly uses the default accelerator. This method only succeeds if the runtime selected default accelerator has not already been used in an operation that implicitly uses the default accelerator

static inline bool set_default(
   std::wstring _Path
);

Parameters

  • _Path
    The path to the accelerator.

Return Value

true if the call succeeds at setting the default accelerator. Otherwise, false.

Remarks

The C++ AMP runtime picks a default accelerator, unless you write code to pick a specific accelerator. For more information, see Using accelerator and accelerator_view Objects.

You can specify the default accelerator object in these ways:

  1. Call the constructor that takes a device path parameter.

  2. Set the default accelerator using the accelerator::set_default Method and pass the value of accelerator::default_accelerator Data Member to the constructor.

Requirements

Header: amprt.h

Namespace: Concurrency

See Also

Reference

accelerator Class

Concepts

Using accelerator and accelerator_view Objects