[object Object]

[object Object][object Object]undefined
[object Object]
  • Operator function: searches for the position where the given tensor value (self) should be inserted in a sorted tensor (sortedSequence). Returns a tensor of the same size as [object Object], where each element indicates the position where the given value should be inserted in the original tensor. If self is of the Scalar type, see the document.
  • The calculation formula is as follows: Assume that the length of the innermost sequence to be searched is N, and for each input element x = self[object Object]i[object Object]:
    • When [object Object], the left insertion point is returned.
    outi=min{j[0,N]sortedSequencejx}out_i=\min\{j\in[0,N]\mid sortedSequence_j\ge x\}
    • When [object Object], the right insertion point is returned.
    outi=min{j[0,N]sortedSequencej>x}out_i=\min\{j\in[0,N]\mid sortedSequence_j>x\}

    If no jj meets the condition, NN is returned.

[object Object]

Each operator has calls. First, the [object Object] API is called to obtain the workspace size required for computation and the executor that contains the operator computation flow. Then, the [object Object] API is called to perform computation.

[object Object]
[object Object]
[object Object]
  • Parameters

    [object Object]
  • Return Value

    [object Object]: status code. For details, see .

    The first-phase API implements input parameter verification. The following errors may be thrown.

    [object Object]
[object Object]
  • Parameters

    [object Object]
  • Return Value

    [object Object]: status code. For details, see .

[object Object]
  • Deterministic description: The deterministic implementation is used by default in [object Object].
[object Object]

The following example is for reference only. For details, see .

[object Object]