mirror of https://github.com/google/gemma.cpp.git
Add const batch accessor to RowVectorBatch.
PiperOrigin-RevId: 675530484
This commit is contained in:
parent
892f3bbcbe
commit
e4ba93412a
|
|
@ -58,6 +58,10 @@ class RowVectorBatch {
|
|||
HWY_DASSERT(batch_idx < batch_size_);
|
||||
return mem_.get() + batch_idx * len_;
|
||||
}
|
||||
const T* Batch(size_t batch_idx) const {
|
||||
HWY_DASSERT(batch_idx < batch_size_);
|
||||
return mem_.get() + batch_idx * len_;
|
||||
}
|
||||
|
||||
// For MatMul or other operations that process the entire batch at once.
|
||||
T* All() { return mem_.get(); }
|
||||
|
|
|
|||
Loading…
Reference in New Issue