Description: Counts the occurrence of each non-negative integer in an array.
[object Object]is the minimum size of the output tensor. When[object Object]is a null pointer, each occurrence of element[object Object]increments the corresponding[object Object]value by 1. When weights is provided, the corresponding[object Object]value is incremented by[object Object]. Consequently, the size of[object Object]is the greater of (the maximum value in[object Object]+ 1) and[object Object].Formulas:
If
[object Object]is the value of[object Object]at position[object Object]and[object Object]is specified, then:Otherwise:
Each operator has calls. First, [object Object] is called to obtain the workspace size required for computation and the executor covering the operator computation process. Then, [object Object] is called to perform computation.
[object Object][object Object]
Parameters:
[object Object](aclTensor*, computation input): aclTensor on the device. The data type can be INT8, INT16, INT32, INT64, or UINT8. The value must be a non-negative integer. The can be 1-dimensional ND. It supports .[object Object](aclTensor*, computation input): aclTensor on the device, which is the weight of each[object Object]value. It can be a null pointer. The data type can be FLOAT, FLOAT16, FLOAT64, INT8, INT16, INT32, INT64, UINT8, or BOOL. The can be 1-dimensional ND. The shape must be the same as that of[object Object]. It supports .[object Object](int64_t, computation input): an integer on the host, which specifies the minimum length of the output tensor. This parameter ensures the minimum length of the[object Object]. If the maximum value of[object Object]is less than[object Object], the length of[object Object]is[object Object]. Otherwise, the length of[object Object]is the maximum value of[object Object]+ 1.[object Object](aclTensor*, computation output): aclTensor on the device. The data type can be INT32, INT64, FLOAT, or DOUBLE. The can be 1-dimensional ND. It supports . The length of[object Object]is the maximum value of[object Object]+ 1 or[object Object], whichever is greater.[object Object](uint64_t *, output): size of the workspace to be allocated on the device.[object Object](aclOpExecutor **, output): operator executor, covering the operator computation process.
Returns:
Parameters:
[object Object](void *, input): address of the workspace to be allocated on the device.[object Object](uint64_t, input): size of the workspace to be allocated on the device, which is obtained by calling the first-phase API[object Object].[object Object](aclOpExecutor*, input): operator executor, covering the operator computation process.[object Object](aclrtStream, input): stream for executing the task.
Returns:
- Deterministic computation:
[object Object]defaults to a deterministic implementation.
The following example is for reference only. For details, see .