Quantum 3xplorer (Q3)
Loading...
Searching...
No Matches
factory.hpp
Go to the documentation of this file.
1
#pragma once
2
3
/**
4
* Factory for creating GPU execution policies.
5
*
6
* Creates a GPUExecutionPolicy backed by the given device backend.
7
* In Phase 1, this factory will also accept a GPUBLAS reference for
8
* the policy to delegate vector operations to.
9
*
10
* The concrete GPUExecutionPolicy is vendor-neutral — vendor selection
11
* happens at the device backend level via create_gpu_device_backend().
12
*/
13
14
#include "
layer_0_core/execution/gpu/device/init.hpp
"
15
#include "
layer_0_core/execution/gpu/init.hpp
"
16
17
#include <memory>
18
19
namespace
q3
{
20
namespace
execution {
21
namespace
gpu {
22
23
/**
24
* Create a GPU execution policy backed by the given device backend.
25
*
26
* @param device_backend Shared pointer to the GPU device backend.
27
* @return Unique pointer to the GPU execution policy.
28
*/
29
inline
std::unique_ptr<GPUExecutionPolicy>
30
create_gpu_execution_policy
(std::shared_ptr<device::GPUDeviceBackend> device_backend) {
31
return
std::make_unique<GPUExecutionPolicy>(std::move(device_backend));
32
}
33
34
}
// namespace gpu
35
}
// namespace execution
36
}
// namespace q3
init.hpp
init.hpp
q3::execution::gpu::create_gpu_execution_policy
std::unique_ptr< GPUExecutionPolicy > create_gpu_execution_policy(std::shared_ptr< device::GPUDeviceBackend > device_backend)
Definition
factory.hpp:30
q3
Definition
q3_core_api.hpp:33
src
layer_0_core
execution
gpu
factory.hpp
Generated by
1.9.8