HALDLS
null_payload_readable.h
Go to the documentation of this file.
1 #pragma once
2 #include <array>
3 #include <iosfwd>
4 
5 #include "halco/common/geometry.h"
6 #include "halco/hicann-dls/vx/fpga.h"
7 
8 #include "haldls/cerealization.h"
9 #include "haldls/vx/genpybind.h"
10 #include "haldls/vx/traits.h"
11 #include "hate/visibility.h"
12 
13 namespace halco::hicann_dls::vx {
14 class NullPayloadReadableOnFPGA;
15 } // namespace halco::hicann_dls::vx
16 
17 namespace haldls {
18 namespace vx GENPYBIND_TAG_HALDLS_VX {
19 
20 class GENPYBIND(visible) NullPayloadReadable
21 {
22 public:
23  typedef halco::hicann_dls::vx::NullPayloadReadableOnFPGA coordinate_type;
24  typedef std::true_type is_leaf_node;
25 
26  NullPayloadReadable() = default;
27 
28  bool operator==(NullPayloadReadable const& other) const SYMBOL_VISIBLE;
29  bool operator!=(NullPayloadReadable const& other) const SYMBOL_VISIBLE;
30 
31  static size_t constexpr read_config_size_in_words GENPYBIND(hidden) = 1;
32  static size_t constexpr write_config_size_in_words GENPYBIND(hidden) = 0;
33  static std::array<halco::hicann_dls::vx::NullPayloadReadableOnFPGA, read_config_size_in_words>
34  read_addresses(coordinate_type const& coord) SYMBOL_VISIBLE GENPYBIND(hidden);
35  static std::array<halco::hicann_dls::vx::NullPayloadReadableOnFPGA, write_config_size_in_words>
36  write_addresses(coordinate_type const& coord) SYMBOL_VISIBLE GENPYBIND(hidden);
37  std::array<fisch::vx::word_access_type::NullPayloadReadable, write_config_size_in_words>
38  encode() const SYMBOL_VISIBLE GENPYBIND(hidden);
39  void decode(std::array<
40  fisch::vx::word_access_type::NullPayloadReadable,
41  read_config_size_in_words> const& data) SYMBOL_VISIBLE GENPYBIND(hidden);
42 
43  GENPYBIND(stringstream)
44  friend std::ostream& operator<<(std::ostream& os, NullPayloadReadable const& config)
45  SYMBOL_VISIBLE;
46 
47 private:
48  friend class cereal::access;
49  template <class Archive>
50  void serialize(Archive& ar, std::uint32_t const version) SYMBOL_VISIBLE;
51 };
52 
54 
55 namespace detail {
56 
57 template <>
59  : public BackendContainerBase<
60  NullPayloadReadable,
61  fisch::vx::word_access_type::NullPayloadReadable>
62 {};
63 
64 } // namespace detail
65 
66 } // namespace vx
67 } // namespace haldls
#define EXTERN_INSTANTIATE_CEREAL_SERIALIZE(CLASS_NAME)
Definition: cerealization.h:75
static std::array< halco::hicann_dls::vx::NullPayloadReadableOnFPGA, write_config_size_in_words > write_addresses(coordinate_type const &coord) SYMBOL_VISIBLE
bool operator==(NullPayloadReadable const &other) const SYMBOL_VISIBLE
bool operator!=(NullPayloadReadable const &other) const SYMBOL_VISIBLE
static std::array< halco::hicann_dls::vx::NullPayloadReadableOnFPGA, read_config_size_in_words > read_addresses(coordinate_type const &coord) SYMBOL_VISIBLE
std::array< fisch::vx::word_access_type::NullPayloadReadable, write_config_size_in_words > encode() const SYMBOL_VISIBLE
halco::hicann_dls::vx::NullPayloadReadableOnFPGA coordinate_type
#define GENPYBIND_TAG_HALDLS_VX
Definition: genpybind.h:4
Backend container trait base.
Definition: traits.h:77