You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

LLamaSeqId.cs 691 B

1234567891011121314151617181920212223242526
  1. namespace LLama.Native;
  2. /// <summary>
  3. /// ID for a sequence in a batch
  4. /// </summary>
  5. /// <param name="Value"></param>
  6. public record struct LLamaSeqId(int Value)
  7. {
  8. /// <summary>
  9. /// The raw value
  10. /// </summary>
  11. public int Value = Value;
  12. /// <summary>
  13. /// Convert a LLamaSeqId into an integer (extract the raw value)
  14. /// </summary>
  15. /// <param name="pos"></param>
  16. public static explicit operator int(LLamaSeqId pos) => pos.Value;
  17. /// <summary>
  18. /// Convert an integer into a LLamaSeqId
  19. /// </summary>
  20. /// <param name="value"></param>
  21. /// <returns></returns>
  22. public static explicit operator LLamaSeqId(int value) => new(value);
  23. }