MCPcopy Create free account
hub / github.com/DeepGraphLearning/graphvite / fill

Method fill

include/base/memory.h:186–191  ·  view source on GitHub ↗

Fill the memory space with data. Automatically resize the memory when necessary. */

Source from the content-addressed store, hash-verified

184
185 /** Fill the memory space with data. Automatically resize the memory when necessary. */
186 void fill(const Data &data, Index _count = 0) {
187 if (_count)
188 resize(_count);
189 for (Index i = 0; i < count; i++)
190 host_ptr[i] = data;
191 }
192
193 /** Gather data from a pool according to an index mapping. Automatically resize the memory when necessary. */
194 void gather(const std::vector<Data> &memory, const std::vector<Index> &mapping) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected