Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d910bd6a authored by Ian Hua's avatar Ian Hua
Browse files

Fix HAL and AIDL files to be consistent with API generation tool.

Bug: 161426966
Test: generate_api.sh
Change-Id: I4f4cc108ccdf2f37a1a7fa154ba8e8a186295276
parent f970abe6
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -838,5 +838,7 @@ e34b4c7bec5e032c14804707ca924dd6b99ed5ba139da7505fe7d698d0fe178f android.hardwar

# ABI preserving changes to HALs during Android T
62ace52d9c3ff1f60f94118557a2aaf0b953513e59dcd34d5f94ae28d4c7e780 android.hardware.fastboot@1.0::IFastboot
ca62a2a95d173ed323309e5e00f653ad3cceec82a6e5e4976a249cb5aafe2515 android.hardware.neuralnetworks@1.2::types
fa76bced6b1b71c40fc706c508a9011284c57f57831cd0cf5f45653ed4ea463e android.hardware.neuralnetworks@1.3::types

# There should be no more HIDL HALs - please use AIDL instead.
+1 −2
Original line number Diff line number Diff line
@@ -41,7 +41,6 @@ enum OperandType : @1.2::OperandType {
     * real_value = (integer_value - zeroPoint) * scale.
     */
    TENSOR_QUANT8_ASYMM_SIGNED = 14,

    /**
     * A reference to a subgraph.
     *
@@ -5230,7 +5229,7 @@ enum OperationType : int32_t {
     * The output is calculated using the following formula:
     *
     *     h-swish(x) = x * max(0, min(6, (x + 3))) / 6

     *
     * Supported tensor {@link OperandType}:
     * * {@link OperandType::TENSOR_FLOAT16}
     * * {@link OperandType::TENSOR_FLOAT32}
+27 −31
Original line number Diff line number Diff line
@@ -24,35 +24,30 @@ package android.hardware.neuralnetworks;
 * Types prefaced with TENSOR_* must be used for tensor data (i.e., tensors
 * with at least one dimension). Types not prefaced by TENSOR_* represent
 * scalar values and must have no dimensions.
 *
 * Although we define many types, most operators accept just a few
 * types. Most used are {@link OperandType::TENSOR_FLOAT32},
 * {@link OperandType::TENSOR_QUANT8_ASYMM},
 * and {@link OperandType::INT32}.
 */
@VintfStability
@Backing(type="int")
enum OperandType {
    /**
     * A 32 bit floating point scalar value.
     */
    /** A 32 bit floating point scalar value. */
    FLOAT32 = 0,
    /**
     * A signed 32 bit integer scalar value.
     */
    /** A signed 32 bit integer scalar value. */
    INT32 = 1,
    /**
     * An unsigned 32 bit integer scalar value.
     */
    /** An unsigned 32 bit integer scalar value. */
    UINT32 = 2,
    /**
     * A tensor of 32 bit floating point values.
     */
    /** A tensor of 32 bit floating point values. */
    TENSOR_FLOAT32 = 3,
    /**
     * A tensor of 32 bit integer values.
     */
    /** A tensor of 32 bit integer values. */
    TENSOR_INT32 = 4,
    /**
     * A tensor of 8 bit unsigned integers that represent real numbers.
     *
     * Attached to this tensor are two numbers that can be used to convert the 8 bit integer to the
     * real value and vice versa. These two numbers are:
     * Attached to this tensor are two numbers that can be used to convert the
     * 8 bit integer to the real value and vice versa. These two numbers are:
     * - scale: a 32 bit floating point value greater than zero.
     * - zeroPoint: a 32 bit integer, in range [0, 255].
     *
@@ -63,15 +58,15 @@ enum OperandType {
    /**
     * An 8 bit boolean scalar value.
     *
     * Values of this operand type are either true or false. A zero value represents false; any
     * other value represents true.
     * Values of this operand type are either true or false. A zero value
     * represents false; any other value represents true.
     */
    BOOL = 6,
    /**
     * A tensor of 16 bit signed integers that represent real numbers.
     *
     * Attached to this tensor is a number representing real value scale that is used to convert the
     * 16 bit number to a real value in the following way:
     * Attached to this tensor is a number representing real value scale that is
     * used to convert the 16 bit number to a real value in the following way:
     * realValue = integerValue * scale.
     *
     * scale is a 32 bit floating point with value greater than zero.
@@ -84,8 +79,8 @@ enum OperandType {
    /**
     * A tensor of 8 bit boolean values.
     *
     * Values of this operand type are either true or false. A zero value represents false; any
     * other value represents true.
     * Values of this operand type are either true or false. A zero value
     * represents false; any other value represents true.
     */
    TENSOR_BOOL8 = 9,
    /**
@@ -95,8 +90,9 @@ enum OperandType {
    /**
     * A tensor of 8 bit signed integers that represent real numbers.
     *
     * This tensor is associated with additional fields that can be used to convert the 8 bit signed
     * integer to the real value and vice versa. These fields are:
     * This tensor is associated with additional fields that can
     * be used to convert the 8 bit signed integer to the real value and vice versa.
     * These fields are:
     * - channelDim: a 32 bit unsigned integer indicating channel dimension.
     * - scales: an array of positive 32 bit floating point values.
     * The size of the scales array must be equal to dimensions[channelDim].
@@ -113,8 +109,8 @@ enum OperandType {
    /**
     * A tensor of 16 bit unsigned integers that represent real numbers.
     *
     * Attached to this tensor are two numbers that can be used to convert the 16 bit integer to the
     * real value and vice versa. These two numbers are:
     * Attached to this tensor are two numbers that can be used to convert the
     * 16 bit integer to the real value and vice versa. These two numbers are:
     * - scale: a 32 bit floating point value greater than zero.
     * - zeroPoint: a 32 bit integer, in range [0, 65535].
     *
@@ -125,8 +121,8 @@ enum OperandType {
    /**
     * A tensor of 8 bit signed integers that represent real numbers.
     *
     * Attached to this tensor is a number representing real value scale that is used to convert the
     * 8 bit number to a real value in the following way:
     * Attached to this tensor is a number representing real value scale that is
     * used to convert the 8 bit number to a real value in the following way:
     * realValue = integerValue * scale.
     *
     * scale is a 32 bit floating point with value greater than zero.
@@ -135,8 +131,8 @@ enum OperandType {
    /**
     * A tensor of 8 bit signed integers that represent real numbers.
     *
     * Attached to this tensor are two numbers that can be used to convert the 8 bit integer to the
     * real value and vice versa. These two numbers are:
     * Attached to this tensor are two numbers that can be used to convert the
     * 8 bit integer to the real value and vice versa. These two numbers are:
     * - scale: a 32 bit floating point value greater than zero.
     * - zeroPoint: a 32 bit integer, in range [-128, 127].
     *
+118 −10

File changed.

Preview size limit exceeded, changes collapsed.

+1 −1

File changed.

Contains only whitespace changes.