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
16
17#include <memory>
18
19namespace q3 {
20namespace execution {
21namespace 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 */
29inline std::unique_ptr<GPUExecutionPolicy>
30create_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
std::unique_ptr< GPUExecutionPolicy > create_gpu_execution_policy(std::shared_ptr< device::GPUDeviceBackend > device_backend)
Definition factory.hpp:30