accelerator::set_default Method
Collapse the table of content
Expand the table of content

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


The path to the accelerator.

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

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 and pass the value of accelerator::default_accelerator Data Member to the constructor.


Header: amprt.h

Namespace: Concurrency

© 2015 Microsoft