Home My Page Projects Code Snippets Project Openings diderot

# SCM Repository

[diderot] View of /trunk/src/compiler/basis/TYPES
 [diderot] / trunk / src / compiler / basis / TYPES

# View of /trunk/src/compiler/basis/TYPES

Tue May 4 15:55:00 2010 UTC (11 years, 7 months ago) by jhr
Original Path: trunk/src/basis/TYPES
File size: 1853 byte(s)
```  Some work on typing the basis
```
```Generic operator/function types

k -- integer that specifies differentiability
(d) -- integer dimension (indices range from 0..d-1)
[d] -- order-1 tensor shape
[dd] -- tensor shape (sequence of integers; order is sequence length)

//// - : tensor[dd] * tensor[dd] -> tensor[dd]
//// - : tensor[dd] -> tensor[dd]
//// @ : field#k(d)[dd] * real(d) -> tensor[dd]
//// * : real * real -> real
//// * : real * tensor[dd] -> tensor[dd]
//// * : tensor[dd] * real -> tensor[dd]
//// / : tensor[dd] * real -> tensor[dd]
//// && : bool * bool -> bool
//// + : int * int -> int
//// + : tensor[dd] * tensor[dd] -> tensor[dd]
//// < : real * real -> bool
//// > : real * real -> bool
//// |()| : tensor[dd] -> real
//// || : bool * bool -> bool
//// CL : tensor[3,3] -> real
//// D : field#k(d)[dd] -> field#(k-1)(d)[dd,d]
//// dot : tensor[d] * tensor[d] -> real
//// modulate : vec3 * vec3 -> vec3
//// pow : real * real -> real
//// principleEvec : tensor[d,d] -> tensor[d]

Specific type instances

//// principleEvec : tensor[3,3] -> vec3
//// * : real * vec3 -> vec3
//// @ : field * vec -> tensor[3,3]
//// CL : tensor[3,3] -> real
//// < : real * real -> bool
//// dot : vec3 * vec3 -> real
//// - : vec3 -> vec3
//// * : real * real -> real
//// * : real * vec3 -> vec3
//// + : vec3 * vec3 -> vec3
//// + : int * int -> int
//// > : real * real -> bool
//// && : bool * bool -> bool
//// + : vec3 * vec3 -> vec3
//// |()| : vec -> real
//// - : vec3 * vec3 -> vec3
//// / : vec3 * real -> vec3
//// @ : field * vec3 -> real
//// D : field -> field
//// dot : vec3 * vec3 -> real
//// * : real * vec3 -> vec3
//// modulate : vec3 * vec3 -> vec3
//// + : vec3 * vec3 -> vec3
//// pow : real * real -> real
//// * : real * real -> real
//// - : real * real -> real
//// > : real * real -> bool
//// < : real * real -> bool
//// || : bool * bool -> bool
```