MCPcopy Create free account
hub / github.com/Forceflow/libmorton / control_decode_impl

Function control_decode_impl

test/libmorton_test.h:111–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109
110template<std::size_t FieldCount>
111void control_decode_impl(uint64_t encoding, std::size_t bitCount, const std::valarray<std::reference_wrapper<uint64_t>>& fields) {
112 if (fields.size() == 1) {
113 fields[std::slice(0, 1, 1)][0].get() = join_by_n<FieldCount>(encoding, bitCount);
114 return;
115 }
116
117 fields[std::slice(0, 1, 1)][0].get() = join_by_n<FieldCount>(encoding, bitCount);
118 control_decode_impl<FieldCount>(encoding >> 1, bitCount, fields[std::slice(1, fields.size() - 1, 1)]);
119}
120
121template<typename...T>
122void control_decode(uint64_t encoding, T&... fields) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected