tag | 1d90f1fbb7c0758f2065f48f91f8fd708cf35b1d | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Sat Oct 01 12:37:07 2022 -0700 |
object | d7b87b92aef2ea374f3c3e9b2191c03ea1e91492 |
aml_go_neu_330912000
commit | d7b87b92aef2ea374f3c3e9b2191c03ea1e91492 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Fri Jun 17 13:35:16 2022 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Fri Jun 17 13:35:16 2022 +0000 |
tree | da86de748981dd96113865df11834b360d9da02b | |
parent | 638d0ee87b2ef1082fe674e75f89932b179fe32a [diff] | |
parent | dd67dd31f83d56d34f933f3ff0204baa55a68aac [diff] |
Snap for 8736885 from dd67dd31f83d56d34f933f3ff0204baa55a68aac to mainline-go-neuralnetworks-release Change-Id: I2c77e787a2b2c7af2d790b23919ff6fead06a8c8
“Small vector” optimization for Rust: store up to a small number of items on the stack
use smallvec::{SmallVec, smallvec}; // This SmallVec can hold up to 4 items on the stack: let mut v: SmallVec<[i32; 4]> = smallvec![1, 2, 3, 4]; // It will automatically move its contents to the heap if // contains more than four items: v.push(5); // SmallVec points to a slice, so you can use normal slice // indexing and other methods to access its contents: v[0] = v[1] + v[2]; v.sort();