Halide
InjectHostDevBufferCopies.h
Go to the documentation of this file.
1 #ifndef HALIDE_HOST_GPU_BUFFER_COPIES_H
2 #define HALIDE_HOST_GPU_BUFFER_COPIES_H
3 
4 /** \file
5  * Defines the lowering passes that deal with host and device buffer flow.
6  */
7 
8 #include <string>
9 #include <vector>
10 
11 #include "Expr.h"
12 #include "Target.h"
13 
14 namespace Halide {
15 namespace Internal {
16 
17 /** A helper function to call an extern function, and assert that it
18  * returns 0. */
19 Stmt call_extern_and_assert(const std::string &name, const std::vector<Expr> &args);
20 
21 /** Inject calls to halide_device_malloc, halide_copy_to_device, and
22  * halide_copy_to_host as needed. */
23 Stmt inject_host_dev_buffer_copies(Stmt s, const Target &t);
24 
25 } // namespace Internal
26 } // namespace Halide
27 
28 #endif
Target.h
Halide::Internal::inject_host_dev_buffer_copies
Stmt inject_host_dev_buffer_copies(Stmt s, const Target &t)
Inject calls to halide_device_malloc, halide_copy_to_device, and halide_copy_to_host as needed.
Halide
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
Definition: AddAtomicMutex.h:21
Halide::LinkageType::Internal
@ Internal
Not visible externally, similar to 'static' linkage in C.
Expr.h
Halide::Internal::call_extern_and_assert
Stmt call_extern_and_assert(const std::string &name, const std::vector< Expr > &args)
A helper function to call an extern function, and assert that it returns 0.