ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/OpenCL/gengetinfo
(Generate patch)

Comparing OpenCL/gengetinfo (file contents):
Revision 1.12 by root, Tue May 1 16:37:23 2012 UTC vs.
Revision 1.15 by root, Fri May 4 14:49:42 2012 UTC

18 sampler Sampler 18 sampler Sampler
19 program Program 19 program Program
20 program_build Program 20 program_build Program
21 kernel Kernel 21 kernel Kernel
22 kernel_work_group Kernel 22 kernel_work_group Kernel
23 kernel_arg_info Kernel
23 command_queue Queue 24 command_queue Queue
24); 25);
25 26
26my %typemap = ( 27my %typemap = (
27 cl_bool => ['cl_bool', 'value [i] ? &PL_sv_yes : &PL_sv_no', 'boolean'], 28 cl_bool => ['cl_bool', 'value [i] ? &PL_sv_yes : &PL_sv_no', 'boolean'],
123 $extra_args = ', device'; 124 $extra_args = ', device';
124 $extra_perl_args = ' ($device)'; 125 $extra_perl_args = ' ($device)';
125 $extra_xs_args = ', OpenCL::Device device'; 126 $extra_xs_args = ', OpenCL::Device device';
126 } 127 }
127 128
129 if ($CLASS eq "kernel_arg") {
130 $extra_args = ', idx';
131 $extra_perl_args = ' ($idx)';
132 $extra_xs_args = ', cl_uint idx';
133 }
134
128 my $dynamic; 135 my $dynamic;
129 my $nelem = "size / sizeof (*value)"; 136 my $nelem = "size / sizeof (*value)";
130 137
131 if ($ctype eq "STRING_CLASS") { 138 if ($ctype eq "STRING_CLASS") {
132 $ctype = "VECTOR_CLASS<char>"; 139 $ctype = "VECTOR_CLASS<char>";
154 $perltype = "\@${perltype}s"; 161 $perltype = "\@${perltype}s";
155 } else { 162 } else {
156 $perltype = "\$$perltype"; 163 $perltype = "\$$perltype";
157 } 164 }
158 165
166 (my $perlenum = $name) =~ s/^CL_/OpenCL::/ or die;
167
159 $POD .= "=item $perltype = \$$real_class->$perl_name$extra_perl_args\n\nCalls C<clGet${cbase}Info> with C<$name> and returns the result.\n\n"; 168 $POD .= "=item $perltype = \$$real_class->$perl_name$extra_perl_args\n\nCalls C<clGet${cbase}Info> with C<$perlenum> and returns the result.\n\n";
160 169
161 # XS1 contains the function before ALIAS, XS2 the function afterwards (the body) 170 # XS1 contains the function before ALIAS, XS2 the function afterwards (the body)
162 # after we generate the bdoy we look for an identical body generated earlier 171 # after we generate the bdoy we look for an identical body generated earlier
163 # and simply alias us to the earlier xs function, to save text size. 172 # and simply alias us to the earlier xs function, to save text size.
164 my ($XS1, $XS2); 173 my ($XS1, $XS2);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines