MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / SyncIndex

Method SyncIndex

paddle/phi/core/selected_rows_impl.cc:165–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163}
164
165void SelectedRowsImpl::SyncIndex() {
166 rwlock_->WRLock();
167 id_to_index_.clear();
168 for (int i = 0; i < static_cast<int>(rows_.size()); ++i) {
169 id_to_index_[rows_[i]] = i;
170 }
171 rwlock_->UNLock();
172}
173
174void SelectedRowsImpl::Get(const DenseTensor& ids,
175 DenseTensor* value,

Callers 2

AddNKernelFunction · 0.45
BindTensorFunction · 0.45

Calls 4

WRLockMethod · 0.80
UNLockMethod · 0.80
clearMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected