---
title: "BNNSGraphContextSetArgumentType(_:_:)"
framework: accelerate
role: symbol
role_heading: Function
path: "accelerate/bnnsgraphcontextsetargumenttype(_:_:)"
---

# BNNSGraphContextSetArgumentType(_:_:)

Specifies the argument type for a graph context.

## Declaration

```swift
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

Return Value 0 on success, nonzero on failure.

## Discussion

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

- [BNNSGraphContextSetStreamingAdvanceCount(_:_:)](accelerate/bnnsgraphcontextsetstreamingadvancecount(_:_:).md)
- [BNNSGraphArgumentType](accelerate/bnnsgraphargumenttype.md)
- [BNNSGraphContextSetDynamicShapes(_:_:_:_:)](accelerate/bnnsgraphcontextsetdynamicshapes(_:_:_:_:).md)
- [bnns_graph_shape_t](accelerate/bnns_graph_shape_t.md)
- [BNNSGraphContextSetBatchSize(_:_:_:)](accelerate/bnnsgraphcontextsetbatchsize(_:_:_:).md)
- [BNNSGraphContextEnableNanAndInfChecks(_:_:)](accelerate/bnnsgraphcontextenablenanandinfchecks(_:_:).md)
- [BNNSGraphContextGetWorkspaceSize(_:_:)](accelerate/bnnsgraphcontextgetworkspacesize(_:_:).md)
- [BNNSGraphContextSetStreamingAdvanceCount(_:_:)](accelerate/bnnsgraphcontextsetstreamingadvancecount(_:_:).md)
