1 | /** |
2 | * Copyright (c) 2017-present, Facebook, Inc. |
3 | * All rights reserved. |
4 | * |
5 | * This source code is licensed under the BSD-style license found in the |
6 | * LICENSE file in the root directory of this source tree. |
7 | */ |
8 | |
9 | #pragma once |
10 | |
11 | #include "gloo/cuda.h" |
12 | |
13 | namespace gloo { |
14 | |
15 | // CUDA workspaces |
16 | // |
17 | // Algorithms take a workspace template argument and if it uses the |
18 | // CudaDeviceWorkspace can be used with a GPUDirect capable transport. |
19 | |
20 | template <typename T> |
21 | class CudaHostWorkspace { |
22 | public: |
23 | using Pointer = CudaHostPointer<T>; |
24 | }; |
25 | |
26 | template <typename T> |
27 | class CudaDeviceWorkspace { |
28 | public: |
29 | using Pointer = CudaDevicePointer<T>; |
30 | }; |
31 | |
32 | } // namespace gloo |
33 | |