package sarek

  1. Overview
  2. Docs
type kernel
and kvect =
  1. | IntVect of int
  2. | Floatvect of int
type intrinsics = string * string
type elttype =
  1. | EInt32
  2. | EInt64
  3. | EFloat32
  4. | EFloat64
type memspace =
  1. | LocalSpace
  2. | Global
  3. | Shared
type k_ext =
  1. | Kern of k_ext * k_ext
  2. | Block of k_ext
  3. | Params of k_ext
  4. | Plus of k_ext * k_ext
  5. | Plusf of k_ext * k_ext
  6. | Min of k_ext * k_ext
  7. | Minf of k_ext * k_ext
  8. | Mul of k_ext * k_ext
  9. | Mulf of k_ext * k_ext
  10. | Div of k_ext * k_ext
  11. | Divf of k_ext * k_ext
  12. | Mod of k_ext * k_ext
  13. | Id of string
  14. | IdName of string
  15. | GlobalFun of k_ext * string * string
  16. | IntVar of int * string
  17. | FloatVar of int * string
  18. | UnitVar of int * string
  19. | CastDoubleVar of int * string
  20. | DoubleVar of int * string
  21. | BoolVar of int * string
  22. | Arr of string * k_ext * elttype * memspace
  23. | VecVar of k_ext * int * string
  24. | Concat of k_ext * k_ext
  25. | Constr of string * string * k_ext list
  26. | Record of string * k_ext list
  27. | RecGet of k_ext * string
  28. | RecSet of k_ext * k_ext
  29. | Empty
  30. | Seq of k_ext * k_ext
  31. | Return of k_ext
  32. | Set of k_ext * k_ext
  33. | Decl of k_ext
  34. | SetV of k_ext * k_ext
  35. | SetLocalVar of k_ext * k_ext * k_ext
  36. | Intrinsics of intrinsics
  37. | IntId of string * int
  38. | Int of int
  39. | Float of float
  40. | Double of float
  41. | Custom of string * int * string
  42. | CustomVar of string * string * string
  43. | IntVecAcc of k_ext * k_ext
  44. | Local of k_ext * k_ext
  45. | Acc of k_ext * k_ext
  46. | Ife of k_ext * k_ext * k_ext
  47. | If of k_ext * k_ext
  48. | Match of string * k_ext * case array
  49. | Or of k_ext * k_ext
  50. | And of k_ext * k_ext
  51. | Not of k_ext
  52. | EqCustom of string * k_ext * k_ext
  53. | EqBool of k_ext * k_ext
  54. | LtBool of k_ext * k_ext
  55. | GtBool of k_ext * k_ext
  56. | LtEBool of k_ext * k_ext
  57. | GtEBool of k_ext * k_ext
  58. | DoLoop of k_ext * k_ext * k_ext * k_ext
  59. | While of k_ext * k_ext
  60. | App of k_ext * k_ext array
  61. | GInt of unit -> int32
  62. | GFloat of unit -> float
  63. | GFloat64 of unit -> float
  64. | Native of Spoc.Devices.device -> string
  65. | Pragma of string list * k_ext
  66. | Map of k_ext * k_ext * k_ext
  67. | Unit
and case = int * (string * string * int * string) option * k_ext
type kfun =
  1. | KernFun of k_ext * k_ext
val string_of_ast : k_ext -> string
val print_ast : k_ext -> unit