A game about forced loneliness, made by TACStudios
1using System;
2
3namespace Unity.Burst.CompilerServices
4{
5 /// <summary>
6 /// Can be used to specify that a parameter or return has a range assumption.
7 /// Assumptions feed directly into the optimizer and allow better codegen.
8 ///
9 /// Only usable on values of type scalar integer.
10 ///
11 /// The range is a closed interval [min..max] - EG. the attributed value
12 /// is greater-than-or-equal-to min and less-than-or-equal-to max.
13 /// </summary>
14 [AttributeUsage(AttributeTargets.ReturnValue | AttributeTargets.Parameter)]
15 public class AssumeRangeAttribute : Attribute
16 {
17 /// <summary>
18 /// Assume that an integer is in the signed closed interval [min..max].
19 /// </summary>
20 /// <param name="min">The inclusive minimum value.</param>
21 /// <param name="max">The inclusive maximum value.</param>
22 public AssumeRangeAttribute(long min, long max) { }
23
24 /// <summary>
25 /// Assume that an integer is in the unsigned closed interval [min..max].
26 /// </summary>
27 /// <param name="min">The inclusive minimum value.</param>
28 /// <param name="max">The inclusive maximum value.</param>
29 public AssumeRangeAttribute(ulong min, ulong max) { }
30 }
31}