---
title: "randomPhiloxStateTensor(withCounterLow:counterHigh:key:name:)"
framework: metalperformanceshadersgraph
role: symbol
role_heading: Instance Method
path: "metalperformanceshadersgraph/mpsgraph/randomphiloxstatetensor(withcounterlow:counterhigh:key:name:)"
---

# randomPhiloxStateTensor(withCounterLow:counterHigh:key:name:)

Creates a tensor representing state using the Philox algorithm with given counter and key values.

## Declaration

```swift
func randomPhiloxStateTensor(withCounterLow counterLow: Int, counterHigh: Int, key: Int, name: String?) -> MPSGraphTensor
```

## Parameters

- `counterLow`: The value to initilaize lower 64 bits of counter to. Philox utilizes a 128 bit counter
- `counterHigh`: The value to initilaize upper 64 bits of counter to. Philox utilizes a 128 bit counter
- `key`: The value to initialize the key to in Philox algorithm.
- `name`: Name for the operation

## Return Value

Return Value An MPSGraphTensor representing a random state, to be passed as an input to a random op.

## Discussion

Discussion See randomPhiloxStateTensorWithSeed.
