Closed hikettei closed 1 year ago
Introducing new macro define-composite-function:
define-composite-function
(defmodel (ComposedFunction (self) :where (A[~] B[~] -> [~]) :on-call-> ((self x y) (declare (ignore self)) (!mul (!sin (!add x y)) (!cos (!add x y))))) (define-composite-function (ComposedFunction) !composed) (!composed (randn `(10 10)) (randn `(10 10))) ;; first call includes compiling time... (!composed (randn `(10 10)) (randn `(10 10))) ;; second call is inlined and works fast.
Introducing new macro
define-composite-function
: