go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkOpenCLKernel.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright UMC Utrecht and contributors
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18#ifndef itkOpenCLKernel_h
19#define itkOpenCLKernel_h
20
21#include "itkOpenCL.h"
22#include "itkOpenCLGlobal.h"
23#include "itkOpenCLEvent.h"
24#include "itkOpenCLSize.h"
26#include "itkOpenCLSampler.h"
27#include "itkOpenCLVector.h"
28
29#include "itkIndex.h"
30#include "itkPoint.h"
31#include "itkVector.h"
32#include "itkCovariantVector.h"
33#include "itkMatrix.h"
34
35namespace itk
36{
110// Defines for macro injections to reduce spoil code
111#define OpenCLKernelSetArgMacroH(type) cl_int SetArg(const cl_uint index, const type value);
112
113#define OpenCLKernelSetArgMacroCXX(type) \
114 cl_int OpenCLKernel::SetArg(const cl_uint index, const type value) \
115 { \
116 return clSetKernelArg(this->m_KernelId, index, sizeof(value), (const void *)&value); \
117 }
118
119#define OpenCLKernelSetArgsMacroH(type0, type1, type2, type3, type4) \
120 OpenCLKernelSetArgMacroH(type0) OpenCLKernelSetArgMacroH(type1) OpenCLKernelSetArgMacroH(type2) \
121 OpenCLKernelSetArgMacroH(type3) OpenCLKernelSetArgMacroH(type4)
122
123#define OpenCLKernelSetArgsMacroCXX(type0, type1, type2, type3, type4) \
124 OpenCLKernelSetArgMacroCXX(type0) OpenCLKernelSetArgMacroCXX(type1) OpenCLKernelSetArgMacroCXX(type2) \
125 OpenCLKernelSetArgMacroCXX(type3) OpenCLKernelSetArgMacroCXX(type4)
126
127// Forward declaration
128class OpenCLContext;
129class OpenCLProgram;
130class OpenCLVectorBase;
131class OpenCLDevice;
132
133class OpenCLKernelPimpl; // OpenCLKernel private implementation idiom.
134
136{
137public:
140
143
147 OpenCLKernel(OpenCLContext * context, const cl_kernel id);
148
151
155
158 operator=(const OpenCLKernel & other);
159
161 bool
162 IsNull() const;
163
165 cl_kernel
166 GetKernelId() const;
167
170 GetContext() const;
171
174 GetProgram() const;
175
177 std::string
178 GetName() const;
179
182 std::size_t
184
192
200
203 void
205
211
215 void
217
220 void
222
225 void
227
233
240
247
254
261
265 GetBestLocalWorkSizeImage(const std::size_t dimension) const;
266
271 size_t
273
279 void
280 SetDoubleAsFloat(const bool value)
281 {
282 this->m_DoubleAsFloat = value;
283 }
284 void
286 {
287 this->m_DoubleAsFloat = true;
288 }
289 void
291 {
292 this->m_DoubleAsFloat = false;
293 }
294 bool
296 {
297 return this->m_DoubleAsFloat;
298 }
299
307 /*
308 template< typename T,
309 typename = typename std::enable_if<
310 std::is_scalar< T >::value || std::is_union< T >::value >::type >
311 cl_int SetArg( const cl_uint index, const T value )
312 {
313 return clSetKernelArg( this->m_KernelId, index,
314 sizeof( value ), (const void *)&value );
315 }
316 */
317
324 OpenCLKernelSetArgsMacroH(cl_uchar, cl_uchar2, cl_uchar4, cl_uchar8, cl_uchar16)
325 OpenCLKernelSetArgsMacroH(cl_char, cl_char2, cl_char4, cl_char8, cl_char16)
326 OpenCLKernelSetArgsMacroH(cl_ushort, cl_ushort2, cl_ushort4, cl_ushort8, cl_ushort16)
327 OpenCLKernelSetArgsMacroH(cl_short, cl_short2, cl_short4, cl_short8, cl_short16)
328 OpenCLKernelSetArgsMacroH(cl_uint, cl_uint2, cl_uint4, cl_uint8, cl_uint16)
329 OpenCLKernelSetArgsMacroH(cl_int, cl_int2, cl_int4, cl_int8, cl_int16)
330 OpenCLKernelSetArgsMacroH(cl_ulong, cl_ulong2, cl_ulong4, cl_ulong8, cl_ulong16)
331 OpenCLKernelSetArgsMacroH(cl_long, cl_long2, cl_long4, cl_long8, cl_long16)
332 OpenCLKernelSetArgsMacroH(cl_float, cl_float2, cl_float4, cl_float8, cl_float16)
333 OpenCLKernelSetArgsMacroH(cl_double, cl_double2, cl_double4, cl_double8, cl_double16)
334
336 cl_int SetArg(const cl_uint index, const void * data, const size_t size);
337
339 using Size1DType = Size<1>;
340 cl_int
341 SetArg(const cl_uint index, const Size1DType & value);
342
343 using Size2DType = Size<2>;
344 cl_int
345 SetArg(const cl_uint index, const Size2DType & value);
346
347 using Size3DType = Size<3>;
348 cl_int
349 SetArg(const cl_uint index, const Size3DType & value);
350
351 using Size4DType = Size<4>;
352 cl_int
353 SetArg(const cl_uint index, const Size4DType & value);
354
356 using Index1DType = Index<1>;
357 cl_int
358 SetArg(const cl_uint index, const Index1DType & value);
359
360 using Index2DType = Index<2>;
361 cl_int
362 SetArg(const cl_uint index, const Index2DType & value);
363
364 using Index3DType = Index<3>;
365 cl_int
366 SetArg(const cl_uint index, const Index3DType & value);
367
368 using Index4DType = Index<4>;
369 cl_int
370 SetArg(const cl_uint index, const Index4DType & value);
371
373 using Offset1DType = Offset<1>;
374 cl_int
375 SetArg(const cl_uint index, const Offset1DType & value);
376
377 using Offset2DType = Offset<2>;
378 cl_int
379 SetArg(const cl_uint index, const Offset2DType & value);
380
381 using Offset3DType = Offset<3>;
382 cl_int
383 SetArg(const cl_uint index, const Offset3DType & value);
384
385 using Offset4DType = Offset<4>;
386 cl_int
387 SetArg(const cl_uint index, const Offset4DType & value);
388
390 using PointInt1DType = Point<int, 1>;
391 cl_int
392 SetArg(const cl_uint index, const PointInt1DType & value);
393
394 using PointFloat1DType = Point<float, 1>;
395 cl_int
396 SetArg(const cl_uint index, const PointFloat1DType & value);
397
398 using PointDouble1DType = Point<double, 1>;
399 cl_int
400 SetArg(const cl_uint index, const PointDouble1DType & value);
401
402 using PointInt2DType = Point<int, 2>;
403 cl_int
404 SetArg(const cl_uint index, const PointInt2DType & value);
405
406 using PointFloat2DType = Point<float, 2>;
407 cl_int
408 SetArg(const cl_uint index, const PointFloat2DType & value);
409
410 using PointDouble2DType = Point<double, 2>;
411 cl_int
412 SetArg(const cl_uint index, const PointDouble2DType & value);
413
414 using PointInt3DType = Point<int, 3>;
415 cl_int
416 SetArg(const cl_uint index, const PointInt3DType & value);
417
418 using PointFloat3DType = Point<float, 3>;
419 cl_int
420 SetArg(const cl_uint index, const PointFloat3DType & value);
421
422 using PointDouble3DType = Point<double, 3>;
423 cl_int
424 SetArg(const cl_uint index, const PointDouble3DType & value);
425
426 using PointInt4DType = Point<int, 4>;
427 cl_int
428 SetArg(const cl_uint index, const PointInt4DType & value);
429
430 using PointFloat4DType = Point<float, 4>;
431 cl_int
432 SetArg(const cl_uint index, const PointFloat4DType & value);
433
434 using PointDouble4DType = Point<double, 4>;
435 cl_int
436 SetArg(const cl_uint index, const PointDouble4DType & value);
437
440 using VectorInt1DType = Vector<int, 1>;
441 cl_int
442 SetArg(const cl_uint index, const VectorInt1DType & value);
443
444 using VectorFloat1DType = Vector<float, 1>;
445 cl_int
446 SetArg(const cl_uint index, const VectorFloat1DType & value);
447
448 using VectorDouble1DType = Vector<double, 1>;
449 cl_int
450 SetArg(const cl_uint index, const VectorDouble1DType & value);
451
452 using VectorInt2DType = Vector<int, 2>;
453 cl_int
454 SetArg(const cl_uint index, const VectorInt2DType & value);
455
456 using VectorFloat2DType = Vector<float, 2>;
457 cl_int
458 SetArg(const cl_uint index, const VectorFloat2DType & value);
459
460 using VectorDouble2DType = Vector<double, 2>;
461 cl_int
462 SetArg(const cl_uint index, const VectorDouble2DType & value);
463
464 using VectorInt3DType = Vector<int, 3>;
465 cl_int
466 SetArg(const cl_uint index, const VectorInt3DType & value);
467
468 using VectorFloat3DType = Vector<float, 3>;
469 cl_int
470 SetArg(const cl_uint index, const VectorFloat3DType & value);
471
472 using VectorDouble3DType = Vector<double, 3>;
473 cl_int
474 SetArg(const cl_uint index, const VectorDouble3DType & value);
475
476 using VectorInt4DType = Vector<int, 4>;
477 cl_int
478 SetArg(const cl_uint index, const VectorInt4DType & value);
479
480 using VectorFloat4DType = Vector<float, 4>;
481 cl_int
482 SetArg(const cl_uint index, const VectorFloat4DType & value);
483
484 using VectorDouble4DType = Vector<double, 4>;
485 cl_int
486 SetArg(const cl_uint index, const VectorDouble4DType & value);
487
489 using CovariantVectorInt1DType = CovariantVector<int, 1>;
490 cl_int
491 SetArg(const cl_uint index, const CovariantVectorInt1DType & value);
492
493 using CovariantVectorFloat1DType = CovariantVector<float, 1>;
494 cl_int
495 SetArg(const cl_uint index, const CovariantVectorFloat1DType & value);
496
497 using CovariantVectorDouble1DType = CovariantVector<double, 1>;
498 cl_int
499 SetArg(const cl_uint index, const CovariantVectorDouble1DType & value);
500
501 using CovariantVectorInt2DType = CovariantVector<int, 2>;
502 cl_int
503 SetArg(const cl_uint index, const CovariantVectorInt2DType & value);
504
505 using CovariantVectorFloat2DType = CovariantVector<float, 2>;
506 cl_int
507 SetArg(const cl_uint index, const CovariantVectorFloat2DType & value);
508
509 using CovariantVectorDouble2DType = CovariantVector<double, 2>;
510 cl_int
511 SetArg(const cl_uint index, const CovariantVectorDouble2DType & value);
512
513 using CovariantVectorInt3DType = CovariantVector<int, 3>;
514 cl_int
515 SetArg(const cl_uint index, const CovariantVectorInt3DType & value);
516
517 using CovariantVectorFloat3DType = CovariantVector<float, 3>;
518 cl_int
519 SetArg(const cl_uint index, const CovariantVectorFloat3DType & value);
520
521 using CovariantVectorDouble3DType = CovariantVector<double, 3>;
522 cl_int
523 SetArg(const cl_uint index, const CovariantVectorDouble3DType & value);
524
525 using CovariantVectorInt4DType = CovariantVector<int, 4>;
526 cl_int
527 SetArg(const cl_uint index, const CovariantVectorInt4DType & value);
528
529 using CovariantVectorFloat4DType = CovariantVector<float, 4>;
530 cl_int
531 SetArg(const cl_uint index, const CovariantVectorFloat4DType & value);
532
533 using CovariantVectorDouble4DType = CovariantVector<double, 4>;
534 cl_int
535 SetArg(const cl_uint index, const CovariantVectorDouble4DType & value);
536
538 using MatrixFloat1x1Type = Matrix<float, 1, 1>;
539 cl_int
540 SetArg(const cl_uint index, const MatrixFloat1x1Type & value);
541
542 using MatrixDouble1x1Type = Matrix<double, 1, 1>;
543 cl_int
544 SetArg(const cl_uint index, const MatrixDouble1x1Type & value);
545
546 using MatrixFloat2x2Type = Matrix<float, 2, 2>;
547 cl_int
548 SetArg(const cl_uint index, const MatrixFloat2x2Type & value);
549
550 using MatrixDouble2x2Type = Matrix<double, 2, 2>;
551 cl_int
552 SetArg(const cl_uint index, const MatrixDouble2x2Type & value);
553
554 using MatrixFloat3x3Type = Matrix<float, 3, 3>;
555 cl_int
556 SetArg(const cl_uint index, const MatrixFloat3x3Type & value);
557
558 using MatrixDouble3x3Type = Matrix<double, 3, 3>;
559 cl_int
560 SetArg(const cl_uint index, const MatrixDouble3x3Type & value);
561
562 using MatrixFloat4x4Type = Matrix<float, 4, 4>;
563 cl_int
564 SetArg(const cl_uint index, const MatrixFloat4x4Type & value);
565
566 using MatrixDouble4x4Type = Matrix<double, 4, 4>;
567 cl_int
568 SetArg(const cl_uint index, const MatrixDouble4x4Type & value);
569
574 cl_int
575 SetArg(const cl_uint index, const OpenCLMemoryObject & value);
576
580 cl_int
581 SetArg(const cl_uint index, const OpenCLVectorBase & value);
582
585 cl_int
586 SetArg(const cl_uint index, const OpenCLSampler & value);
587
595 LaunchKernel();
596
598 LaunchKernel(const OpenCLSize & global_work_size,
599 const OpenCLSize & local_work_size = OpenCLSize::null,
600 const OpenCLSize & global_work_offset = OpenCLSize::null);
601
610 LaunchKernel(const OpenCLEventList & event_list);
611
613 LaunchKernel(const OpenCLEventList & event_list,
614 const OpenCLSize & global_work_size,
615 const OpenCLSize & local_work_size = OpenCLSize::null,
616 const OpenCLSize & global_work_offset = OpenCLSize::null);
617
623 bool
624 LaunchTask(const OpenCLEventList & event_list);
625
633 LaunchTaskAsync(const OpenCLEventList & event_list);
634
638 inline OpenCLEvent
639 operator()()
640 {
641 return this->LaunchKernel();
642 }
643
647 template <typename T1>
648 inline OpenCLEvent
649 operator()(const T1 & arg1)
650 {
651 this->SetArg(0, arg1);
652 return this->LaunchKernel();
653 }
654
655
659 template <typename T1, typename T2>
660 inline OpenCLEvent
661 operator()(const T1 & arg1, const T2 & arg2)
662 {
663 this->SetArg(0, arg1);
664 this->SetArg(1, arg2);
665 return this->LaunchKernel();
666 }
667
668
672 template <typename T1, typename T2, typename T3>
673 inline OpenCLEvent
674 operator()(const T1 & arg1, const T2 & arg2, const T3 & arg3)
675 {
676 this->SetArg(0, arg1);
677 this->SetArg(1, arg2);
678 this->SetArg(2, arg3);
679 return this->LaunchKernel();
680 }
681
682
686 template <typename T1, typename T2, typename T3, typename T4>
687 inline OpenCLEvent
688 operator()(const T1 & arg1, const T2 & arg2, const T3 & arg3, const T4 & arg4)
689 {
690 this->SetArg(0, arg1);
691 this->SetArg(1, arg2);
692 this->SetArg(2, arg3);
693 this->SetArg(3, arg4);
694 return this->LaunchKernel();
695 }
696
697
701 template <typename T1, typename T2, typename T3, typename T4, typename T5>
702 inline OpenCLEvent
703 operator()(const T1 & arg1, const T2 & arg2, const T3 & arg3, const T4 & arg4, const T5 & arg5)
704 {
705 this->SetArg(0, arg1);
706 this->SetArg(1, arg2);
707 this->SetArg(2, arg3);
708 this->SetArg(3, arg4);
709 this->SetArg(4, arg5);
710 return this->LaunchKernel();
711 }
712
713
717 template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
718 inline OpenCLEvent
719 operator()(const T1 & arg1, const T2 & arg2, const T3 & arg3, const T4 & arg4, const T5 & arg5, const T6 & arg6)
720 {
721 this->SetArg(0, arg1);
722 this->SetArg(1, arg2);
723 this->SetArg(2, arg3);
724 this->SetArg(3, arg4);
725 this->SetArg(4, arg5);
726 this->SetArg(5, arg6);
727 return this->LaunchKernel();
728 }
729
730
734 template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>
735 inline OpenCLEvent
736 operator()(const T1 & arg1,
737 const T2 & arg2,
738 const T3 & arg3,
739 const T4 & arg4,
740 const T5 & arg5,
741 const T6 & arg6,
742 const T7 & arg7)
743 {
744 this->SetArg(0, arg1);
745 this->SetArg(1, arg2);
746 this->SetArg(2, arg3);
747 this->SetArg(3, arg4);
748 this->SetArg(4, arg5);
749 this->SetArg(5, arg6);
750 this->SetArg(6, arg7);
751 return this->LaunchKernel();
752 }
753
754
758 template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8>
759 inline OpenCLEvent
760 operator()(const T1 & arg1,
761 const T2 & arg2,
762 const T3 & arg3,
763 const T4 & arg4,
764 const T5 & arg5,
765 const T6 & arg6,
766 const T7 & arg7,
767 const T8 & arg8)
768 {
769 this->SetArg(0, arg1);
770 this->SetArg(1, arg2);
771 this->SetArg(2, arg3);
772 this->SetArg(3, arg4);
773 this->SetArg(4, arg5);
774 this->SetArg(5, arg6);
775 this->SetArg(6, arg7);
776 this->SetArg(7, arg8);
777 return this->LaunchKernel();
778 }
779
780
785 template <typename T1,
786 typename T2,
787 typename T3,
788 typename T4,
789 typename T5,
790 typename T6,
791 typename T7,
792 typename T8,
793 typename T9>
794 inline OpenCLEvent
795 operator()(const T1 & arg1,
796 const T2 & arg2,
797 const T3 & arg3,
798 const T4 & arg4,
799 const T5 & arg5,
800 const T6 & arg6,
801 const T7 & arg7,
802 const T8 & arg8,
803 const T9 & arg9)
804 {
805 this->SetArg(0, arg1);
806 this->SetArg(1, arg2);
807 this->SetArg(2, arg3);
808 this->SetArg(3, arg4);
809 this->SetArg(4, arg5);
810 this->SetArg(5, arg6);
811 this->SetArg(6, arg7);
812 this->SetArg(7, arg8);
813 this->SetArg(8, arg9);
814 return this->LaunchKernel();
815 }
816
817
822 template <typename T1,
823 typename T2,
824 typename T3,
825 typename T4,
826 typename T5,
827 typename T6,
828 typename T7,
829 typename T8,
830 typename T9,
831 typename T10>
832 inline OpenCLEvent
833 operator()(const T1 & arg1,
834 const T2 & arg2,
835 const T3 & arg3,
836 const T4 & arg4,
837 const T5 & arg5,
838 const T6 & arg6,
839 const T7 & arg7,
840 const T8 & arg8,
841 const T9 & arg9,
842 const T10 & arg10)
843 {
844 this->SetArg(0, arg1);
845 this->SetArg(1, arg2);
846 this->SetArg(2, arg3);
847 this->SetArg(3, arg4);
848 this->SetArg(4, arg5);
849 this->SetArg(5, arg6);
850 this->SetArg(6, arg7);
851 this->SetArg(7, arg8);
852 this->SetArg(8, arg9);
853 this->SetArg(9, arg10);
854 return this->LaunchKernel();
855 }
856
857
858private:
859 std::unique_ptr<OpenCLKernelPimpl> d_ptr;
860 cl_kernel m_KernelId;
862
864};
865
870 operator==(const OpenCLKernel & lhs, const OpenCLKernel & rhs);
871
876 operator!=(const OpenCLKernel & lhs, const OpenCLKernel & rhs);
877
879template <typename charT, typename traits>
880inline std::basic_ostream<charT, traits> &
881operator<<(std::basic_ostream<charT, traits> & strm, const OpenCLKernel & kernel)
882{
883 if (kernel.IsNull())
884 {
885 strm << "OpenCLKernel(null)";
886 return strm;
887 }
888
889 const char indent = ' ';
890
891 strm << "OpenCLKernel\n"
892 << indent << "Id: " << kernel.GetKernelId() << '\n'
893 << indent << "Name: " << kernel.GetName() << '\n'
894 << indent << "Number of arguments: " << kernel.GetNumberOfArguments() << '\n'
895 << indent << "Global work size: " << kernel.GetGlobalWorkSize() << '\n'
896 << indent << "Local work size: " << kernel.GetLocalWorkSize() << '\n'
897 << indent << "Global work offset: " << kernel.GetGlobalWorkOffset() << '\n'
898 << indent << "Compile work group size: " << kernel.GetCompileWorkGroupSize() << '\n'
899 << indent << "Best local work size image 2D: " << kernel.GetBestLocalWorkSizeImage2D() << '\n'
900 << indent << "Best local work size image 3D: " << kernel.GetBestLocalWorkSizeImage3D() << '\n'
901 << indent << "Preferred work size multiple: " << kernel.GetPreferredWorkSizeMultiple() << std::endl;
902
903 return strm;
904}
905
906
907} // end namespace itk
908
909#endif /* itkOpenCLKernel_h */
The OpenCLContext class represents an OpenCL context.
The OpenCLDevice class represents the collection of OpenCL devices to be used by the host.
OpenCLEventList class represents a list of OpenCLEvent objects.
OpenCLEvent class represents an OpenCL event object.
The OpenCLKernel class represents an executable entry point function in an OpenCL program.
Matrix< double, 3, 3 > MatrixDouble3x3Type
Point< int, 1 > PointInt1DType
Point< int, 2 > PointInt2DType
Vector< int, 3 > VectorInt3DType
OpenCLSize GetBestLocalWorkSizeImage3D() const
void SetGlobalWorkSize(const OpenCLSize &size)
Matrix< float, 4, 4 > MatrixFloat4x4Type
bool IsNull() const
void SetRoundedGlobalWorkSize(const OpenCLSize &size)
void SetDoubleAsFloat(const bool value)
OpenCLEvent operator()(const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5, const T6 &arg6)
CovariantVector< double, 3 > CovariantVectorDouble3DType
Matrix< float, 2, 2 > MatrixFloat2x2Type
void SetLocalWorkSize(const OpenCLSize &size)
Vector< float, 2 > VectorFloat2DType
std::vcl_size_t GetNumberOfArguments() const
Vector< int, 2 > VectorInt2DType
Point< double, 2 > PointDouble2DType
OpenCLSize GetBestLocalWorkSizeImage(const std::vcl_size_t dimension) const
Point< float, 4 > PointFloat4DType
CovariantVector< float, 4 > CovariantVectorFloat4DType
OpenCLEvent operator()(const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4)
OpenCLKernel & operator=(const OpenCLKernel &other)
CovariantVector< float, 3 > CovariantVectorFloat3DType
Vector< int, 1 > VectorInt1DType
CovariantVector< int, 3 > CovariantVectorInt3DType
OpenCLSize GetLocalWorkSize() const
OpenCLEvent operator()(const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5, const T6 &arg6, const T7 &arg7, const T8 &arg8, const T9 &arg9)
Index< 2 > Index2DType
OpenCLEvent operator()(const T1 &arg1, const T2 &arg2)
OpenCLEvent operator()(const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5)
Vector< double, 1 > VectorDouble1DType
OpenCLSize GetBestLocalWorkSizeImage2D() const
Point< double, 3 > PointDouble3DType
Index< 4 > Index4DType
void SetDoubleAsFloatDisable()
Offset< 2 > Offset2DType
Vector< int, 4 > VectorInt4DType
Matrix< float, 1, 1 > MatrixFloat1x1Type
Index< 3 > Index3DType
CovariantVector< float, 2 > CovariantVectorFloat2DType
CovariantVector< float, 1 > CovariantVectorFloat1DType
OpenCLSize GetGlobalWorkOffset() const
CovariantVector< double, 2 > CovariantVectorDouble2DType
OpenCLKernel(const OpenCLKernel &other)
CovariantVector< double, 1 > CovariantVectorDouble1DType
Point< double, 4 > PointDouble4DType
Offset< 1 > Offset1DType
OpenCLEvent operator()(const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5, const T6 &arg6, const T7 &arg7, const T8 &arg8, const T9 &arg9, const T10 &arg10)
Point< int, 4 > PointInt4DType
OpenCLEvent operator()(const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5, const T6 &arg6, const T7 &arg7)
OpenCLEvent operator()(const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5, const T6 &arg6, const T7 &arg7, const T8 &arg8)
Matrix< double, 1, 1 > MatrixDouble1x1Type
CovariantVector< int, 4 > CovariantVectorInt4DType
Offset< 4 > Offset4DType
OpenCLSize GetGlobalWorkSize() const
OpenCLKernelSetArgsMacroH(cl_uchar, cl_uchar2, cl_uchar4, cl_uchar8, cl_uchar16) OpenCLKernelSetArgsMacroH(cl_char
Vector< double, 3 > VectorDouble3DType
vcl_size_t GetPreferredWorkSizeMultiple() const
Point< float, 2 > PointFloat2DType
void SetGlobalWorkOffset(const OpenCLSize &offset)
OpenCLSize GetCompileWorkGroupSize() const
Vector< double, 2 > VectorDouble2DType
OpenCLProgram GetProgram() const
OpenCLEvent operator()(const T1 &arg1, const T2 &arg2, const T3 &arg3)
Index< 1 > Index1DType
Point< double, 1 > PointDouble1DType
bool GetDoubleAsFloatEnabled()
OpenCLKernel(OpenCLContext *context, const cl_kernel id)
OpenCLSize GetCompileWorkGroupSize(const OpenCLDevice &device) const
Point< float, 3 > PointFloat3DType
Vector< float, 3 > VectorFloat3DType
Vector< double, 4 > VectorDouble4DType
std::unique_ptr< OpenCLKernelPimpl > d_ptr
OpenCLContext * GetContext() const
OpenCLEvent operator()(const T1 &arg1)
Point< int, 3 > PointInt3DType
std::string GetName() const
OpenCLSize GetBestLocalWorkSizeImage1D() const
Matrix< double, 4, 4 > MatrixDouble4x4Type
CovariantVector< int, 2 > CovariantVectorInt2DType
CovariantVector< double, 4 > CovariantVectorDouble4DType
cl_kernel GetKernelId() const
CovariantVector< int, 1 > CovariantVectorInt1DType
Point< float, 1 > PointFloat1DType
Vector< float, 4 > VectorFloat4DType
Matrix< float, 3, 3 > MatrixFloat3x3Type
Vector< float, 1 > VectorFloat1DType
Offset< 3 > Offset3DType
Matrix< double, 2, 2 > MatrixDouble2x2Type
The OpenCLMemoryObject class represents all common memory objects such as buffers and image objects.
The OpenCLProgram class represents an OpenCL program object.
The OpenCLSampler class represents an OpenCL sampler object.
The OpenCLSize class defines the size of an item of work for an OpenCL kernel.
Definition: itkOpenCLSize.h:50
The base class for the OpenCLVector implementation.
#define ITKOpenCL_EXPORT
#define ITK_OPENCL_DECLARE_PRIVATE(Class)
#define OpenCLKernelSetArgsMacroH(type0, type1, type2, type3, type4)
bool ITKOpenCL_EXPORT operator==(const OpenCLCommandQueue &lhs, const OpenCLCommandQueue &rhs)
bool ITKOpenCL_EXPORT operator!=(const OpenCLCommandQueue &lhs, const OpenCLCommandQueue &rhs)
std::basic_ostream< charT, traits > & operator<<(std::basic_ostream< charT, traits > &strm, const OpenCLCommandQueue &queue)


Generated on 2023-01-13 for elastix by doxygen 1.9.6 elastix logo