49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
# File 'lib/Yinspire.rb', line 49
def self.commit(file, force_compilation=false)
cflags = "-DNDEBUG -O3 -fomit-frame-pointer -Winline -Wall -I#{LIB_DIR} -I${PWD}"
ldflags = ""
Cplus2Ruby.commit(file, force_compilation, cflags, ldflags)
Cplus2Ruby.model.entities.each do |klass|
next unless klass.ancestors.include?(NeuralEntity)
NeuralEntity.entity_type_map[klass.name] = klass
NeuralEntity.entity_type_map_reverse[klass] = klass.name
lc = NeuralEntity.entity_ann_load_cache[klass] = Hash.new
dc = NeuralEntity.entity_ann_dump_cache[klass] = Array.new
klass.recursive_annotations.each {|name, h|
next unless h[:marshal]
lc[name.to_sym] = lc[name.to_s] = :"#{name}="
dc << name.to_sym
}
end
end
|