… | |
… | |
121 | $extra_perl_args = ' ($device)'; |
121 | $extra_perl_args = ' ($device)'; |
122 | $extra_xs_args = ', OpenCL::Device device'; |
122 | $extra_xs_args = ', OpenCL::Device device'; |
123 | } |
123 | } |
124 | |
124 | |
125 | my $dynamic; |
125 | my $dynamic; |
126 | my $nelem = "size / sizeof (value [0])"; |
126 | my $nelem = "size / sizeof (*value)"; |
127 | |
127 | |
128 | if ($ctype eq "STRING_CLASS") { |
128 | if ($ctype eq "STRING_CLASS") { |
129 | $ctype = "VECTOR_CLASS<char>"; |
129 | $ctype = "VECTOR_CLASS<char>"; |
130 | $nelem = "1"; |
130 | $nelem = "1"; |
131 | $dynamic = 1; |
131 | $dynamic = 1; |
… | |
… | |
151 | $perltype = "\@${perltype}s"; |
151 | $perltype = "\@${perltype}s"; |
152 | } else { |
152 | } else { |
153 | $perltype = "\$$perltype"; |
153 | $perltype = "\$$perltype"; |
154 | } |
154 | } |
155 | |
155 | |
156 | $POD .= "\n=item $perltype = \$$real_class->$perl_name$extra_perl_args\n\nCalls C<clGet${cbase}Info> with C<$name> and returns the result(s).\n"; |
156 | $POD .= "=item $perltype = \$$real_class->$perl_name$extra_perl_args\n\nCalls C<clGet${cbase}Info> with C<$name> and returns the result(s).\n\n"; |
157 | |
157 | |
158 | $XS .= "void\n" |
158 | $XS .= "void\n" |
159 | . "$perl_name (OpenCL::$classmap{$real_class} this$extra_xs_args)\n" |
159 | . "$perl_name (OpenCL::$classmap{$real_class} this$extra_xs_args)\n" |
160 | . " PPCODE:\n"; |
160 | . " PPCODE:\n"; |
161 | |
161 | |
… | |
… | |
192 | } |
192 | } |
193 | |
193 | |
194 | $XS .= "\n"; |
194 | $XS .= "\n"; |
195 | } |
195 | } |
196 | |
196 | |
197 | print $XS; |
|
|
198 | |
|
|
199 | patch "OpenCL.xs", "#BEGIN:$CLASS" , "#END:$CLASS" , $XS; |
197 | patch "OpenCL.xs", "#BEGIN:$CLASS" , "#END:$CLASS" , $XS; |
200 | patch "OpenCL.pm", "=for gengetinfo begin $CLASS", "=for gengetinfo end $CLASS", "$POD\n"; |
198 | patch "OpenCL.pm", "=for gengetinfo begin $CLASS", "=for gengetinfo end $CLASS", $POD; |
201 | } |
199 | } |
202 | |
200 | |