Wayverb
program.h
1 #pragma once
2 
3 #include "waveguide/cl/structs.h"
4 
5 #include "core/cl/common.h"
6 #include "core/program_wrapper.h"
7 #include "core/scene_data.h"
8 
9 #include "utilities/decibels.h"
10 #include "utilities/string_builder.h"
11 
12 #include <algorithm>
13 #include <cassert>
14 #include <cmath>
15 
16 namespace wayverb {
17 namespace waveguide {
18 
19 class program final {
20 public:
21  program(const core::compute_context& cc);
22 
23  auto get_kernel() const {
24  return program_wrapper_
25  .get_kernel<cl::Buffer,
26  cl::Buffer,
27  cl::Buffer,
28  cl_int3,
29  cl::Buffer,
30  cl::Buffer,
31  cl::Buffer,
32  cl::Buffer,
33  cl::Buffer
34  >("condensed_waveguide");
35  }
36 
37  auto get_zero_buffer_kernel() const {
38  return program_wrapper_.get_kernel<cl::Buffer>("zero_buffer");
39  }
40 
41  auto get_filter_test_kernel() const {
42  return program_wrapper_
43  .get_kernel<cl::Buffer, cl::Buffer, cl::Buffer, cl::Buffer>(
44  "filter_test");
45  }
46 
47  auto get_filter_test_2_kernel() const {
48  return program_wrapper_
49  .get_kernel<cl::Buffer, cl::Buffer, cl::Buffer, cl::Buffer>(
50  "filter_test_2");
51  }
52 
53  template <cl_program_info T>
54  auto get_info() const {
55  return program_wrapper_.template get_info<T>();
56  }
57 
58  cl::Device get_device() const { return program_wrapper_.get_device(); }
59 
60 private:
61  core::program_wrapper program_wrapper_;
62 };
63 
64 } // namespace waveguide
65 } // namespace wayverb
Definition: program_wrapper.h:8
auto get_kernel() const
Definition: program.h:23
Definition: program.h:19
Definition: capsule_base.h:9
invariant: device is a valid device for the context
Definition: common.h:13