tree: caeab056be1bed64f047f42e0f432f53134c849c [path history] [tgz]
  1. bool.go
  2. limits.go
  3. limits_binary.go
  4. README.md
  5. uint.go
api/apic/validate/limits/README.md

limits


import "android.googlesource.com/platform/tools/gpu/api/apic/validate/limits"

Package limits is used to calculate the possible values for a variable.

Usage

const (
	False = boolLimit(iota) // A boolean limit that is false.
	True                    // A boolean limit that is true.
	Maybe                   // A boolean limit that can be either true of false.
)

type Limits

type Limits interface {
	// Binary returns the unary operator op performed with the limits.
	Unary(op string) Limits
	// Binary returns the binary operator op performed with the limits and rhs.
	Binary(op string, rhs Limits) Limits
}

Limits represent the possible values for a given type.

func Uint

func Uint(v uint64) Limits

func Unbound

func Unbound(ty semantic.Type) Limits

Unbound returns the unbound limits for the given semantic type.