Contents

BNNSGraphContextSetArgumentType(_:_:)

Specifies the argument type for a graph context.

Declaration

func BNNSGraphContextSetArgumentType(_ context: bnns_graph_context_t, _ argument_type: BNNSGraphArgumentType) -> Int32

Parameters

  • context:

    The graph context.

  • argument_type:

    A constant that specifies the argument type.

Return Value

0 on success, nonzero on failure.

Discussion

Some arguments require dynamic strides. In this case, set the graph context’s argument type to BNNSGraphArgumentTypeTensor and pass the arguments to BNNSGraphContextExecute(_:_:_:_:_:_:) as BNNSTensor structures.

The default argument type for a graph context is BNNSGraphArgumentTypePointer.

See Also

Specifying and querying a context’s properties