forked from themetaschemer/malt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
impl.rkt
22 lines (18 loc) · 774 Bytes
/
impl.rkt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#lang racket
(require (for-syntax "impl-loader.rkt"))
;;--------------------------------
;; Define an implementation loader
;;--------------------------------
(define-syntax load-tensors
(λ (x)
(printf "Tensor implementation: ~s~%" (tensor-implementation))
#`(begin
#,(case (tensor-implementation)
((learner) #'(require "learner.rkt"))
((flat-tensors) #'(require "flat-tensors.rkt"))
((nested-tensors) #'(require "nested-tensors.rkt")))
#,(case (tensor-implementation)
((learner) #'(provide (all-from-out "learner.rkt")))
((flat-tensors) #'(provide (all-from-out "flat-tensors.rkt")))
((nested-tensors) #'(provide (all-from-out "nested-tensors.rkt")))))))
(load-tensors)