diff options
| author | android-build-team Robot <android-build-team-robot@google.com> | 2018-06-07 07:21:04 +0000 |
|---|---|---|
| committer | android-build-team Robot <android-build-team-robot@google.com> | 2018-06-07 07:21:04 +0000 |
| commit | 442059ad3e36f3e9e5b49969bf6058b64f87fcbd (patch) | |
| tree | 2fd9a33642bef18aa3362d2c80c3b63160844408 | |
| parent | eab0364c085db01ce4b3c28539ef876a48fd17b0 (diff) | |
| parent | 0be954949ddf098fb9ab28c523b04aceeb575323 (diff) | |
| download | android_hardware_interfaces-442059ad3e36f3e9e5b49969bf6058b64f87fcbd.tar.gz android_hardware_interfaces-442059ad3e36f3e9e5b49969bf6058b64f87fcbd.tar.bz2 android_hardware_interfaces-442059ad3e36f3e9e5b49969bf6058b64f87fcbd.zip | |
Snap for 4826885 from 0be954949ddf098fb9ab28c523b04aceeb575323 to pi-release
Change-Id: I61892e5290c6001f820e20301d5f5a1b10802e93
| -rw-r--r-- | camera/device/3.2/default/CameraDeviceSession.cpp | 2 | ||||
| -rw-r--r-- | current.txt | 2 | ||||
| -rw-r--r-- | neuralnetworks/1.0/types.hal | 52 |
3 files changed, 51 insertions, 5 deletions
diff --git a/camera/device/3.2/default/CameraDeviceSession.cpp b/camera/device/3.2/default/CameraDeviceSession.cpp index 8d002646c..69f853562 100644 --- a/camera/device/3.2/default/CameraDeviceSession.cpp +++ b/camera/device/3.2/default/CameraDeviceSession.cpp @@ -1391,6 +1391,8 @@ void CameraDeviceSession::sShrinkCaptureResult( std::vector<const camera_metadata_t*>* physCamMdArray, bool handlePhysCam) { *dst = *src; + // Reserve maximum number of entries to avoid metadata re-allocation. + mds->reserve(1 + (handlePhysCam ? src->num_physcam_metadata : 0)); if (sShouldShrink(src->result)) { mds->emplace_back(sCreateCompactCopy(src->result)); dst->result = mds->back().getAndLock(); diff --git a/current.txt b/current.txt index 05e8a1fda..e519eb0b5 100644 --- a/current.txt +++ b/current.txt @@ -267,7 +267,7 @@ bd33ac23c57b4a07632691d2191bc2c93930f57e62f4ccf459748fdaa5c0f480 android.hardwar ad8a28ca3a5549fb9bc24cf5f80ac8f660cc27be885210d76266780aa52ddb8d android.hardware.keymaster@3.0::types 5804ca86611d72e5481f022b3a0c1b334217f2e4988dad25730c42af2d1f4d1c android.hardware.neuralnetworks@1.0::IDevice 12e8dca4ab7d8aadd0ef8f1b438021938e2396139e85db2ed65783b08800aa52 android.hardware.neuralnetworks@1.0::IExecutionCallback -18e6885e184fe48401c2c53f1d1b8bfb07240f40c81ae6b9d2e336fca6efdbb7 android.hardware.neuralnetworks@1.0::types +86b77e06da756a76aa3685be88765852dd982a86d8c90b8b4fc1130ed4184c8f android.hardware.neuralnetworks@1.0::types d4840db8efabdf1e4b344fc981cd36e5fe81a39aff6e199f6d06c1c8da413efd android.hardware.radio@1.0::types f96cbc59dfe16c8d0c2a7e06db24d8738a6328b6e90f7b8e1640ea2b4600debd android.hardware.radio@1.1::ISap 2d86929794795e5c70f4fdb5073485fd05835c9c6f496116687c3d9f32e6df3e android.hardware.radio@1.2::ISap diff --git a/neuralnetworks/1.0/types.hal b/neuralnetworks/1.0/types.hal index 4efa13add..1ae1726ca 100644 --- a/neuralnetworks/1.0/types.hal +++ b/neuralnetworks/1.0/types.hal @@ -1519,6 +1519,41 @@ struct Operand { /** * Dimensions of the operand. + * + * For a scalar operand, dimensions.size() must be 0. + * + * For a tensor operand, dimensions.size() must be at least 1; + * however, any of the dimensions may be unspecified. + * + * A tensor operand with all dimensions specified has "fully + * specified" dimensions. Whenever possible (i.e., whenever the + * dimensions are known at model construction time), a tensor + * operand should have (but is not required to have) fully + * specified dimensions, in order to enable the best possible + * performance. + * + * If a tensor operand's dimensions are not fully specified, the + * dimensions of the operand are deduced from the operand + * dimensions and values of the operation for which that operand + * is an output. + * + * In the following situations, a tensor operand's dimensions must + * be fully specified: + * + * . The operand has lifetime CONSTANT_COPY or + * CONSTANT_REFERENCE. + * + * . The operand has lifetime MODEL_INPUT or MODEL_OUTPUT. Fully + * specified dimensions must either be present in the + * Operand or they must be provided in the corresponding + * RequestArgument. + * EXCEPTION: If the input or output is optional and omitted + * (by setting the hasNoValue field of the corresponding + * RequestArgument to true) then it need not have fully + * specified dimensions. + * + * A tensor operand with some number of unspecified dimensions is + * represented by setting each unspecified dimension to 0. */ vec<uint32_t> dimensions; @@ -1662,10 +1697,19 @@ struct RequestArgument { /** * Updated dimension information. * - * If dimensions.size() > 0, dimension information was provided along with - * the argument. This can be the case for models that accept inputs of - * varying size. This can't change the rank, just the value of the - * dimensions that were unspecified in the model. + * If dimensions.size() > 0, dimension information was provided + * along with the argument. This can be the case for models that + * accept inputs of varying size. This can't change the rank, just + * the value of the dimensions that were unspecified in the + * model. If dimensions.size() > 0, then all dimensions must be + * specified here; and any dimension that was specified in the + * model must have the same value here. + * + * If the dimensions in the model are not fully specified, then + * they must be fully specified here, unless hasNoValue is set to + * true. If the dimensions in the model are fully specified, then + * either dimensions.size() may be 0, or the dimensions in the + * model must be identical to the dimensions here. */ vec<uint32_t> dimensions; }; |
