Contents

BNNSGraphGetArgumentInterleaveFactors(_:_:_:_:_:)

Returns the interleave factors for arguments, if present

Declaration

func BNNSGraphGetArgumentInterleaveFactors(_ graph: bnns_graph_t, _ function: UnsafePointer<CChar>?, _ argument_count: Int, _ argument_interleave: UnsafeMutablePointer<UnsafePointer<UInt16>?>, _ argument_interleave_counts: UnsafeMutablePointer<Int>) -> Int32

Discussion

If any arguments to the function are specified with an interleave factor (e.g. using the interleave option to tensor_buffer in MIL), this function can be used to retrieve the interleave factor array.

Arguments:

  • graph: object to query.

  • function: function to query. It may be NULL if there is only one function.

  • argument_count: number of elements in argument_interleave and in argument_interleave_counts.

  • argument_interleave: array of pointers to interleave factors to populate. On exit argument_interleave[i] will be set to either:

    • NULL if argument i has no interleave factor; or

    • a pointer into the graph object containing the interleave factors that contains argument_interleave_counts[i] elements. Only the first [0, min(argument_count, argument_interleave)) entries are set.

  • argument_interleave_counts: gives the size of the array pointed to by argument_interleave[i], or is set to 0 if argument_interleave[i] is set to NULL.

Returns: 0 on success, nonzero on failure. Failure may be caused by either invalid values of graph or function.

See Also

Querying a graph’s properties