| … | … | @@ -59,7 +59,7 @@ |
| 59 | 59 | (SetValue clnode (Predicate "*-write-*") |
| 60 | 60 | (Section |
| 61 | 61 | ; Must be name of kernel defined inside of the clnode. |
| 62 | | (Predicate "vec_mult") |
| 62 | (Item "vec_mult") |
| 63 | 63 | (ConnectorSeq |
| 64 | 64 | (Number 0 0 0 0 0) |
| 65 | 65 | (Number 1 2 3 4 5) |
| … | … | @@ -84,7 +84,7 @@ |
| 84 | 84 | (cog-execute! |
| 85 | 85 | (SetValue clnode (Predicate "*-write-*") |
| 86 | 86 | (Section |
| 87 | | (Predicate "vec_mult") |
| 87 | (Item "vec_mult") |
| 88 | 88 | (ConnectorSeq |
| 89 | 89 | (Number 0 0 0 0 0 0 0 0 0 0 0) |
| 90 | 90 | (Number 1 2 3 4 5 6 7 8 9 10 11) |
| … | … | @@ -99,7 +99,7 @@ |
| 99 | 99 | (cog-execute! |
| 100 | 100 | (SetValue clnode (Predicate "*-write-*") |
| 101 | 101 | (Section |
| 102 | | (Predicate "vec_add") |
| 102 | (Item "vec_add") |
| 103 | 103 | (ConnectorSeq |
| 104 | 104 | (Number 0 0 0 0 0 0 0 0 0 0 0) |
| 105 | 105 | (Number 1 2 3 4 5 6 7 8 9 10 11) |
| … | … | @@ -108,6 +108,18 @@ |
| 108 | 108 | ; Get the result. |
| 109 | 109 | (cog-execute! (ValueOf clnode (Predicate "*-read-*"))) |
| 110 | 110 | |
| 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 | |
| 111 | 123 | ; --------------------------------------------------------------- |
| 112 | 124 | ; Instead of using NumberNodes, use FloatValues. |
| 113 | 125 | ; Both types can hold vectors of floats. NumberNodes are stored in |
| … | … | @@ -145,7 +157,7 @@ |
| 145 | 157 | (define vector-stream |
| 146 | 158 | (SetValue clnode (Predicate "*-write-*") |
| 147 | 159 | (Section |
| 148 | | (Predicate "vec_add") |
| 160 | (Item "vec_add") |
| 149 | 161 | (ConnectorSeq |
| 150 | 162 | result-location |
| 151 | 163 | first-vec-location |