MCPcopy Create free account
hub / github.com/Niko1221/Strata / device_alias

Method device_alias

engine/src/core/expert_source.cpp:5325–5333  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5323}
5324
5325const uint8_t* FileExpertSource::device_alias(int64_t layer, int64_t expert) const {
5326 if (!pinned(layer, expert) || complement_device_ == nullptr) return nullptr;
5327 const size_t index = (size_t) layer * (size_t) n_expert_ + (size_t) expert;
5328 if (exchange_storage_.active()) return exchange_storage_.resident(index).device;
5329 if (!soft_in_.empty() && soft_in_[index] != SIZE_MAX) // soft_commit_exchanges: out is read from its exchange buffer
5330 return override_.empty() || override_[index] == nullptr || xstage_dev_ == nullptr
5331 ? nullptr : xstage_dev_ + (size_t) (override_[index] - xstage_);
5332 return complement_device_ + (size_t) complement_offsets_[index];
5333}
5334
5335bool FileExpertSource::pcie_layer(int64_t layer) const {
5336 if (complement_ready_ && complement_pinned_ && complement_device_ != nullptr)

Callers 3

test_rotating_sourceFunction · 0.45
test_replace_residentFunction · 0.45

Calls 8

pinnedFunction · 0.85
expert_layoutFunction · 0.85
activeMethod · 0.45
residentMethod · 0.45
emptyMethod · 0.45
blob_bytesMethod · 0.45
blob_offsetMethod · 0.45
sizeMethod · 0.45

Tested by 2

test_rotating_sourceFunction · 0.36
test_replace_residentFunction · 0.36