method eval : beam_type -> beam_type =
fun (input : beam_type) ->
if input#get = [||] then
- new beam [| new signal 0 (fun t -> new value self#const)|]
+ new beam [| new signal (new rate 0 1)
+ (fun t -> new value self#const)|]
else
raise (Process_error "proc_const accepts no input.")
end;;
((input#get.(0))#mul input#get.(1))
| Div -> self#beam_of_ident n
((input#get.(0))#div input#get.(1))
+ | Power -> self#beam_of_ident n
+ ((input#get.(0))#power input#get.(1))
+ | And -> self#beam_of_ident n
+ ((input#get.(0))#_and input#get.(1))
+ | Or -> self#beam_of_ident n
+ ((input#get.(0))#_or input#get.(1))
+ | Xor -> self#beam_of_ident n
+ ((input#get.(0))#_xor input#get.(1))
| Mem -> self#beam_of_ident n
((input#get.(0))#mem)
| Delay -> self#beam_of_ident n
((input#get.(0))#delay input#get.(1))
| Floor -> self#beam_of_ident n
((input#get.(0))#floor)
+ | Ceil -> self#beam_of_ident n
+ ((input#get.(0))#ceil)
+ | Rint -> self#beam_of_ident n
+ ((input#get.(0))#rint)
| Int -> self#beam_of_ident n
((input#get.(0))#int)
+ | Float -> self#beam_of_ident n
+ ((input#get.(0))#float)
| Sin -> self#beam_of_ident n
((input#get.(0))#sin)
+ | Asin -> self#beam_of_ident n
+ ((input#get.(0))#asin)
| Cos -> self#beam_of_ident n
((input#get.(0))#cos)
+ | Acos -> self#beam_of_ident n
+ ((input#get.(0))#acos)
+ | Tan -> self#beam_of_ident n
+ ((input#get.(0))#tan)
| Atan -> self#beam_of_ident n
((input#get.(0))#atan)
| Atan2 -> self#beam_of_ident n
((input#get.(0))#atan2 input#get.(1))
+ | Exp -> self#beam_of_ident n
+ ((input#get.(0))#exp)
| Sqrt -> self#beam_of_ident n
((input#get.(0))#sqrt)
- | Rdtable -> self#beam_of_ident n
- ((input#get.(1))#rdtable input#get.(0) input#get.(2))
+ | Ln -> self#beam_of_ident n
+ ((input#get.(0))#ln)
+ | Lg -> self#beam_of_ident n
+ ((input#get.(0))#lg)
+ | Abs -> self#beam_of_ident n
+ ((input#get.(0))#abs)
| Mod -> self#beam_of_ident n
((input#get.(0))#_mod input#get.(1))
+ | Fmod -> self#beam_of_ident n
+ ((input#get.(0))#fmod input#get.(1))
+ | Remainder -> self#beam_of_ident n
+ ((input#get.(0))#remainder input#get.(1))
| Vectorize -> self#beam_of_ident n
((input#get.(0))#vectorize input#get.(1))
| Vconcat -> self#beam_of_ident n
((input#get.(0))#vpick input#get.(1))
| Serialize -> self#beam_of_ident n
(input#get.(0))#serialize
- | Larger -> self#beam_of_ident n
- ((input#get.(0))#larger input#get.(1))
- | Smaller -> self#beam_of_ident n
- ((input#get.(0))#smaller input#get.(1))
+ | Gt -> self#beam_of_ident n
+ ((input#get.(0))#gt input#get.(1))
+ | Lt -> self#beam_of_ident n
+ ((input#get.(0))#lt input#get.(1))
+ | Geq -> self#beam_of_ident n
+ ((input#get.(0))#geq input#get.(1))
+ | Leq -> self#beam_of_ident n
+ ((input#get.(0))#leq input#get.(1))
+ | Eq -> self#beam_of_ident n
+ ((input#get.(0))#eq input#get.(1))
+ | Neq -> self#beam_of_ident n
+ ((input#get.(0))#neq input#get.(1))
| Max -> self#beam_of_ident n
((input#get.(0))#max input#get.(1))
| Min -> self#beam_of_ident n
| Select3 -> self#beam_of_ident n
((input#get.(0))#select3 input#get.(1)
input#get.(2) input#get.(3))
+ | Rdtable -> self#beam_of_ident n
+ ((input#get.(1))#rdtable input#get.(0) input#get.(2))
+ | Rwtable -> self#beam_of_ident n
+ ((input#get.(0))#rwtable input#get.(1)
+ input#get.(2) input#get.(3) input#get.(4))
end;;
class virtual process_binary =
method eval : beam_type -> beam_type =
fun (input : beam_type) ->
let memory = Hashtbl.create self#delay in
- let rates = ref (Array.make self#dim#output 0) in
+ let rates = ref (Array.make self#dim#output (new rate 0 1)) in
let split : (time -> value_type array) -> (time -> value_type) array =
fun beam_at ->