Hi Ingo, Thank you for the inspirational work you did on it! There’s a reason you’re on there as the “AUTHOR” :-)
After your question, I’ve been thinking about whether OpenCV provides a way to get GPU processing for PDL. After checking the relatively-new OpenCV “transparent API” (which has a UMat class which is a deliberately-close analogue of Mat), the instant answer is “not really - yet”. The reason is that while a Mat (a CPU thing) can take a data pointer, a UMat can’t – not even a GPU handle (though it can return one, that’s not useful by itself for our purposes). A partial design for a way forward would be for the “struct pdl” to have support for other allocators/deallocators for data, to give different semantic meanings to the “data” pointer. That would then allow the current CPU scheme (with its Perl specifics) to become just one (albeit the default); we could make an OpenCV one (that could be a UMat), and in due course even a native PDL GPU one (albeit that would probably use OpenCL and crib heavily from how OpenCV uses it). Basically, this would be the main part of the “pdl_impl_vtable” stuff mentioned in https://github.com/PDLPorters/pdl/issues/358. Best regards, Ed From: Ingo Schmid<mailto:ingo...@gmx.at> Sent: 27 March 2023 10:31 To: pdl-devel@lists.sourceforge.net<mailto:pdl-devel@lists.sourceforge.net> Subject: Re: [Pdl-devel] PDL::OpenCV 0.001 released Hi Ed, thank you so much for picking up that hack of mine and creating a full binding to OpenCV from there! I think that could be an easier route to include GPU processing for pdl? But this is a guess from someone who has never actually used it. Ingo On 3/26/23 08:50, Ed . wrote: Dear PDL folks, PDL::OpenCV 0.001 has just been released. Notable changes since never: 1. It supports modules highgui, imgcodecs, imgproc, objdetect, tracking, videoio 2. Where possible, all inputs and outputs are ndarrays which get wrapped into Mat, Rect, std::vector<int>, etc internally 3. In particular, it supports just about every class and function within those modules that are supported by the Python binding 4. There is a simplistic translation of the Doxygen docs into POD, see on MetaCPAN: https://metacpan.org/dist/PDL-OpenCV 5. It includes a perldl demo which shows off basic image-processing stuff (“demo opencv”) Future plans, in something like intended order: 1. Support the “Params” classes (possibly from Perl-land as a hash-ref) 2. Support more of the modules, both in the main OpenCV distribution and the “contrib” ones The IRC channel (#pdl on irc.perl.org) is a great virtual place to come and ask questions, or just watch the GitHub messages flow by. As usual, please give the new release a try and report problems. Best regards, Ed _______________________________________________ pdl-devel mailing list pdl-devel@lists.sourceforge.net<mailto:pdl-devel@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/pdl-devel
_______________________________________________ pdl-devel mailing list pdl-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pdl-devel