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 ) \
112 cl_int SetArg( const cl_uint index, const type value ); \
113
114#define OpenCLKernelSetArgMacroCXX( type ) \
115 cl_int OpenCLKernel::SetArg( const cl_uint index, const type value ) \
116 { \
117 return clSetKernelArg( this->m_KernelId, index, sizeof( value ), (const void *)&value ); \
118 } \
119
120#define OpenCLKernelSetArgsMacroH( type0, type1, type2, type3, type4 ) \
121 OpenCLKernelSetArgMacroH( type0 ) OpenCLKernelSetArgMacroH( type1 ) \
122 OpenCLKernelSetArgMacroH( type2 ) OpenCLKernelSetArgMacroH( type3 ) \
123 OpenCLKernelSetArgMacroH( type4 ) \
124
125#define OpenCLKernelSetArgsMacroCXX( type0, type1, type2, type3, type4 ) \
126 OpenCLKernelSetArgMacroCXX( type0 ) OpenCLKernelSetArgMacroCXX( type1 ) \
127 OpenCLKernelSetArgMacroCXX( type2 ) OpenCLKernelSetArgMacroCXX( type3 ) \
128 OpenCLKernelSetArgMacroCXX( type4 ) \
129
130// Forward declaration
131class OpenCLContext;
132class OpenCLProgram;
133class OpenCLVectorBase;
134class OpenCLDevice;
135
136class OpenCLKernelPimpl; // OpenCLKernel private implementation idiom.
137
139{
140public:
141
144
147
151 OpenCLKernel( OpenCLContext * context, const cl_kernel id );
152
154 OpenCLKernel( const OpenCLKernel & other );
155
159
162
164 bool IsNull() const;
165
167 cl_kernel GetKernelId() const;
168
171
174
176 std::string GetName() const;
177
180 std::size_t GetNumberOfArguments() const;
181
188
195
198 void SetGlobalWorkSize( const OpenCLSize & size );
199
204
209
212 void SetLocalWorkSize( const OpenCLSize & size );
213
216 void SetGlobalWorkOffset( const OpenCLSize & offset );
217
222
228
234
240
246
249 OpenCLSize GetBestLocalWorkSizeImage( const std::size_t dimension ) const;
250
256
262 void SetDoubleAsFloat( const bool value ) { this->m_DoubleAsFloat = value; }
263 void SetDoubleAsFloatEnable() { this->m_DoubleAsFloat = true; }
264 void SetDoubleAsFloatDisable() { this->m_DoubleAsFloat = false; }
265 bool GetDoubleAsFloatEnabled() { return this->m_DoubleAsFloat; }
266
274 /*
275 template< typename T,
276 typename = typename std::enable_if<
277 std::is_scalar< T >::value || std::is_union< T >::value >::type >
278 cl_int SetArg( const cl_uint index, const T value )
279 {
280 return clSetKernelArg( this->m_KernelId, index,
281 sizeof( value ), (const void *)&value );
282 }
283 */
284
291 OpenCLKernelSetArgsMacroH( cl_uchar, cl_uchar2, cl_uchar4, cl_uchar8, cl_uchar16 )
292 OpenCLKernelSetArgsMacroH( cl_char, cl_char2, cl_char4, cl_char8, cl_char16 )
293 OpenCLKernelSetArgsMacroH( cl_ushort, cl_ushort2, cl_ushort4, cl_ushort8, cl_ushort16 )
294 OpenCLKernelSetArgsMacroH( cl_short, cl_short2, cl_short4, cl_short8, cl_short16 )
295 OpenCLKernelSetArgsMacroH( cl_uint, cl_uint2, cl_uint4, cl_uint8, cl_uint16 )
296 OpenCLKernelSetArgsMacroH( cl_int, cl_int2, cl_int4, cl_int8, cl_int16 )
297 OpenCLKernelSetArgsMacroH( cl_ulong, cl_ulong2, cl_ulong4, cl_ulong8, cl_ulong16 )
298 OpenCLKernelSetArgsMacroH( cl_long, cl_long2, cl_long4, cl_long8, cl_long16 )
299 OpenCLKernelSetArgsMacroH( cl_float, cl_float2, cl_float4, cl_float8, cl_float16 )
300 OpenCLKernelSetArgsMacroH( cl_double, cl_double2, cl_double4, cl_double8, cl_double16 )
301
303 cl_int SetArg( const cl_uint index, const void * data, const size_t size );
304
306 typedef Size< 1 > Size1DType;
307 cl_int SetArg( const cl_uint index, const Size1DType & value );
308
309 typedef Size< 2 > Size2DType;
310 cl_int SetArg( const cl_uint index, const Size2DType & value );
311
312 typedef Size< 3 > Size3DType;
313 cl_int SetArg( const cl_uint index, const Size3DType & value );
314
315 typedef Size< 4 > Size4DType;
316 cl_int SetArg( const cl_uint index, const Size4DType & value );
317
319 typedef Index< 1 > Index1DType;
320 cl_int SetArg( const cl_uint index, const Index1DType & value );
321
322 typedef Index< 2 > Index2DType;
323 cl_int SetArg( const cl_uint index, const Index2DType & value );
324
325 typedef Index< 3 > Index3DType;
326 cl_int SetArg( const cl_uint index, const Index3DType & value );
327
328 typedef Index< 4 > Index4DType;
329 cl_int SetArg( const cl_uint index, const Index4DType & value );
330
332 typedef Offset< 1 > Offset1DType;
333 cl_int SetArg( const cl_uint index, const Offset1DType & value );
334
335 typedef Offset< 2 > Offset2DType;
336 cl_int SetArg( const cl_uint index, const Offset2DType & value );
337
338 typedef Offset< 3 > Offset3DType;
339 cl_int SetArg( const cl_uint index, const Offset3DType & value );
340
341 typedef Offset< 4 > Offset4DType;
342 cl_int SetArg( const cl_uint index, const Offset4DType & value );
343
345 typedef Point< int, 1 > PointInt1DType;
346 cl_int SetArg( const cl_uint index, const PointInt1DType & value );
347
348 typedef Point< float, 1 > PointFloat1DType;
349 cl_int SetArg( const cl_uint index, const PointFloat1DType & value );
350
351 typedef Point< double, 1 > PointDouble1DType;
352 cl_int SetArg( const cl_uint index, const PointDouble1DType & value );
353
354 typedef Point< int, 2 > PointInt2DType;
355 cl_int SetArg( const cl_uint index, const PointInt2DType & value );
356
357 typedef Point< float, 2 > PointFloat2DType;
358 cl_int SetArg( const cl_uint index, const PointFloat2DType & value );
359
360 typedef Point< double, 2 > PointDouble2DType;
361 cl_int SetArg( const cl_uint index, const PointDouble2DType & value );
362
363 typedef Point< int, 3 > PointInt3DType;
364 cl_int SetArg( const cl_uint index, const PointInt3DType & value );
365
366 typedef Point< float, 3 > PointFloat3DType;
367 cl_int SetArg( const cl_uint index, const PointFloat3DType & value );
368
369 typedef Point< double, 3 > PointDouble3DType;
370 cl_int SetArg( const cl_uint index, const PointDouble3DType & value );
371
372 typedef Point< int, 4 > PointInt4DType;
373 cl_int SetArg( const cl_uint index, const PointInt4DType & value );
374
375 typedef Point< float, 4 > PointFloat4DType;
376 cl_int SetArg( const cl_uint index, const PointFloat4DType & value );
377
378 typedef Point< double, 4 > PointDouble4DType;
379 cl_int SetArg( const cl_uint index, const PointDouble4DType & value );
380
383 typedef Vector< int, 1 > VectorInt1DType;
384 cl_int SetArg( const cl_uint index, const VectorInt1DType & value );
385
386 typedef Vector< float, 1 > VectorFloat1DType;
387 cl_int SetArg( const cl_uint index, const VectorFloat1DType & value );
388
389 typedef Vector< double, 1 > VectorDouble1DType;
390 cl_int SetArg( const cl_uint index, const VectorDouble1DType & value );
391
392 typedef Vector< int, 2 > VectorInt2DType;
393 cl_int SetArg( const cl_uint index, const VectorInt2DType & value );
394
395 typedef Vector< float, 2 > VectorFloat2DType;
396 cl_int SetArg( const cl_uint index, const VectorFloat2DType & value );
397
398 typedef Vector< double, 2 > VectorDouble2DType;
399 cl_int SetArg( const cl_uint index, const VectorDouble2DType & value );
400
401 typedef Vector< int, 3 > VectorInt3DType;
402 cl_int SetArg( const cl_uint index, const VectorInt3DType & value );
403
404 typedef Vector< float, 3 > VectorFloat3DType;
405 cl_int SetArg( const cl_uint index, const VectorFloat3DType & value );
406
407 typedef Vector< double, 3 > VectorDouble3DType;
408 cl_int SetArg( const cl_uint index, const VectorDouble3DType & value );
409
410 typedef Vector< int, 4 > VectorInt4DType;
411 cl_int SetArg( const cl_uint index, const VectorInt4DType & value );
412
413 typedef Vector< float, 4 > VectorFloat4DType;
414 cl_int SetArg( const cl_uint index, const VectorFloat4DType & value );
415
416 typedef Vector< double, 4 > VectorDouble4DType;
417 cl_int SetArg( const cl_uint index, const VectorDouble4DType & value );
418
420 typedef CovariantVector< int, 1 > CovariantVectorInt1DType;
421 cl_int SetArg( const cl_uint index, const CovariantVectorInt1DType & value );
422
423 typedef CovariantVector< float, 1 > CovariantVectorFloat1DType;
424 cl_int SetArg( const cl_uint index, const CovariantVectorFloat1DType & value );
425
426 typedef CovariantVector< double, 1 > CovariantVectorDouble1DType;
427 cl_int SetArg( const cl_uint index, const CovariantVectorDouble1DType & value );
428
429 typedef CovariantVector< int, 2 > CovariantVectorInt2DType;
430 cl_int SetArg( const cl_uint index, const CovariantVectorInt2DType & value );
431
432 typedef CovariantVector< float, 2 > CovariantVectorFloat2DType;
433 cl_int SetArg( const cl_uint index, const CovariantVectorFloat2DType & value );
434
435 typedef CovariantVector< double, 2 > CovariantVectorDouble2DType;
436 cl_int SetArg( const cl_uint index, const CovariantVectorDouble2DType & value );
437
438 typedef CovariantVector< int, 3 > CovariantVectorInt3DType;
439 cl_int SetArg( const cl_uint index, const CovariantVectorInt3DType & value );
440
441 typedef CovariantVector< float, 3 > CovariantVectorFloat3DType;
442 cl_int SetArg( const cl_uint index, const CovariantVectorFloat3DType & value );
443
444 typedef CovariantVector< double, 3 > CovariantVectorDouble3DType;
445 cl_int SetArg( const cl_uint index, const CovariantVectorDouble3DType & value );
446
447 typedef CovariantVector< int, 4 > CovariantVectorInt4DType;
448 cl_int SetArg( const cl_uint index, const CovariantVectorInt4DType & value );
449
450 typedef CovariantVector< float, 4 > CovariantVectorFloat4DType;
451 cl_int SetArg( const cl_uint index, const CovariantVectorFloat4DType & value );
452
453 typedef CovariantVector< double, 4 > CovariantVectorDouble4DType;
454 cl_int SetArg( const cl_uint index, const CovariantVectorDouble4DType & value );
455
457 typedef Matrix< float, 1, 1 > MatrixFloat1x1Type;
458 cl_int SetArg( const cl_uint index, const MatrixFloat1x1Type & value );
459
460 typedef Matrix< double, 1, 1 > MatrixDouble1x1Type;
461 cl_int SetArg( const cl_uint index, const MatrixDouble1x1Type & value );
462
463 typedef Matrix< float, 2, 2 > MatrixFloat2x2Type;
464 cl_int SetArg( const cl_uint index, const MatrixFloat2x2Type & value );
465
466 typedef Matrix< double, 2, 2 > MatrixDouble2x2Type;
467 cl_int SetArg( const cl_uint index, const MatrixDouble2x2Type & value );
468
469 typedef Matrix< float, 3, 3 > MatrixFloat3x3Type;
470 cl_int SetArg( const cl_uint index, const MatrixFloat3x3Type & value );
471
472 typedef Matrix< double, 3, 3 > MatrixDouble3x3Type;
473 cl_int SetArg( const cl_uint index, const MatrixDouble3x3Type & value );
474
475 typedef Matrix< float, 4, 4 > MatrixFloat4x4Type;
476 cl_int SetArg( const cl_uint index, const MatrixFloat4x4Type & value );
477
478 typedef Matrix< double, 4, 4 > MatrixDouble4x4Type;
479 cl_int SetArg( const cl_uint index, const MatrixDouble4x4Type & value );
480
485 cl_int SetArg( const cl_uint index, const OpenCLMemoryObject & value );
486
490 cl_int SetArg( const cl_uint index, const OpenCLVectorBase & value );
491
494 cl_int SetArg( const cl_uint index, const OpenCLSampler & value );
495
502 OpenCLEvent LaunchKernel();
503
504 OpenCLEvent LaunchKernel( const OpenCLSize & global_work_size,
505 const OpenCLSize & local_work_size = OpenCLSize::null,
506 const OpenCLSize & global_work_offset = OpenCLSize::null );
507
515 OpenCLEvent LaunchKernel( const OpenCLEventList & event_list );
516
517 OpenCLEvent LaunchKernel( const OpenCLEventList & event_list,
518 const OpenCLSize & global_work_size,
519 const OpenCLSize & local_work_size = OpenCLSize::null,
520 const OpenCLSize & global_work_offset = OpenCLSize::null );
521
527 bool LaunchTask( const OpenCLEventList & event_list );
528
535 OpenCLEvent LaunchTaskAsync( const OpenCLEventList & event_list );
536
540 inline OpenCLEvent operator()() { return this->LaunchKernel(); }
541
545 template< typename T1 >
546 inline OpenCLEvent operator()( const T1 & arg1 )
547 {
548 this->SetArg( 0, arg1 );
549 return this->LaunchKernel();
550 }
551
552
556 template< typename T1, typename T2 >
557 inline OpenCLEvent operator()( const T1 & arg1, const T2 & arg2 )
558 {
559 this->SetArg( 0, arg1 );
560 this->SetArg( 1, arg2 );
561 return this->LaunchKernel();
562 }
563
564
568 template< typename T1, typename T2, typename T3 >
569 inline OpenCLEvent operator()
570 ( const T1 & arg1, const T2 & arg2, const T3 & arg3 )
571 {
572 this->SetArg( 0, arg1 );
573 this->SetArg( 1, arg2 );
574 this->SetArg( 2, arg3 );
575 return this->LaunchKernel();
576 }
577
578
582 template< typename T1, typename T2, typename T3, typename T4 >
583 inline OpenCLEvent operator()
584 ( const T1 & arg1, const T2 & arg2, const T3 & arg3, const T4 & arg4 )
585 {
586 this->SetArg( 0, arg1 );
587 this->SetArg( 1, arg2 );
588 this->SetArg( 2, arg3 );
589 this->SetArg( 3, arg4 );
590 return this->LaunchKernel();
591 }
592
593
597 template< typename T1, typename T2, typename T3, typename T4,
598 typename T5 >
599 inline OpenCLEvent operator()
600 ( const T1 & arg1, const T2 & arg2, const T3 & arg3, const T4 & arg4,
601 const T5 & arg5 )
602 {
603 this->SetArg( 0, arg1 );
604 this->SetArg( 1, arg2 );
605 this->SetArg( 2, arg3 );
606 this->SetArg( 3, arg4 );
607 this->SetArg( 4, arg5 );
608 return this->LaunchKernel();
609 }
610
611
615 template< typename T1, typename T2, typename T3, typename T4,
616 typename T5, typename T6 >
617 inline OpenCLEvent operator()
618 ( const T1 & arg1, const T2 & arg2, const T3 & arg3, const T4 & arg4,
619 const T5 & arg5, const T6 & arg6 )
620 {
621 this->SetArg( 0, arg1 );
622 this->SetArg( 1, arg2 );
623 this->SetArg( 2, arg3 );
624 this->SetArg( 3, arg4 );
625 this->SetArg( 4, arg5 );
626 this->SetArg( 5, arg6 );
627 return this->LaunchKernel();
628 }
629
630
634 template< typename T1, typename T2, typename T3, typename T4,
635 typename T5, typename T6, typename T7 >
636 inline OpenCLEvent operator()
637 ( const T1 & arg1, const T2 & arg2, const T3 & arg3, const T4 & arg4,
638 const T5 & arg5, const T6 & arg6, const T7 & arg7 )
639 {
640 this->SetArg( 0, arg1 );
641 this->SetArg( 1, arg2 );
642 this->SetArg( 2, arg3 );
643 this->SetArg( 3, arg4 );
644 this->SetArg( 4, arg5 );
645 this->SetArg( 5, arg6 );
646 this->SetArg( 6, arg7 );
647 return this->LaunchKernel();
648 }
649
650
654 template< typename T1, typename T2, typename T3, typename T4,
655 typename T5, typename T6, typename T7, typename T8 >
656 inline OpenCLEvent operator()
657 ( const T1 & arg1, const T2 & arg2, const T3 & arg3, const T4 & arg4,
658 const T5 & arg5, const T6 & arg6, const T7 & arg7, const T8 & arg8 )
659 {
660 this->SetArg( 0, arg1 );
661 this->SetArg( 1, arg2 );
662 this->SetArg( 2, arg3 );
663 this->SetArg( 3, arg4 );
664 this->SetArg( 4, arg5 );
665 this->SetArg( 5, arg6 );
666 this->SetArg( 6, arg7 );
667 this->SetArg( 7, arg8 );
668 return this->LaunchKernel();
669 }
670
671
676 template< typename T1, typename T2, typename T3, typename T4,
677 typename T5, typename T6, typename T7, typename T8,
678 typename T9 >
679 inline OpenCLEvent operator()
680 ( const T1 & arg1, const T2 & arg2, const T3 & arg3, const T4 & arg4,
681 const T5 & arg5, const T6 & arg6, const T7 & arg7, const T8 & arg8,
682 const T9 & arg9 )
683 {
684 this->SetArg( 0, arg1 );
685 this->SetArg( 1, arg2 );
686 this->SetArg( 2, arg3 );
687 this->SetArg( 3, arg4 );
688 this->SetArg( 4, arg5 );
689 this->SetArg( 5, arg6 );
690 this->SetArg( 6, arg7 );
691 this->SetArg( 7, arg8 );
692 this->SetArg( 8, arg9 );
693 return this->LaunchKernel();
694 }
695
696
701 template< typename T1, typename T2, typename T3, typename T4,
702 typename T5, typename T6, typename T7, typename T8,
703 typename T9, typename T10 >
704 inline OpenCLEvent operator()
705 ( const T1 & arg1, const T2 & arg2, const T3 & arg3, const T4 & arg4,
706 const T5 & arg5, const T6 & arg6, const T7 & arg7, const T8 & arg8,
707 const T9 & arg9, const T10 & arg10 )
708 {
709 this->SetArg( 0, arg1 );
710 this->SetArg( 1, arg2 );
711 this->SetArg( 2, arg3 );
712 this->SetArg( 3, arg4 );
713 this->SetArg( 4, arg5 );
714 this->SetArg( 5, arg6 );
715 this->SetArg( 6, arg7 );
716 this->SetArg( 7, arg8 );
717 this->SetArg( 8, arg9 );
718 this->SetArg( 9, arg10 );
719 return this->LaunchKernel();
720 }
721
722
723private:
724
725 std::unique_ptr< OpenCLKernelPimpl > d_ptr;
726 cl_kernel m_KernelId;
728
730};
731
735bool ITKOpenCL_EXPORT operator==( const OpenCLKernel & lhs, const OpenCLKernel & rhs );
736
740bool ITKOpenCL_EXPORT operator!=( const OpenCLKernel & lhs, const OpenCLKernel & rhs );
741
743template< typename charT, typename traits >
744inline
745std::basic_ostream< charT, traits > &
746operator<<( std::basic_ostream< charT, traits > & strm,
747 const OpenCLKernel & kernel )
748{
749 if( kernel.IsNull() )
750 {
751 strm << "OpenCLKernel(null)";
752 return strm;
753 }
754
755 const char indent = ' ';
756
757 strm << "OpenCLKernel" << std::endl
758 << indent << "Id: " << kernel.GetKernelId() << std::endl
759 << indent << "Name: " << kernel.GetName() << std::endl
760 << indent << "Number of arguments: " << kernel.GetNumberOfArguments() << std::endl
761 << indent << "Global work size: " << kernel.GetGlobalWorkSize() << std::endl
762 << indent << "Local work size: " << kernel.GetLocalWorkSize() << std::endl
763 << indent << "Global work offset: " << kernel.GetGlobalWorkOffset() << std::endl
764 << indent << "Compile work group size: " << kernel.GetCompileWorkGroupSize() << std::endl
765 << indent << "Best local work size image 2D: " << kernel.GetBestLocalWorkSizeImage2D() << std::endl
766 << indent << "Best local work size image 3D: " << kernel.GetBestLocalWorkSizeImage3D() << std::endl
767 << indent << "Preferred work size multiple: " << kernel.GetPreferredWorkSizeMultiple() << std::endl;
768
769 return strm;
770}
771
772
773} // end namespace itk
774
775#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, 1, 1 > MatrixDouble1x1Type
OpenCLSize GetBestLocalWorkSizeImage3D() const
void SetGlobalWorkSize(const OpenCLSize &size)
bool IsNull() const
void SetRoundedGlobalWorkSize(const OpenCLSize &size)
void SetDoubleAsFloat(const bool value)
Index< 3 > Index3DType
CovariantVector< double, 2 > CovariantVectorDouble2DType
CovariantVector< float, 3 > CovariantVectorFloat3DType
Point< double, 4 > PointDouble4DType
Vector< int, 4 > VectorInt4DType
void SetLocalWorkSize(const OpenCLSize &size)
Offset< 2 > Offset2DType
Vector< float, 4 > VectorFloat4DType
Index< 2 > Index2DType
Point< float, 3 > PointFloat3DType
std::vcl_size_t GetNumberOfArguments() const
OpenCLSize GetBestLocalWorkSizeImage(const std::vcl_size_t dimension) const
Matrix< double, 3, 3 > MatrixDouble3x3Type
Point< int, 2 > PointInt2DType
Vector< float, 3 > VectorFloat3DType
OpenCLKernel & operator=(const OpenCLKernel &other)
Point< int, 3 > PointInt3DType
OpenCLSize GetLocalWorkSize() const
Vector< int, 2 > VectorInt2DType
Matrix< float, 4, 4 > MatrixFloat4x4Type
std::unique_ptr< OpenCLKernelPimpl > d_ptr
OpenCLEvent operator()(const T1 &arg1, const T2 &arg2)
CovariantVector< double, 1 > CovariantVectorDouble1DType
Point< double, 2 > PointDouble2DType
OpenCLSize GetBestLocalWorkSizeImage2D() const
Offset< 4 > Offset4DType
Index< 1 > Index1DType
void SetDoubleAsFloatDisable()
Vector< int, 3 > VectorInt3DType
CovariantVector< float, 2 > CovariantVectorFloat2DType
OpenCLSize GetGlobalWorkOffset() const
Vector< double, 3 > VectorDouble3DType
Point< double, 3 > PointDouble3DType
CovariantVector< int, 1 > CovariantVectorInt1DType
OpenCLKernel(const OpenCLKernel &other)
Offset< 1 > Offset1DType
CovariantVector< double, 3 > CovariantVectorDouble3DType
Point< float, 2 > PointFloat2DType
CovariantVector< int, 4 > CovariantVectorInt4DType
Matrix< float, 2, 2 > MatrixFloat2x2Type
CovariantVector< float, 4 > CovariantVectorFloat4DType
Vector< float, 1 > VectorFloat1DType
CovariantVector< int, 2 > CovariantVectorInt2DType
Vector< int, 1 > VectorInt1DType
OpenCLSize GetGlobalWorkSize() const
OpenCLKernelSetArgsMacroH(cl_uchar, cl_uchar2, cl_uchar4, cl_uchar8, cl_uchar16) OpenCLKernelSetArgsMacroH(cl_char
vcl_size_t GetPreferredWorkSizeMultiple() const
void SetGlobalWorkOffset(const OpenCLSize &offset)
Index< 4 > Index4DType
OpenCLSize GetCompileWorkGroupSize() const
OpenCLProgram GetProgram() const
OpenCLMemoryObject Self
Vector< float, 2 > VectorFloat2DType
CovariantVector< double, 4 > CovariantVectorDouble4DType
bool GetDoubleAsFloatEnabled()
OpenCLKernel(OpenCLContext *context, const cl_kernel id)
OpenCLSize GetCompileWorkGroupSize(const OpenCLDevice &device) const
Offset< 3 > Offset3DType
Point< double, 1 > PointDouble1DType
Point< int, 4 > PointInt4DType
Matrix< float, 3, 3 > MatrixFloat3x3Type
Vector< double, 1 > VectorDouble1DType
Matrix< float, 1, 1 > MatrixFloat1x1Type
CovariantVector< int, 3 > CovariantVectorInt3DType
OpenCLContext * GetContext() const
OpenCLEvent operator()(const T1 &arg1)
std::string GetName() const
Point< int, 1 > PointInt1DType
OpenCLSize GetBestLocalWorkSizeImage1D() const
Vector< double, 4 > VectorDouble4DType
Matrix< double, 2, 2 > MatrixDouble2x2Type
cl_kernel GetKernelId() const
Matrix< double, 4, 4 > MatrixDouble4x4Type
Point< float, 4 > PointFloat4DType
Point< float, 1 > PointFloat1DType
CovariantVector< float, 1 > CovariantVectorFloat1DType
Vector< double, 2 > VectorDouble2DType
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 1667476801 for elastix by doxygen 1.9.4 elastix logo