AssumeRangeAttribute
Can be used to specify that a parameter or return has a range assumption. Assumptions feed directly into the optimizer and allow better codegen. Only usable on values of type scalar integer. The range is a closed interval [min..max] - EG. the attributed value is greater-than-or-equal-to min and less-than-or-equal-to max.
Read time 3 minutesLast updated 12 days ago
Definition
- Type: Class
- Namespace: Unity.Burst.CompilerServices
- Assembly: UnityEngine.BurstModule
- Inherits from: Attribute
[AttributeUsage(AttributeTargets.Parameter|AttributeTargets.ReturnValue)]public class AssumeRangeAttribute : Attribute
Constructors
Constructor | Description |
|---|---|
| AssumeRangeAttribute(System.Int32,System.Int32) | Assume that an integer is in the signed closed interval [min..max]. |
| AssumeRangeAttribute(System.Int64,System.Int64) | Assume that an integer is in the signed closed interval [min..max]. |
| AssumeRangeAttribute(System.UInt32,System.UInt32) | Assume that an integer is in the unsigned closed interval [min..max]. |
| AssumeRangeAttribute(System.UInt64,System.UInt64) | Assume that an integer is in the unsigned closed interval [min..max]. |