MCPcopy Create free account
hub / github.com/NVIDIA/cuda-quantum / insertIntoArray

Method insertIntoArray

runtime/common/RecordLogParser.h:140–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138
139 template <typename T>
140 void insertIntoArray(size_t offset, std::size_t index, T value) {
141 if constexpr (std::is_same_v<T, bool>) {
142 auto v = reinterpret_cast<std::vector<bool> *>(buffer.data() + offset);
143 (*v)[index] = value;
144 } else {
145 T **ptrLoc = reinterpret_cast<T **>(buffer.data() + offset);
146 ptrLoc[0][index] = value;
147 }
148 }
149
150 /// NOTE: This is used only if data layout (alignment) is missing
151 template <typename T>

Callers

nothing calls this directly

Calls 1

dataMethod · 0.45

Tested by

no test coverage detected