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

Comparing OpenCL/OpenCL.pm (file contents):
Revision 1.60 by root, Wed Apr 25 21:48:44 2012 UTC vs.
Revision 1.61 by root, Sat Apr 28 13:31:40 2012 UTC

537=item $int = OpenCL::errno 537=item $int = OpenCL::errno
538 538
539The last error returned by a function - it's only valid after an error occured 539The last error returned by a function - it's only valid after an error occured
540and before calling another OpenCL function. 540and before calling another OpenCL function.
541 541
542=item $str = OpenCL::err2str $errval 542=item $str = OpenCL::err2str [$errval]
543 543
544Comverts an error value into a human readable string. 544Converts an error value into a human readable string. IF no error value is
545given, then the last error will be used (as returned by OpenCL::errno).
545 546
546=item $str = OpenCL::enum2str $enum 547=item $str = OpenCL::enum2str $enum
547 548
548Converts most enum values (of parameter names, image format constants, 549Converts most enum values (of parameter names, image format constants,
549object types, addressing and filter modes, command types etc.) into a 550object types, addressing and filter modes, command types etc.) into a
1007 require Carp; 1008 require Carp;
1008 1009
1009 $prog = $self->program_with_source ($prog) 1010 $prog = $self->program_with_source ($prog)
1010 unless ref $prog; 1011 unless ref $prog;
1011 1012
1012 # we build separately per device so we instantly know which one failed 1013 eval { $prog->build (undef, $options); 1 }
1014 or errno == BUILD_PROGRAM_FAILURE
1015 or Carp::croak "OpenCL::Context->build_program: " . err2str;
1016
1017 # we check status for all devices
1013 for my $dev ($self->devices) { 1018 for my $dev ($self->devices) {
1014 eval { $prog->build ([$dev], $options); 1 } 1019 $prog->build_status ($dev) == BUILD_SUCCESS
1015 or Carp::croak ("Building OpenCL program for device '" . $dev->name . "' failed:\n" 1020 or Carp::croak ("Building OpenCL program for device '" . $dev->name . "' failed:\n"
1016 . $prog->build_log ($dev)); 1021 . $prog->build_log ($dev));
1017 } 1022 }
1018 1023
1019 $prog 1024 $prog

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines