OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-atomese-simd commits / 46f2046

Exhibit the interface specification
46f20464bc1da45ba9f823e8fa9f4b64b1fb1c72
by Linas Vepštas <linasvepstas@gmail.com> · 2025-09-12T02:52:14.000Z

Changed files (2) +17 -5

examples/accumulator.scm +1 -1
……@@ -84,7 +84,7 @@
8484; and the data source.
8585(define kerny
8686 (Section
87 (Predicate "vec_add")
87 (Item "vec_add")
8888 (ConnectorSeq accum-location accum-location source-location)))
8989
9090; Define a pair of functions. The first runs the kernel, defined above,
examples/atomese-kernel.scm +16 -4
……@@ -59,7 +59,7 @@
5959 (SetValue clnode (Predicate "*-write-*")
6060 (Section
6161 ; Must be name of kernel defined inside of the clnode.
62 (Predicate "vec_mult")
62 (Item "vec_mult")
6363 (ConnectorSeq
6464 (Number 0 0 0 0 0)
6565 (Number 1 2 3 4 5)
……@@ -84,7 +84,7 @@
8484(cog-execute!
8585 (SetValue clnode (Predicate "*-write-*")
8686 (Section
87 (Predicate "vec_mult")
87 (Item "vec_mult")
8888 (ConnectorSeq
8989 (Number 0 0 0 0 0 0 0 0 0 0 0)
9090 (Number 1 2 3 4 5 6 7 8 9 10 11)
……@@ -99,7 +99,7 @@
9999(cog-execute!
100100 (SetValue clnode (Predicate "*-write-*")
101101 (Section
102 (Predicate "vec_add")
102 (Item "vec_add")
103103 (ConnectorSeq
104104 (Number 0 0 0 0 0 0 0 0 0 0 0)
105105 (Number 1 2 3 4 5 6 7 8 9 10 11)
……@@ -108,6 +108,18 @@
108108; Get the result.
109109(cog-execute! (ValueOf clnode (Predicate "*-read-*")))
110110
111; ---------------------------------------------------------------
112; After the OpenclNode is opened, a list of kernel interfaces
113; provided by the OpenCL program there is published. It can be
114; viewed as follows:
115
116(cog-value clnode (Predicate "*-description-*"))
117
118; This interface description is used to check the validity of
119; kernel arguments used above. It is provided to enable the
120; introspection of the OpenCl program kernel API by Atomese
121; agents.
122
111123; ---------------------------------------------------------------
112124; Instead of using NumberNodes, use FloatValues.
113125; Both types can hold vectors of floats. NumberNodes are stored in
……@@ -145,7 +157,7 @@
145157(define vector-stream
146158 (SetValue clnode (Predicate "*-write-*")
147159 (Section
148 (Predicate "vec_add")
160 (Item "vec_add")
149161 (ConnectorSeq
150162 result-location
151163 first-vec-location