Wayverb
utils.h
1 #pragma once
2 
3 #include "core/cl/representation.h"
4 #include "core/cl/traits.h"
5 
6 #include <string>
7 
8 namespace wayverb {
9 namespace waveguide {
10 
11 typedef enum : cl_int {
12  id_none = 0,
13  id_inside = 1 << 0,
14  id_nx = 1 << 1,
15  id_px = 1 << 2,
16  id_ny = 1 << 3,
17  id_py = 1 << 4,
18  id_nz = 1 << 5,
19  id_pz = 1 << 6,
20  id_reentrant = 1 << 7,
21 } boundary_type;
22 
23 constexpr boundary_type port_index_to_boundary_type(unsigned int i) {
24  return static_cast<boundary_type>(1 << (i + 1));
25 }
26 
28 
29 constexpr auto no_neighbor = ~cl_uint{0};
30 constexpr auto num_ports = size_t{6};
31 
32 namespace cl_sources {
33 extern const char* utils;
34 } // namespace cl_sources
35 
36 } // namespace waveguide
37 
38 template <>
39 struct core::cl_representation<waveguide::boundary_type> final {
40  static constexpr auto value = R"(
41 typedef enum {
42  id_none = 0,
43  id_inside = 1 << 0,
44  id_nx = 1 << 1,
45  id_px = 1 << 2,
46  id_ny = 1 << 3,
47  id_py = 1 << 4,
48  id_nz = 1 << 5,
49  id_pz = 1 << 6,
50  id_reentrant = 1 << 7,
51 } boundary_type;
52 )";
53 };
54 
55 } // namespace wayverb
Definition: representation.h:7
Definition: capsule_base.h:9
Definition: brdf.h:3