opencl_ruby_ffi 1.2.2 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -0
  3. data/lib/opencl_ruby_ffi.rb +2 -0
  4. data/lib/opencl_ruby_ffi/Buffer.rb +18 -13
  5. data/lib/opencl_ruby_ffi/CommandQueue.rb +301 -302
  6. data/lib/opencl_ruby_ffi/Context.rb +158 -158
  7. data/lib/opencl_ruby_ffi/Device.rb +270 -224
  8. data/lib/opencl_ruby_ffi/Event.rb +40 -36
  9. data/lib/opencl_ruby_ffi/Image.rb +34 -57
  10. data/lib/opencl_ruby_ffi/Kernel.rb +251 -191
  11. data/lib/opencl_ruby_ffi/Mem.rb +49 -70
  12. data/lib/opencl_ruby_ffi/Pipe.rb +3 -14
  13. data/lib/opencl_ruby_ffi/Platform.rb +46 -48
  14. data/lib/opencl_ruby_ffi/Program.rb +131 -124
  15. data/lib/opencl_ruby_ffi/Sampler.rb +6 -24
  16. data/lib/opencl_ruby_ffi/amd/device_attribute_query.rb +100 -0
  17. data/lib/opencl_ruby_ffi/egl.rb +2 -0
  18. data/lib/opencl_ruby_ffi/ext.rb +11 -0
  19. data/lib/opencl_ruby_ffi/ext/device_fission.rb +264 -0
  20. data/lib/opencl_ruby_ffi/gl_ext.rb +2 -0
  21. data/lib/opencl_ruby_ffi/khr/d3d10_sharing.rb +120 -0
  22. data/lib/opencl_ruby_ffi/khr/d3d11_sharing.rb +120 -0
  23. data/lib/opencl_ruby_ffi/khr/dx9_media_sharing.rb +113 -0
  24. data/lib/opencl_ruby_ffi/khr/egl_event.rb +15 -0
  25. data/lib/opencl_ruby_ffi/khr/egl_image.rb +58 -0
  26. data/lib/opencl_ruby_ffi/khr/fp16.rb +23 -0
  27. data/lib/opencl_ruby_ffi/khr/fp64.rb +23 -0
  28. data/lib/opencl_ruby_ffi/khr/gl_event.rb +38 -0
  29. data/lib/opencl_ruby_ffi/khr/gl_sharing.rb +79 -0
  30. data/lib/opencl_ruby_ffi/khr/icd.rb +30 -0
  31. data/lib/opencl_ruby_ffi/khr/initalize_memory.rb +19 -0
  32. data/lib/opencl_ruby_ffi/khr/priority_hints.rb +48 -0
  33. data/lib/opencl_ruby_ffi/khr/spir.rb +45 -0
  34. data/lib/opencl_ruby_ffi/khr/sub_groups.rb +49 -0
  35. data/lib/opencl_ruby_ffi/khr/terminate_context.rb +46 -0
  36. data/lib/opencl_ruby_ffi/khr/throttle_hints.rb +47 -0
  37. data/lib/opencl_ruby_ffi/nv/device_attribute_query.rb +50 -0
  38. data/lib/opencl_ruby_ffi/opencl_ruby_ffi_base.rb +40 -13
  39. data/lib/opencl_ruby_ffi/opencl_ruby_ffi_base_gen.rb +214 -2114
  40. data/lib/opencl_ruby_ffi/opencl_types.rb +15 -3
  41. data/opencl_ruby_ffi.gemspec +4 -4
  42. data/templates_custom/default/module/setup.rb +9 -0
  43. metadata +29 -6
  44. data/lib/opencl_ruby_ffi/GLExt.rb +0 -58
  45. data/lib/opencl_ruby_ffi/Stream.rb +0 -127
@@ -18,7 +18,6 @@ module OpenCL
18
18
  end
19
19
  end
20
20
  end
21
- #:stopdoc:
22
21
  SUCCESS = 0
23
22
  DEVICE_NOT_FOUND = -1
24
23
  DEVICE_NOT_AVAILABLE = -2
@@ -80,10 +79,12 @@ module OpenCL
80
79
  INVALID_DEVICE_PARTITION_COUNT = -68
81
80
  INVALID_PIPE_SIZE = -69
82
81
  INVALID_DEVICE_QUEUE = -70
82
+ INVALID_PARTITION_NAME_EXT = -1059
83
83
  VERSION_1_0 = 1
84
84
  VERSION_1_1 = 1
85
85
  VERSION_1_2 = 1
86
86
  VERSION_2_0 = 1
87
+ VERSION_2_1 = 1
87
88
  FALSE = 0
88
89
  TRUE = 1
89
90
  BLOCKING = TRUE
@@ -151,7 +152,6 @@ module OpenCL
151
152
  DEVICE_VERSION = 0x102F
152
153
  DEVICE_EXTENSIONS = 0x1030
153
154
  DEVICE_PLATFORM = 0x1031
154
- DEVICE_DOUBLE_FP_CONFIG = 0x1032
155
155
  DEVICE_PREFERRED_VECTOR_WIDTH_HALF = 0x1034
156
156
  DEVICE_HOST_UNIFIED_MEMORY = 0x1035
157
157
  DEVICE_NATIVE_VECTOR_WIDTH_CHAR = 0x1036
@@ -463,34 +463,6 @@ module OpenCL
463
463
  GL_TEXTURE_TARGET = 0x2004
464
464
  GL_MIPMAP_LEVEL = 0x2005
465
465
  GL_NUM_SAMPLES = 0x2012
466
- INVALID_GL_SHAREGROUP_REFERENCE_KHR = -1000
467
- CURRENT_DEVICE_FOR_GL_CONTEXT_KHR = 0x2006
468
- DEVICES_FOR_GL_CONTEXT_KHR = 0x2007
469
- GL_CONTEXT_KHR = 0x2008
470
- EGL_DISPLAY_KHR = 0x2009
471
- GLX_DISPLAY_KHR = 0x200A
472
- WGL_HDC_KHR = 0x200B
473
- CGL_SHAREGROUP_KHR = 0x200C
474
- COMMAND_GL_FENCE_SYNC_OBJECT_KHR = 0x200D
475
- COMMAND_EGL_FENCE_SYNC_OBJECT_KHR = 0x202F
476
- COMMAND_ACQUIRE_EGL_OBJECTS_KHR = 0x202D
477
- COMMAND_RELEASE_EGL_OBJECTS_KHR = 0x202E
478
- DEVICE_HALF_FP_CONFIG = 0x1033
479
- PLATFORM_ICD_SUFFIX_KHR = 0x0920
480
- PLATFORM_NOT_FOUND_KHR = -1001
481
- CONTEXT_MEMORY_INITIALIZE_KHR = 0x200E
482
- DEVICE_TERMINATE_CAPABILITY_KHR = 0x200F
483
- CONTEXT_TERMINATE_KHR = 0x2010
484
- DEVICE_SPIR_VERSIONS = 0x40E0
485
- PROGRAM_BINARY_TYPE_INTERMEDIATE = 0x40E1
486
- DEVICE_COMPUTE_CAPABILITY_MAJOR_NV = 0x4000
487
- DEVICE_COMPUTE_CAPABILITY_MINOR_NV = 0x4001
488
- DEVICE_REGISTERS_PER_BLOCK_NV = 0x4002
489
- DEVICE_WARP_SIZE_NV = 0x4003
490
- DEVICE_GPU_OVERLAP_NV = 0x4004
491
- DEVICE_KERNEL_EXEC_TIMEOUT_NV = 0x4005
492
- DEVICE_INTEGRATED_MEMORY_NV = 0x4006
493
- DEVICE_PROFILING_TIMER_OFFSET_AMD = 0x4036
494
466
  PRINTF_CALLBACK_ARM = 0x40B0
495
467
  PRINTF_BUFFERSIZE_ARM = 0x40B1
496
468
  DEVICE_PAGE_SIZE_QCOM = 0x40A1
@@ -501,24 +473,7 @@ module OpenCL
501
473
  MEM_HOST_WRITETHROUGH_QCOM = 0x40A6
502
474
  MEM_HOST_WRITE_COMBINING_QCOM = 0x40A7
503
475
  MEM_ION_HOST_PTR_QCOM = 0x40A8
504
- KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE_KHR = 0x2033
505
- KERNEL_SUB_GROUP_COUNT_FOR_NDRANGE_KHR = 0x2034
506
- QUEUE_PRIORITY_KHR = 0x1096
507
- QUEUE_PRIORITY_HIGH_KHR = (1<<0)
508
- QUEUE_PRIORITY_MED_KHR = (1<<1)
509
- QUEUE_PRIORITY_LOW_KHR = (1<<2)
510
- QUEUE_THROTTLE_KHR = 0x1097
511
- QUEUE_THROTTLE_HIGH_KHR = (1<<0)
512
- QUEUE_THROTTLE_MED_KHR = (1<<1)
513
- QUEUE_THROTTLE_LOW_KHR = (1<<2)
514
- COMMAND_ACQUIRE_DX9_MEDIA_SURFACES_KHR = 0x202B
515
- COMMAND_RELEASE_DX9_MEDIA_SURFACES_KHR = 0x202C
516
- COMMAND_ACQUIRE_D3D10_OBJECTS_KHR = 0x4017
517
- COMMAND_RELEASE_D3D10_OBJECTS_KHR = 0x4018
518
- COMMAND_ACQUIRE_D3D11_OBJECTS_KHR = 0x4020
519
- COMMAND_RELEASE_D3D11_OBJECTS_KHR = 0x4021
520
- #:startdoc:
521
- # Parent claas to map OpenCL errors, and is used to raise unknown errors
476
+ # Parent class to map OpenCL errors, and is used to raise unknown errors
522
477
  class Error < StandardError
523
478
  attr_reader :code
524
479
 
@@ -527,9 +482,7 @@ module OpenCL
527
482
  super("#{code}")
528
483
  end
529
484
 
530
- #:stopdoc:
531
485
  CLASSES = {}
532
- #:startdoc:
533
486
 
534
487
  private_constant :CLASSES
535
488
 
@@ -552,1768 +505,99 @@ module OpenCL
552
505
  return "#{@code}"
553
506
  end
554
507
 
555
- # Represents the OpenCL CL_INVALID_PARTITION_NAME_EXT error
556
- class INVALID_PARTITION_NAME_EXT
508
+ def self.error_class_constructor( name, capitalized_name )
509
+ return <<EOF
510
+ class #{name} < Error
557
511
 
558
- # Initilizes code to -1059
559
512
  def initialize
560
- super(-1059)
513
+ super(#{OpenCL::const_get(name)})
561
514
  end
562
515
 
563
- # Returns a string representing the name corresponding to the error classe
564
516
  def self.name
565
- return "INVALID_PARTITION_NAME_EXT"
517
+ return "#{name}"
566
518
  end
567
519
 
568
- # Returns a string representing the name corresponding to the error
569
520
  def name
570
- return "INVALID_PARTITION_NAME_EXT"
521
+ return "#{name}"
571
522
  end
572
523
 
573
524
  def self.code
574
- return -1059
575
- end
576
-
577
- end
578
-
579
- CLASSES[-1059] = INVALID_PARTITION_NAME_EXT
580
- InvalidPartitionNameExt = INVALID_PARTITION_NAME_EXT
581
-
582
- # Represents the OpenCL CL_PLATFORM_NOT_FOUND_KHR error
583
- class PLATFORM_NOT_FOUND_KHR < Error
584
-
585
- # Initilizes code to -1001
586
- def initialize
587
- super(-1001)
588
- end
589
-
590
- # Returns a string representing the name corresponding to the error classe
591
- def self.name
592
- return "PLATFORM_NOT_FOUND_KHR"
593
- end
594
-
595
- # Returns a string representing the name corresponding to the error
596
- def name
597
- return "PLATFORM_NOT_FOUND_KHR"
598
- end
599
-
600
- # Returns the code corresponding to this error class
601
- def self.code
602
- return -1001
603
- end
604
-
605
- end
606
-
607
- CLASSES[-1001] = PLATFORM_NOT_FOUND_KHR
608
- PlatformNotFoundKHR = PLATFORM_NOT_FOUND_KHR
609
-
610
- # Represents the OpenCL CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR error
611
- class INVALID_GL_SHAREGROUP_REFERENCE_KHR < Error
612
-
613
- # Initilizes code to -1000
614
- def initialize
615
- super(-1000)
616
- end
617
-
618
- # Returns a string representing the name corresponding to the error classe
619
- def self.name
620
- return "INVALID_GL_SHAREGROUP_REFERENCE_KHR"
621
- end
622
-
623
- # Returns a string representing the name corresponding to the error
624
- def name
625
- return "INVALID_GL_SHAREGROUP_REFERENCE_KHR"
626
- end
627
-
628
- # Returns the code corresponding to this error class
629
- def self.code
630
- return -1000
631
- end
632
-
633
- end
634
-
635
- CLASSES[-1000] = INVALID_GL_SHAREGROUP_REFERENCE_KHR
636
- InvalidGLSharegroupReferenceKHR = INVALID_GL_SHAREGROUP_REFERENCE_KHR
637
-
638
- # Represents the OpenCL CL_COMPILER_NOT_AVAILABLE error
639
- class COMPILER_NOT_AVAILABLE < Error
640
-
641
- # Initilizes code to -3
642
- def initialize
643
- super(-3)
644
- end
645
-
646
- # Returns a string representing the name corresponding to the error classe
647
- def self.name
648
- return "COMPILER_NOT_AVAILABLE"
649
- end
650
-
651
- # Returns a string representing the name corresponding to the error
652
- def name
653
- return "COMPILER_NOT_AVAILABLE"
654
- end
655
-
656
- # Returns the code corresponding to this error class
657
- def self.code
658
- return -3
659
- end
660
-
661
- end
662
-
663
- CLASSES[-3] = COMPILER_NOT_AVAILABLE
664
- CompilerNotAvailable = COMPILER_NOT_AVAILABLE
665
-
666
- # Represents the OpenCL CL_DEVICE_NOT_AVAILABLE error
667
- class DEVICE_NOT_AVAILABLE < Error
668
-
669
- # Initilizes code to -2
670
- def initialize
671
- super(-2)
672
- end
673
-
674
- # Returns a string representing the name corresponding to the error classe
675
- def self.name
676
- return "DEVICE_NOT_AVAILABLE"
677
- end
678
-
679
- # Returns a string representing the name corresponding to the error
680
- def name
681
- return "DEVICE_NOT_AVAILABLE"
682
- end
683
-
684
- # Returns the code corresponding to this error class
685
- def self.code
686
- return -2
687
- end
688
-
689
- end
690
-
691
- CLASSES[-2] = DEVICE_NOT_AVAILABLE
692
- DeviceNotAvailable = DEVICE_NOT_AVAILABLE
693
-
694
- # Represents the OpenCL CL_DEVICE_NOT_FOUND error
695
- class DEVICE_NOT_FOUND < Error
696
-
697
- # Initilizes code to -1
698
- def initialize
699
- super(-1)
700
- end
701
-
702
- # Returns a string representing the name corresponding to the error classe
703
- def self.name
704
- return "DEVICE_NOT_FOUND"
705
- end
706
-
707
- # Returns a string representing the name corresponding to the error
708
- def name
709
- return "DEVICE_NOT_FOUND"
710
- end
711
-
712
- # Returns the code corresponding to this error class
713
- def self.code
714
- return -1
715
- end
716
-
717
- end
718
-
719
- CLASSES[-1] = DEVICE_NOT_FOUND
720
- DeviceNotFound = DEVICE_NOT_FOUND
721
-
722
- # Represents the OpenCL CL_INVALID_DEVICE_QUEUE error
723
- class INVALID_DEVICE_QUEUE < Error
724
-
725
- # Initilizes code to -70
726
- def initialize
727
- super(-70)
728
- end
729
-
730
- # Returns a string representing the name corresponding to the error classe
731
- def self.name
732
- return "INVALID_DEVICE_QUEUE"
733
- end
734
-
735
- # Returns a string representing the name corresponding to the error
736
- def name
737
- return "INVALID_DEVICE_QUEUE"
738
- end
739
-
740
- # Returns the code corresponding to this error class
741
- def self.code
742
- return -70
743
- end
744
-
745
- end
746
-
747
- CLASSES[-70] = INVALID_DEVICE_QUEUE
748
- InvalidDeviceQueue = INVALID_DEVICE_QUEUE
749
-
750
- # Represents the OpenCL CL_INVALID_PIPE_SIZE error
751
- class INVALID_PIPE_SIZE < Error
752
-
753
- # Initilizes code to -69
754
- def initialize
755
- super(-69)
756
- end
757
-
758
- # Returns a string representing the name corresponding to the error classe
759
- def self.name
760
- return "INVALID_PIPE_SIZE"
761
- end
762
-
763
- # Returns a string representing the name corresponding to the error
764
- def name
765
- return "INVALID_PIPE_SIZE"
766
- end
767
-
768
- # Returns the code corresponding to this error class
769
- def self.code
770
- return -69
771
- end
772
-
773
- end
774
-
775
- CLASSES[-69] = INVALID_PIPE_SIZE
776
- InvalidPipeSize = INVALID_PIPE_SIZE
777
-
778
- # Represents the OpenCL CL_INVALID_DEVICE_PARTITION_COUNT error
779
- class INVALID_DEVICE_PARTITION_COUNT < Error
780
-
781
- # Initilizes code to -68
782
- def initialize
783
- super(-68)
784
- end
785
-
786
- # Returns a string representing the name corresponding to the error classe
787
- def self.name
788
- return "INVALID_DEVICE_PARTITION_COUNT"
789
- end
790
-
791
- # Returns a string representing the name corresponding to the error
792
- def name
793
- return "INVALID_DEVICE_PARTITION_COUNT"
794
- end
795
-
796
- # Returns the code corresponding to this error class
797
- def self.code
798
- return -68
799
- end
800
-
801
- end
802
-
803
- CLASSES[-68] = INVALID_DEVICE_PARTITION_COUNT
804
- InvalidDevicePartitionCount = INVALID_DEVICE_PARTITION_COUNT
805
-
806
- # Represents the OpenCL CL_INVALID_LINKER_OPTIONS error
807
- class INVALID_LINKER_OPTIONS < Error
808
-
809
- # Initilizes code to -67
810
- def initialize
811
- super(-67)
812
- end
813
-
814
- # Returns a string representing the name corresponding to the error classe
815
- def self.name
816
- return "INVALID_LINKER_OPTIONS"
817
- end
818
-
819
- # Returns a string representing the name corresponding to the error
820
- def name
821
- return "INVALID_LINKER_OPTIONS"
822
- end
823
-
824
- # Returns the code corresponding to this error class
825
- def self.code
826
- return -67
827
- end
828
-
829
- end
830
-
831
- CLASSES[-67] = INVALID_LINKER_OPTIONS
832
- InvalidLinkerOptions = INVALID_LINKER_OPTIONS
833
-
834
- # Represents the OpenCL CL_INVALID_COMPILER_OPTIONS error
835
- class INVALID_COMPILER_OPTIONS < Error
836
-
837
- # Initilizes code to -66
838
- def initialize
839
- super(-66)
840
- end
841
-
842
- # Returns a string representing the name corresponding to the error classe
843
- def self.name
844
- return "INVALID_COMPILER_OPTIONS"
845
- end
846
-
847
- # Returns a string representing the name corresponding to the error
848
- def name
849
- return "INVALID_COMPILER_OPTIONS"
850
- end
851
-
852
- # Returns the code corresponding to this error class
853
- def self.code
854
- return -66
855
- end
856
-
857
- end
858
-
859
- CLASSES[-66] = INVALID_COMPILER_OPTIONS
860
- InvalidCompilerOptions = INVALID_COMPILER_OPTIONS
861
-
862
- # Represents the OpenCL CL_INVALID_IMAGE_DESCRIPTOR error
863
- class INVALID_IMAGE_DESCRIPTOR < Error
864
-
865
- # Initilizes code to -65
866
- def initialize
867
- super(-65)
868
- end
869
-
870
- # Returns a string representing the name corresponding to the error classe
871
- def self.name
872
- return "INVALID_IMAGE_DESCRIPTOR"
873
- end
874
-
875
- # Returns a string representing the name corresponding to the error
876
- def name
877
- return "INVALID_IMAGE_DESCRIPTOR"
878
- end
879
-
880
- # Returns the code corresponding to this error class
881
- def self.code
882
- return -65
883
- end
884
-
885
- end
886
-
887
- CLASSES[-65] = INVALID_IMAGE_DESCRIPTOR
888
- InvalidImageDescriptor = INVALID_IMAGE_DESCRIPTOR
889
-
890
- # Represents the OpenCL CL_INVALID_PROPERTY error
891
- class INVALID_PROPERTY < Error
892
-
893
- # Initilizes code to -64
894
- def initialize
895
- super(-64)
896
- end
897
-
898
- # Returns a string representing the name corresponding to the error classe
899
- def self.name
900
- return "INVALID_PROPERTY"
901
- end
902
-
903
- # Returns a string representing the name corresponding to the error
904
- def name
905
- return "INVALID_PROPERTY"
906
- end
907
-
908
- # Returns the code corresponding to this error class
909
- def self.code
910
- return -64
911
- end
912
-
913
- end
914
-
915
- CLASSES[-64] = INVALID_PROPERTY
916
- InvalidProperty = INVALID_PROPERTY
917
-
918
- # Represents the OpenCL CL_INVALID_GLOBAL_WORK_SIZE error
919
- class INVALID_GLOBAL_WORK_SIZE < Error
920
-
921
- # Initilizes code to -63
922
- def initialize
923
- super(-63)
924
- end
925
-
926
- # Returns a string representing the name corresponding to the error classe
927
- def self.name
928
- return "INVALID_GLOBAL_WORK_SIZE"
929
- end
930
-
931
- # Returns a string representing the name corresponding to the error
932
- def name
933
- return "INVALID_GLOBAL_WORK_SIZE"
934
- end
935
-
936
- # Returns the code corresponding to this error class
937
- def self.code
938
- return -63
939
- end
940
-
941
- end
942
-
943
- CLASSES[-63] = INVALID_GLOBAL_WORK_SIZE
944
- InvalidGLOBALWorkSize = INVALID_GLOBAL_WORK_SIZE
945
-
946
- # Represents the OpenCL CL_INVALID_MIP_LEVEL error
947
- class INVALID_MIP_LEVEL < Error
948
-
949
- # Initilizes code to -62
950
- def initialize
951
- super(-62)
952
- end
953
-
954
- # Returns a string representing the name corresponding to the error classe
955
- def self.name
956
- return "INVALID_MIP_LEVEL"
957
- end
958
-
959
- # Returns a string representing the name corresponding to the error
960
- def name
961
- return "INVALID_MIP_LEVEL"
962
- end
963
-
964
- # Returns the code corresponding to this error class
965
- def self.code
966
- return -62
967
- end
968
-
969
- end
970
-
971
- CLASSES[-62] = INVALID_MIP_LEVEL
972
- InvalidMipLevel = INVALID_MIP_LEVEL
973
-
974
- # Represents the OpenCL CL_INVALID_BUFFER_SIZE error
975
- class INVALID_BUFFER_SIZE < Error
976
-
977
- # Initilizes code to -61
978
- def initialize
979
- super(-61)
980
- end
981
-
982
- # Returns a string representing the name corresponding to the error classe
983
- def self.name
984
- return "INVALID_BUFFER_SIZE"
985
- end
986
-
987
- # Returns a string representing the name corresponding to the error
988
- def name
989
- return "INVALID_BUFFER_SIZE"
990
- end
991
-
992
- # Returns the code corresponding to this error class
993
- def self.code
994
- return -61
995
- end
996
-
997
- end
998
-
999
- CLASSES[-61] = INVALID_BUFFER_SIZE
1000
- InvalidBufferSize = INVALID_BUFFER_SIZE
1001
-
1002
- # Represents the OpenCL CL_INVALID_GL_OBJECT error
1003
- class INVALID_GL_OBJECT < Error
1004
-
1005
- # Initilizes code to -60
1006
- def initialize
1007
- super(-60)
1008
- end
1009
-
1010
- # Returns a string representing the name corresponding to the error classe
1011
- def self.name
1012
- return "INVALID_GL_OBJECT"
1013
- end
1014
-
1015
- # Returns a string representing the name corresponding to the error
1016
- def name
1017
- return "INVALID_GL_OBJECT"
1018
- end
1019
-
1020
- # Returns the code corresponding to this error class
1021
- def self.code
1022
- return -60
1023
- end
1024
-
1025
- end
1026
-
1027
- CLASSES[-60] = INVALID_GL_OBJECT
1028
- InvalidGLObject = INVALID_GL_OBJECT
1029
-
1030
- # Represents the OpenCL CL_INVALID_OPERATION error
1031
- class INVALID_OPERATION < Error
1032
-
1033
- # Initilizes code to -59
1034
- def initialize
1035
- super(-59)
1036
- end
1037
-
1038
- # Returns a string representing the name corresponding to the error classe
1039
- def self.name
1040
- return "INVALID_OPERATION"
1041
- end
1042
-
1043
- # Returns a string representing the name corresponding to the error
1044
- def name
1045
- return "INVALID_OPERATION"
1046
- end
1047
-
1048
- # Returns the code corresponding to this error class
1049
- def self.code
1050
- return -59
1051
- end
1052
-
1053
- end
1054
-
1055
- CLASSES[-59] = INVALID_OPERATION
1056
- InvalidOperation = INVALID_OPERATION
1057
-
1058
- # Represents the OpenCL CL_INVALID_EVENT error
1059
- class INVALID_EVENT < Error
1060
-
1061
- # Initilizes code to -58
1062
- def initialize
1063
- super(-58)
1064
- end
1065
-
1066
- # Returns a string representing the name corresponding to the error classe
1067
- def self.name
1068
- return "INVALID_EVENT"
1069
- end
1070
-
1071
- # Returns a string representing the name corresponding to the error
1072
- def name
1073
- return "INVALID_EVENT"
1074
- end
1075
-
1076
- # Returns the code corresponding to this error class
1077
- def self.code
1078
- return -58
1079
- end
1080
-
1081
- end
1082
-
1083
- CLASSES[-58] = INVALID_EVENT
1084
- InvalidEvent = INVALID_EVENT
1085
-
1086
- # Represents the OpenCL CL_INVALID_EVENT_WAIT_LIST error
1087
- class INVALID_EVENT_WAIT_LIST < Error
1088
-
1089
- # Initilizes code to -57
1090
- def initialize
1091
- super(-57)
1092
- end
1093
-
1094
- # Returns a string representing the name corresponding to the error classe
1095
- def self.name
1096
- return "INVALID_EVENT_WAIT_LIST"
1097
- end
1098
-
1099
- # Returns a string representing the name corresponding to the error
1100
- def name
1101
- return "INVALID_EVENT_WAIT_LIST"
1102
- end
1103
-
1104
- # Returns the code corresponding to this error class
1105
- def self.code
1106
- return -57
1107
- end
1108
-
1109
- end
1110
-
1111
- CLASSES[-57] = INVALID_EVENT_WAIT_LIST
1112
- InvalidEventWaitList = INVALID_EVENT_WAIT_LIST
1113
-
1114
- # Represents the OpenCL CL_INVALID_GLOBAL_OFFSET error
1115
- class INVALID_GLOBAL_OFFSET < Error
1116
-
1117
- # Initilizes code to -56
1118
- def initialize
1119
- super(-56)
1120
- end
1121
-
1122
- # Returns a string representing the name corresponding to the error classe
1123
- def self.name
1124
- return "INVALID_GLOBAL_OFFSET"
1125
- end
1126
-
1127
- # Returns a string representing the name corresponding to the error
1128
- def name
1129
- return "INVALID_GLOBAL_OFFSET"
1130
- end
1131
-
1132
- # Returns the code corresponding to this error class
1133
- def self.code
1134
- return -56
1135
- end
1136
-
1137
- end
1138
-
1139
- CLASSES[-56] = INVALID_GLOBAL_OFFSET
1140
- InvalidGLOBALOffset = INVALID_GLOBAL_OFFSET
1141
-
1142
- # Represents the OpenCL CL_INVALID_WORK_ITEM_SIZE error
1143
- class INVALID_WORK_ITEM_SIZE < Error
1144
-
1145
- # Initilizes code to -55
1146
- def initialize
1147
- super(-55)
1148
- end
1149
-
1150
- # Returns a string representing the name corresponding to the error classe
1151
- def self.name
1152
- return "INVALID_WORK_ITEM_SIZE"
1153
- end
1154
-
1155
- # Returns a string representing the name corresponding to the error
1156
- def name
1157
- return "INVALID_WORK_ITEM_SIZE"
1158
- end
1159
-
1160
- # Returns the code corresponding to this error class
1161
- def self.code
1162
- return -55
1163
- end
1164
-
1165
- end
1166
-
1167
- CLASSES[-55] = INVALID_WORK_ITEM_SIZE
1168
- InvalidWorkItemSize = INVALID_WORK_ITEM_SIZE
1169
-
1170
- # Represents the OpenCL CL_INVALID_WORK_GROUP_SIZE error
1171
- class INVALID_WORK_GROUP_SIZE < Error
1172
-
1173
- # Initilizes code to -54
1174
- def initialize
1175
- super(-54)
1176
- end
1177
-
1178
- # Returns a string representing the name corresponding to the error classe
1179
- def self.name
1180
- return "INVALID_WORK_GROUP_SIZE"
1181
- end
1182
-
1183
- # Returns a string representing the name corresponding to the error
1184
- def name
1185
- return "INVALID_WORK_GROUP_SIZE"
1186
- end
1187
-
1188
- # Returns the code corresponding to this error class
1189
- def self.code
1190
- return -54
1191
- end
1192
-
1193
- end
1194
-
1195
- CLASSES[-54] = INVALID_WORK_GROUP_SIZE
1196
- InvalidWorkGroupSize = INVALID_WORK_GROUP_SIZE
1197
-
1198
- # Represents the OpenCL CL_INVALID_WORK_DIMENSION error
1199
- class INVALID_WORK_DIMENSION < Error
1200
-
1201
- # Initilizes code to -53
1202
- def initialize
1203
- super(-53)
1204
- end
1205
-
1206
- # Returns a string representing the name corresponding to the error classe
1207
- def self.name
1208
- return "INVALID_WORK_DIMENSION"
1209
- end
1210
-
1211
- # Returns a string representing the name corresponding to the error
1212
- def name
1213
- return "INVALID_WORK_DIMENSION"
1214
- end
1215
-
1216
- # Returns the code corresponding to this error class
1217
- def self.code
1218
- return -53
1219
- end
1220
-
1221
- end
1222
-
1223
- CLASSES[-53] = INVALID_WORK_DIMENSION
1224
- InvalidWorkDimension = INVALID_WORK_DIMENSION
1225
-
1226
- # Represents the OpenCL CL_INVALID_KERNEL_ARGS error
1227
- class INVALID_KERNEL_ARGS < Error
1228
-
1229
- # Initilizes code to -52
1230
- def initialize
1231
- super(-52)
1232
- end
1233
-
1234
- # Returns a string representing the name corresponding to the error classe
1235
- def self.name
1236
- return "INVALID_KERNEL_ARGS"
1237
- end
1238
-
1239
- # Returns a string representing the name corresponding to the error
1240
- def name
1241
- return "INVALID_KERNEL_ARGS"
1242
- end
1243
-
1244
- # Returns the code corresponding to this error class
1245
- def self.code
1246
- return -52
1247
- end
1248
-
1249
- end
1250
-
1251
- CLASSES[-52] = INVALID_KERNEL_ARGS
1252
- InvalidKernelArgs = INVALID_KERNEL_ARGS
1253
-
1254
- # Represents the OpenCL CL_INVALID_ARG_SIZE error
1255
- class INVALID_ARG_SIZE < Error
1256
-
1257
- # Initilizes code to -51
1258
- def initialize
1259
- super(-51)
1260
- end
1261
-
1262
- # Returns a string representing the name corresponding to the error classe
1263
- def self.name
1264
- return "INVALID_ARG_SIZE"
1265
- end
1266
-
1267
- # Returns a string representing the name corresponding to the error
1268
- def name
1269
- return "INVALID_ARG_SIZE"
1270
- end
1271
-
1272
- # Returns the code corresponding to this error class
1273
- def self.code
1274
- return -51
1275
- end
1276
-
1277
- end
1278
-
1279
- CLASSES[-51] = INVALID_ARG_SIZE
1280
- InvalidArgSize = INVALID_ARG_SIZE
1281
-
1282
- # Represents the OpenCL CL_INVALID_ARG_VALUE error
1283
- class INVALID_ARG_VALUE < Error
1284
-
1285
- # Initilizes code to -50
1286
- def initialize
1287
- super(-50)
1288
- end
1289
-
1290
- # Returns a string representing the name corresponding to the error classe
1291
- def self.name
1292
- return "INVALID_ARG_VALUE"
1293
- end
1294
-
1295
- # Returns a string representing the name corresponding to the error
1296
- def name
1297
- return "INVALID_ARG_VALUE"
1298
- end
1299
-
1300
- # Returns the code corresponding to this error class
1301
- def self.code
1302
- return -50
1303
- end
1304
-
1305
- end
1306
-
1307
- CLASSES[-50] = INVALID_ARG_VALUE
1308
- InvalidArgValue = INVALID_ARG_VALUE
1309
-
1310
- # Represents the OpenCL CL_INVALID_ARG_INDEX error
1311
- class INVALID_ARG_INDEX < Error
1312
-
1313
- # Initilizes code to -49
1314
- def initialize
1315
- super(-49)
1316
- end
1317
-
1318
- # Returns a string representing the name corresponding to the error classe
1319
- def self.name
1320
- return "INVALID_ARG_INDEX"
1321
- end
1322
-
1323
- # Returns a string representing the name corresponding to the error
1324
- def name
1325
- return "INVALID_ARG_INDEX"
1326
- end
1327
-
1328
- # Returns the code corresponding to this error class
1329
- def self.code
1330
- return -49
1331
- end
1332
-
1333
- end
1334
-
1335
- CLASSES[-49] = INVALID_ARG_INDEX
1336
- InvalidArgIndex = INVALID_ARG_INDEX
1337
-
1338
- # Represents the OpenCL CL_INVALID_KERNEL error
1339
- class INVALID_KERNEL < Error
1340
-
1341
- # Initilizes code to -48
1342
- def initialize
1343
- super(-48)
1344
- end
1345
-
1346
- # Returns a string representing the name corresponding to the error classe
1347
- def self.name
1348
- return "INVALID_KERNEL"
1349
- end
1350
-
1351
- # Returns a string representing the name corresponding to the error
1352
- def name
1353
- return "INVALID_KERNEL"
1354
- end
1355
-
1356
- # Returns the code corresponding to this error class
1357
- def self.code
1358
- return -48
1359
- end
1360
-
1361
- end
1362
-
1363
- CLASSES[-48] = INVALID_KERNEL
1364
- InvalidKernel = INVALID_KERNEL
1365
-
1366
- # Represents the OpenCL CL_INVALID_KERNEL_DEFINITION error
1367
- class INVALID_KERNEL_DEFINITION < Error
1368
-
1369
- # Initilizes code to -47
1370
- def initialize
1371
- super(-47)
1372
- end
1373
-
1374
- # Returns a string representing the name corresponding to the error classe
1375
- def self.name
1376
- return "INVALID_KERNEL_DEFINITION"
1377
- end
1378
-
1379
- # Returns a string representing the name corresponding to the error
1380
- def name
1381
- return "INVALID_KERNEL_DEFINITION"
1382
- end
1383
-
1384
- # Returns the code corresponding to this error class
1385
- def self.code
1386
- return -47
1387
- end
1388
-
1389
- end
1390
-
1391
- CLASSES[-47] = INVALID_KERNEL_DEFINITION
1392
- InvalidKernelDefinition = INVALID_KERNEL_DEFINITION
1393
-
1394
- # Represents the OpenCL CL_INVALID_KERNEL_NAME error
1395
- class INVALID_KERNEL_NAME < Error
1396
-
1397
- # Initilizes code to -46
1398
- def initialize
1399
- super(-46)
1400
- end
1401
-
1402
- # Returns a string representing the name corresponding to the error classe
1403
- def self.name
1404
- return "INVALID_KERNEL_NAME"
1405
- end
1406
-
1407
- # Returns a string representing the name corresponding to the error
1408
- def name
1409
- return "INVALID_KERNEL_NAME"
1410
- end
1411
-
1412
- # Returns the code corresponding to this error class
1413
- def self.code
1414
- return -46
1415
- end
1416
-
1417
- end
1418
-
1419
- CLASSES[-46] = INVALID_KERNEL_NAME
1420
- InvalidKernelName = INVALID_KERNEL_NAME
1421
-
1422
- # Represents the OpenCL CL_INVALID_PROGRAM_EXECUTABLE error
1423
- class INVALID_PROGRAM_EXECUTABLE < Error
1424
-
1425
- # Initilizes code to -45
1426
- def initialize
1427
- super(-45)
1428
- end
1429
-
1430
- # Returns a string representing the name corresponding to the error classe
1431
- def self.name
1432
- return "INVALID_PROGRAM_EXECUTABLE"
1433
- end
1434
-
1435
- # Returns a string representing the name corresponding to the error
1436
- def name
1437
- return "INVALID_PROGRAM_EXECUTABLE"
1438
- end
1439
-
1440
- # Returns the code corresponding to this error class
1441
- def self.code
1442
- return -45
1443
- end
1444
-
1445
- end
1446
-
1447
- CLASSES[-45] = INVALID_PROGRAM_EXECUTABLE
1448
- InvalidProgramExecutable = INVALID_PROGRAM_EXECUTABLE
1449
-
1450
- # Represents the OpenCL CL_INVALID_PROGRAM error
1451
- class INVALID_PROGRAM < Error
1452
-
1453
- # Initilizes code to -44
1454
- def initialize
1455
- super(-44)
1456
- end
1457
-
1458
- # Returns a string representing the name corresponding to the error classe
1459
- def self.name
1460
- return "INVALID_PROGRAM"
1461
- end
1462
-
1463
- # Returns a string representing the name corresponding to the error
1464
- def name
1465
- return "INVALID_PROGRAM"
1466
- end
1467
-
1468
- # Returns the code corresponding to this error class
1469
- def self.code
1470
- return -44
1471
- end
1472
-
1473
- end
1474
-
1475
- CLASSES[-44] = INVALID_PROGRAM
1476
- InvalidProgram = INVALID_PROGRAM
1477
-
1478
- # Represents the OpenCL CL_INVALID_BUILD_OPTIONS error
1479
- class INVALID_BUILD_OPTIONS < Error
1480
-
1481
- # Initilizes code to -43
1482
- def initialize
1483
- super(-43)
1484
- end
1485
-
1486
- # Returns a string representing the name corresponding to the error classe
1487
- def self.name
1488
- return "INVALID_BUILD_OPTIONS"
1489
- end
1490
-
1491
- # Returns a string representing the name corresponding to the error
1492
- def name
1493
- return "INVALID_BUILD_OPTIONS"
1494
- end
1495
-
1496
- # Returns the code corresponding to this error class
1497
- def self.code
1498
- return -43
1499
- end
1500
-
1501
- end
1502
-
1503
- CLASSES[-43] = INVALID_BUILD_OPTIONS
1504
- InvalidBuildOptions = INVALID_BUILD_OPTIONS
1505
-
1506
- # Represents the OpenCL CL_INVALID_BINARY error
1507
- class INVALID_BINARY < Error
1508
-
1509
- # Initilizes code to -42
1510
- def initialize
1511
- super(-42)
1512
- end
1513
-
1514
- # Returns a string representing the name corresponding to the error classe
1515
- def self.name
1516
- return "INVALID_BINARY"
1517
- end
1518
-
1519
- # Returns a string representing the name corresponding to the error
1520
- def name
1521
- return "INVALID_BINARY"
1522
- end
1523
-
1524
- # Returns the code corresponding to this error class
1525
- def self.code
1526
- return -42
1527
- end
1528
-
1529
- end
1530
-
1531
- CLASSES[-42] = INVALID_BINARY
1532
- InvalidBinary = INVALID_BINARY
1533
-
1534
- # Represents the OpenCL CL_INVALID_SAMPLER error
1535
- class INVALID_SAMPLER < Error
1536
-
1537
- # Initilizes code to -41
1538
- def initialize
1539
- super(-41)
1540
- end
1541
-
1542
- # Returns a string representing the name corresponding to the error classe
1543
- def self.name
1544
- return "INVALID_SAMPLER"
1545
- end
1546
-
1547
- # Returns a string representing the name corresponding to the error
1548
- def name
1549
- return "INVALID_SAMPLER"
1550
- end
1551
-
1552
- # Returns the code corresponding to this error class
1553
- def self.code
1554
- return -41
1555
- end
1556
-
1557
- end
1558
-
1559
- CLASSES[-41] = INVALID_SAMPLER
1560
- InvalidSampler = INVALID_SAMPLER
1561
-
1562
- # Represents the OpenCL CL_INVALID_IMAGE_SIZE error
1563
- class INVALID_IMAGE_SIZE < Error
1564
-
1565
- # Initilizes code to -40
1566
- def initialize
1567
- super(-40)
1568
- end
1569
-
1570
- # Returns a string representing the name corresponding to the error classe
1571
- def self.name
1572
- return "INVALID_IMAGE_SIZE"
1573
- end
1574
-
1575
- # Returns a string representing the name corresponding to the error
1576
- def name
1577
- return "INVALID_IMAGE_SIZE"
1578
- end
1579
-
1580
- # Returns the code corresponding to this error class
1581
- def self.code
1582
- return -40
1583
- end
1584
-
1585
- end
1586
-
1587
- CLASSES[-40] = INVALID_IMAGE_SIZE
1588
- InvalidImageSize = INVALID_IMAGE_SIZE
1589
-
1590
- # Represents the OpenCL CL_INVALID_IMAGE_FORMAT_DESCRIPTOR error
1591
- class INVALID_IMAGE_FORMAT_DESCRIPTOR < Error
1592
-
1593
- # Initilizes code to -39
1594
- def initialize
1595
- super(-39)
1596
- end
1597
-
1598
- # Returns a string representing the name corresponding to the error classe
1599
- def self.name
1600
- return "INVALID_IMAGE_FORMAT_DESCRIPTOR"
1601
- end
1602
-
1603
- # Returns a string representing the name corresponding to the error
1604
- def name
1605
- return "INVALID_IMAGE_FORMAT_DESCRIPTOR"
1606
- end
1607
-
1608
- # Returns the code corresponding to this error class
1609
- def self.code
1610
- return -39
1611
- end
1612
-
1613
- end
1614
-
1615
- CLASSES[-39] = INVALID_IMAGE_FORMAT_DESCRIPTOR
1616
- InvalidImageFormatDescriptor = INVALID_IMAGE_FORMAT_DESCRIPTOR
1617
-
1618
- # Represents the OpenCL CL_INVALID_MEM_OBJECT error
1619
- class INVALID_MEM_OBJECT < Error
1620
-
1621
- # Initilizes code to -38
1622
- def initialize
1623
- super(-38)
1624
- end
1625
-
1626
- # Returns a string representing the name corresponding to the error classe
1627
- def self.name
1628
- return "INVALID_MEM_OBJECT"
1629
- end
1630
-
1631
- # Returns a string representing the name corresponding to the error
1632
- def name
1633
- return "INVALID_MEM_OBJECT"
1634
- end
1635
-
1636
- # Returns the code corresponding to this error class
1637
- def self.code
1638
- return -38
1639
- end
1640
-
1641
- end
1642
-
1643
- CLASSES[-38] = INVALID_MEM_OBJECT
1644
- InvalidMemObject = INVALID_MEM_OBJECT
1645
-
1646
- # Represents the OpenCL CL_INVALID_HOST_PTR error
1647
- class INVALID_HOST_PTR < Error
1648
-
1649
- # Initilizes code to -37
1650
- def initialize
1651
- super(-37)
1652
- end
1653
-
1654
- # Returns a string representing the name corresponding to the error classe
1655
- def self.name
1656
- return "INVALID_HOST_PTR"
1657
- end
1658
-
1659
- # Returns a string representing the name corresponding to the error
1660
- def name
1661
- return "INVALID_HOST_PTR"
1662
- end
1663
-
1664
- # Returns the code corresponding to this error class
1665
- def self.code
1666
- return -37
1667
- end
1668
-
1669
- end
1670
-
1671
- CLASSES[-37] = INVALID_HOST_PTR
1672
- InvalidHostPtr = INVALID_HOST_PTR
1673
-
1674
- # Represents the OpenCL CL_INVALID_COMMAND_QUEUE error
1675
- class INVALID_COMMAND_QUEUE < Error
1676
-
1677
- # Initilizes code to -36
1678
- def initialize
1679
- super(-36)
1680
- end
1681
-
1682
- # Returns a string representing the name corresponding to the error classe
1683
- def self.name
1684
- return "INVALID_COMMAND_QUEUE"
1685
- end
1686
-
1687
- # Returns a string representing the name corresponding to the error
1688
- def name
1689
- return "INVALID_COMMAND_QUEUE"
1690
- end
1691
-
1692
- # Returns the code corresponding to this error class
1693
- def self.code
1694
- return -36
1695
- end
1696
-
1697
- end
1698
-
1699
- CLASSES[-36] = INVALID_COMMAND_QUEUE
1700
- InvalidCommandQueue = INVALID_COMMAND_QUEUE
1701
-
1702
- # Represents the OpenCL CL_INVALID_QUEUE_PROPERTIES error
1703
- class INVALID_QUEUE_PROPERTIES < Error
1704
-
1705
- # Initilizes code to -35
1706
- def initialize
1707
- super(-35)
1708
- end
1709
-
1710
- # Returns a string representing the name corresponding to the error classe
1711
- def self.name
1712
- return "INVALID_QUEUE_PROPERTIES"
1713
- end
1714
-
1715
- # Returns a string representing the name corresponding to the error
1716
- def name
1717
- return "INVALID_QUEUE_PROPERTIES"
1718
- end
1719
-
1720
- # Returns the code corresponding to this error class
1721
- def self.code
1722
- return -35
1723
- end
1724
-
1725
- end
1726
-
1727
- CLASSES[-35] = INVALID_QUEUE_PROPERTIES
1728
- InvalidQueueProperties = INVALID_QUEUE_PROPERTIES
1729
-
1730
- # Represents the OpenCL CL_INVALID_CONTEXT error
1731
- class INVALID_CONTEXT < Error
1732
-
1733
- # Initilizes code to -34
1734
- def initialize
1735
- super(-34)
1736
- end
1737
-
1738
- # Returns a string representing the name corresponding to the error classe
1739
- def self.name
1740
- return "INVALID_CONTEXT"
1741
- end
1742
-
1743
- # Returns a string representing the name corresponding to the error
1744
- def name
1745
- return "INVALID_CONTEXT"
1746
- end
1747
-
1748
- # Returns the code corresponding to this error class
1749
- def self.code
1750
- return -34
1751
- end
1752
-
1753
- end
1754
-
1755
- CLASSES[-34] = INVALID_CONTEXT
1756
- InvalidContext = INVALID_CONTEXT
1757
-
1758
- # Represents the OpenCL CL_INVALID_DEVICE error
1759
- class INVALID_DEVICE < Error
1760
-
1761
- # Initilizes code to -33
1762
- def initialize
1763
- super(-33)
1764
- end
1765
-
1766
- # Returns a string representing the name corresponding to the error classe
1767
- def self.name
1768
- return "INVALID_DEVICE"
1769
- end
1770
-
1771
- # Returns a string representing the name corresponding to the error
1772
- def name
1773
- return "INVALID_DEVICE"
1774
- end
1775
-
1776
- # Returns the code corresponding to this error class
1777
- def self.code
1778
- return -33
1779
- end
1780
-
1781
- end
1782
-
1783
- CLASSES[-33] = INVALID_DEVICE
1784
- InvalidDevice = INVALID_DEVICE
1785
-
1786
- # Represents the OpenCL CL_INVALID_PLATFORM error
1787
- class INVALID_PLATFORM < Error
1788
-
1789
- # Initilizes code to -32
1790
- def initialize
1791
- super(-32)
1792
- end
1793
-
1794
- # Returns a string representing the name corresponding to the error classe
1795
- def self.name
1796
- return "INVALID_PLATFORM"
1797
- end
1798
-
1799
- # Returns a string representing the name corresponding to the error
1800
- def name
1801
- return "INVALID_PLATFORM"
1802
- end
1803
-
1804
- # Returns the code corresponding to this error class
1805
- def self.code
1806
- return -32
1807
- end
1808
-
1809
- end
1810
-
1811
- CLASSES[-32] = INVALID_PLATFORM
1812
- InvalidPlatform = INVALID_PLATFORM
1813
-
1814
- # Represents the OpenCL CL_INVALID_DEVICE_TYPE error
1815
- class INVALID_DEVICE_TYPE < Error
1816
-
1817
- # Initilizes code to -31
1818
- def initialize
1819
- super(-31)
1820
- end
1821
-
1822
- # Returns a string representing the name corresponding to the error classe
1823
- def self.name
1824
- return "INVALID_DEVICE_TYPE"
1825
- end
1826
-
1827
- # Returns a string representing the name corresponding to the error
1828
- def name
1829
- return "INVALID_DEVICE_TYPE"
1830
- end
1831
-
1832
- # Returns the code corresponding to this error class
1833
- def self.code
1834
- return -31
1835
- end
1836
-
1837
- end
1838
-
1839
- CLASSES[-31] = INVALID_DEVICE_TYPE
1840
- InvalidDeviceType = INVALID_DEVICE_TYPE
1841
-
1842
- # Represents the OpenCL CL_INVALID_VALUE error
1843
- class INVALID_VALUE < Error
1844
-
1845
- # Initilizes code to -30
1846
- def initialize
1847
- super(-30)
1848
- end
1849
-
1850
- # Returns a string representing the name corresponding to the error classe
1851
- def self.name
1852
- return "INVALID_VALUE"
1853
- end
1854
-
1855
- # Returns a string representing the name corresponding to the error
1856
- def name
1857
- return "INVALID_VALUE"
1858
- end
1859
-
1860
- # Returns the code corresponding to this error class
1861
- def self.code
1862
- return -30
1863
- end
1864
-
1865
- end
1866
-
1867
- CLASSES[-30] = INVALID_VALUE
1868
- InvalidValue = INVALID_VALUE
1869
-
1870
- # Represents the OpenCL CL_KERNEL_ARG_INFO_NOT_AVAILABLE error
1871
- class KERNEL_ARG_INFO_NOT_AVAILABLE < Error
1872
-
1873
- # Initilizes code to -19
1874
- def initialize
1875
- super(-19)
1876
- end
1877
-
1878
- # Returns a string representing the name corresponding to the error classe
1879
- def self.name
1880
- return "KERNEL_ARG_INFO_NOT_AVAILABLE"
1881
- end
1882
-
1883
- # Returns a string representing the name corresponding to the error
1884
- def name
1885
- return "KERNEL_ARG_INFO_NOT_AVAILABLE"
1886
- end
1887
-
1888
- # Returns the code corresponding to this error class
1889
- def self.code
1890
- return -19
1891
- end
1892
-
1893
- end
1894
-
1895
- CLASSES[-19] = KERNEL_ARG_INFO_NOT_AVAILABLE
1896
- KernelArgInfoNotAvailable = KERNEL_ARG_INFO_NOT_AVAILABLE
1897
-
1898
- # Represents the OpenCL CL_DEVICE_PARTITION_FAILED error
1899
- class DEVICE_PARTITION_FAILED < Error
1900
-
1901
- # Initilizes code to -18
1902
- def initialize
1903
- super(-18)
1904
- end
1905
-
1906
- # Returns a string representing the name corresponding to the error classe
1907
- def self.name
1908
- return "DEVICE_PARTITION_FAILED"
1909
- end
1910
-
1911
- # Returns a string representing the name corresponding to the error
1912
- def name
1913
- return "DEVICE_PARTITION_FAILED"
1914
- end
1915
-
1916
- # Returns the code corresponding to this error class
1917
- def self.code
1918
- return -18
1919
- end
1920
-
1921
- end
1922
-
1923
- CLASSES[-18] = DEVICE_PARTITION_FAILED
1924
- DevicePartitionFailed = DEVICE_PARTITION_FAILED
1925
-
1926
- # Represents the OpenCL CL_LINK_PROGRAM_FAILURE error
1927
- class LINK_PROGRAM_FAILURE < Error
1928
-
1929
- # Initilizes code to -17
1930
- def initialize
1931
- super(-17)
1932
- end
1933
-
1934
- # Returns a string representing the name corresponding to the error classe
1935
- def self.name
1936
- return "LINK_PROGRAM_FAILURE"
1937
- end
1938
-
1939
- # Returns a string representing the name corresponding to the error
1940
- def name
1941
- return "LINK_PROGRAM_FAILURE"
1942
- end
1943
-
1944
- # Returns the code corresponding to this error class
1945
- def self.code
1946
- return -17
1947
- end
1948
-
1949
- end
1950
-
1951
- CLASSES[-17] = LINK_PROGRAM_FAILURE
1952
- LinkProgramFailure = LINK_PROGRAM_FAILURE
1953
-
1954
- # Represents the OpenCL CL_LINKER_NOT_AVAILABLE error
1955
- class LINKER_NOT_AVAILABLE < Error
1956
-
1957
- # Initilizes code to -16
1958
- def initialize
1959
- super(-16)
1960
- end
1961
-
1962
- # Returns a string representing the name corresponding to the error classe
1963
- def self.name
1964
- return "LINKER_NOT_AVAILABLE"
1965
- end
1966
-
1967
- # Returns a string representing the name corresponding to the error
1968
- def name
1969
- return "LINKER_NOT_AVAILABLE"
1970
- end
1971
-
1972
- # Returns the code corresponding to this error class
1973
- def self.code
1974
- return -16
1975
- end
1976
-
1977
- end
1978
-
1979
- CLASSES[-16] = LINKER_NOT_AVAILABLE
1980
- LinkerNotAvailable = LINKER_NOT_AVAILABLE
1981
-
1982
- # Represents the OpenCL CL_COMPILE_PROGRAM_FAILURE error
1983
- class COMPILE_PROGRAM_FAILURE < Error
1984
-
1985
- # Initilizes code to -15
1986
- def initialize
1987
- super(-15)
1988
- end
1989
-
1990
- # Returns a string representing the name corresponding to the error classe
1991
- def self.name
1992
- return "COMPILE_PROGRAM_FAILURE"
1993
- end
1994
-
1995
- # Returns a string representing the name corresponding to the error
1996
- def name
1997
- return "COMPILE_PROGRAM_FAILURE"
1998
- end
1999
-
2000
- # Returns the code corresponding to this error class
2001
- def self.code
2002
- return -15
2003
- end
525
+ return #{OpenCL::const_get(name)}
526
+ end
527
+
528
+ end
529
+
530
+ CLASSES[#{OpenCL::const_get(name)}] = #{name}
531
+ #{capitalized_name} = #{name}
532
+ EOF
533
+ end
534
+
535
+ [
536
+ [:DEVICE_NOT_FOUND, :DeviceNotFound],
537
+ [:DEVICE_NOT_AVAILABLE, :DeviceNotAvailable],
538
+ [:COMPILER_NOT_AVAILABLE, :CompilerNotAvailable],
539
+ [:MEM_OBJECT_ALLOCATION_FAILURE, :MemObjectAllocationFailure],
540
+ [:OUT_OF_RESOURCES, :OutOfResources],
541
+ [:OUT_OF_HOST_MEMORY, :OutOfHostMemory],
542
+ [:PROFILING_INFO_NOT_AVAILABLE, :ProfilingInfoNotAvailable],
543
+ [:MEM_COPY_OVERLAP, :MemCopyOverlap],
544
+ [:IMAGE_FORMAT_MISMATCH, :ImageFormatMismatch],
545
+ [:IMAGE_FORMAT_NOT_SUPPORTED, :ImageFormatNotSupported],
546
+ [:BUILD_PROGRAM_FAILURE, :BuildProgramFailure],
547
+ [:MAP_FAILURE, :MapFailure],
548
+ [:MISALIGNED_SUB_BUFFER_OFFSET, :MisalignedSubBufferOffset],
549
+ [:EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST, :ExecStatusErrorForEventsInWaitList],
550
+ [:COMPILE_PROGRAM_FAILURE, :CompileProgramFailure],
551
+ [:LINKER_NOT_AVAILABLE, :LinkerNotAvailable],
552
+ [:LINK_PROGRAM_FAILURE, :LinkProgramFailure],
553
+ [:DEVICE_PARTITION_FAILED, :DevicePartitionFailed],
554
+ [:KERNEL_ARG_INFO_NOT_AVAILABLE, :KernelArgInfoNotAvailable],
555
+ [:INVALID_VALUE, :InvalidValue],
556
+ [:INVALID_DEVICE_TYPE, :InvalidDeviceType],
557
+ [:INVALID_PLATFORM, :InvalidPlatform],
558
+ [:INVALID_DEVICE, :InvalidDevice],
559
+ [:INVALID_CONTEXT, :InvalidContext],
560
+ [:INVALID_QUEUE_PROPERTIES, :InvalidQueueProperties],
561
+ [:INVALID_COMMAND_QUEUE, :InvalidCommandQueue],
562
+ [:INVALID_HOST_PTR, :InvalidHostPtr],
563
+ [:INVALID_MEM_OBJECT, :InvalidMemObject],
564
+ [:INVALID_IMAGE_FORMAT_DESCRIPTOR, :InvalidImageFormatDescriptor],
565
+ [:INVALID_IMAGE_SIZE, :InvalidImageSize],
566
+ [:INVALID_SAMPLER, :InvalidSampler],
567
+ [:INVALID_BINARY, :InvalidBinary],
568
+ [:INVALID_BUILD_OPTIONS, :InvalidBuildOptions],
569
+ [:INVALID_PROGRAM, :InvalidProgram],
570
+ [:INVALID_PROGRAM_EXECUTABLE, :InvalidProgramExecutable],
571
+ [:INVALID_KERNEL_NAME, :InvalidKernelName],
572
+ [:INVALID_KERNEL_DEFINITION, :InvalidKernelDefinition],
573
+ [:INVALID_KERNEL, :InvalidKernel],
574
+ [:INVALID_ARG_INDEX, :InvalidArgIndex],
575
+ [:INVALID_ARG_VALUE, :InvalidArgValue],
576
+ [:INVALID_ARG_SIZE, :InvalidArgSize],
577
+ [:INVALID_KERNEL_ARGS, :InvalidKernelArgs],
578
+ [:INVALID_WORK_DIMENSION, :InvalidWorkDimension],
579
+ [:INVALID_WORK_GROUP_SIZE, :InvalidWorkGroupSize],
580
+ [:INVALID_WORK_ITEM_SIZE, :InvalidWorkItemSize],
581
+ [:INVALID_GLOBAL_OFFSET, :InvalidGlobalOffset],
582
+ [:INVALID_EVENT_WAIT_LIST, :InvalidEventWaitList],
583
+ [:INVALID_EVENT, :InvalidEvent],
584
+ [:INVALID_OPERATION, :InvalidOperation],
585
+ [:INVALID_GL_OBJECT, :InvalidGLObject],
586
+ [:INVALID_BUFFER_SIZE, :InvalidBufferSize],
587
+ [:INVALID_MIP_LEVEL, :InvalidMipLevel],
588
+ [:INVALID_GLOBAL_WORK_SIZE, :InvalidGlobalWorkSize],
589
+ [:INVALID_PROPERTY, :InvalidProperty],
590
+ [:INVALID_IMAGE_DESCRIPTOR, :InvalidImageDescriptor],
591
+ [:INVALID_COMPILER_OPTIONS, :InvalidCompilerOptions],
592
+ [:INVALID_LINKER_OPTIONS, :InvalidLinkerOptions],
593
+ [:INVALID_DEVICE_PARTITION_COUNT, :InvalidDevicePartitionCount],
594
+ [:INVALID_PIPE_SIZE, :InvalidPipeSize],
595
+ [:INVALID_DEVICE_QUEUE, :InvalidDeviceQueue],
596
+ [:INVALID_PARTITION_NAME_EXT, :InvalidPartitionNameEXT]
597
+ ].each { |name, capitalized_name|
598
+ eval error_class_constructor( name, capitalized_name )
599
+ }
2004
600
 
2005
- end
2006
-
2007
- CLASSES[-15] = COMPILE_PROGRAM_FAILURE
2008
- CompileProgramFailure = COMPILE_PROGRAM_FAILURE
2009
-
2010
- # Represents the OpenCL CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST error
2011
- class EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST < Error
2012
-
2013
- # Initilizes code to -14
2014
- def initialize
2015
- super(-14)
2016
- end
2017
-
2018
- # Returns a string representing the name corresponding to the error classe
2019
- def self.name
2020
- return "EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST"
2021
- end
2022
-
2023
- # Returns a string representing the name corresponding to the error
2024
- def name
2025
- return "EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST"
2026
- end
2027
-
2028
- # Returns the code corresponding to this error class
2029
- def self.code
2030
- return -14
2031
- end
2032
-
2033
- end
2034
-
2035
- CLASSES[-14] = EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST
2036
- ExecStatusErrorForEventsInWaitList = EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST
2037
-
2038
- # Represents the OpenCL CL_MISALIGNED_SUB_BUFFER_OFFSET error
2039
- class MISALIGNED_SUB_BUFFER_OFFSET < Error
2040
-
2041
- # Initilizes code to -13
2042
- def initialize
2043
- super(-13)
2044
- end
2045
-
2046
- # Returns a string representing the name corresponding to the error classe
2047
- def self.name
2048
- return "MISALIGNED_SUB_BUFFER_OFFSET"
2049
- end
2050
-
2051
- # Returns a string representing the name corresponding to the error
2052
- def name
2053
- return "MISALIGNED_SUB_BUFFER_OFFSET"
2054
- end
2055
-
2056
- # Returns the code corresponding to this error class
2057
- def self.code
2058
- return -13
2059
- end
2060
-
2061
- end
2062
-
2063
- CLASSES[-13] = MISALIGNED_SUB_BUFFER_OFFSET
2064
- MisalignedSubBufferOffset = MISALIGNED_SUB_BUFFER_OFFSET
2065
-
2066
- # Represents the OpenCL CL_MAP_FAILURE error
2067
- class MAP_FAILURE < Error
2068
-
2069
- # Initilizes code to -12
2070
- def initialize
2071
- super(-12)
2072
- end
2073
-
2074
- # Returns a string representing the name corresponding to the error classe
2075
- def self.name
2076
- return "MAP_FAILURE"
2077
- end
2078
-
2079
- # Returns a string representing the name corresponding to the error
2080
- def name
2081
- return "MAP_FAILURE"
2082
- end
2083
-
2084
- # Returns the code corresponding to this error class
2085
- def self.code
2086
- return -12
2087
- end
2088
-
2089
- end
2090
-
2091
- CLASSES[-12] = MAP_FAILURE
2092
- MapFailure = MAP_FAILURE
2093
-
2094
- # Represents the OpenCL CL_BUILD_PROGRAM_FAILURE error
2095
- class BUILD_PROGRAM_FAILURE < Error
2096
-
2097
- # Initilizes code to -11
2098
- def initialize
2099
- super(-11)
2100
- end
2101
-
2102
- # Returns a string representing the name corresponding to the error classe
2103
- def self.name
2104
- return "BUILD_PROGRAM_FAILURE"
2105
- end
2106
-
2107
- # Returns a string representing the name corresponding to the error
2108
- def name
2109
- return "BUILD_PROGRAM_FAILURE"
2110
- end
2111
-
2112
- # Returns the code corresponding to this error class
2113
- def self.code
2114
- return -11
2115
- end
2116
-
2117
- end
2118
-
2119
- CLASSES[-11] = BUILD_PROGRAM_FAILURE
2120
- BuildProgramFailure = BUILD_PROGRAM_FAILURE
2121
-
2122
- # Represents the OpenCL CL_IMAGE_FORMAT_NOT_SUPPORTED error
2123
- class IMAGE_FORMAT_NOT_SUPPORTED < Error
2124
-
2125
- # Initilizes code to -10
2126
- def initialize
2127
- super(-10)
2128
- end
2129
-
2130
- # Returns a string representing the name corresponding to the error classe
2131
- def self.name
2132
- return "IMAGE_FORMAT_NOT_SUPPORTED"
2133
- end
2134
-
2135
- # Returns a string representing the name corresponding to the error
2136
- def name
2137
- return "IMAGE_FORMAT_NOT_SUPPORTED"
2138
- end
2139
-
2140
- # Returns the code corresponding to this error class
2141
- def self.code
2142
- return -10
2143
- end
2144
-
2145
- end
2146
-
2147
- CLASSES[-10] = IMAGE_FORMAT_NOT_SUPPORTED
2148
- ImageFormatNotSupported = IMAGE_FORMAT_NOT_SUPPORTED
2149
-
2150
- # Represents the OpenCL CL_IMAGE_FORMAT_MISMATCH error
2151
- class IMAGE_FORMAT_MISMATCH < Error
2152
-
2153
- # Initilizes code to -9
2154
- def initialize
2155
- super(-9)
2156
- end
2157
-
2158
- # Returns a string representing the name corresponding to the error classe
2159
- def self.name
2160
- return "IMAGE_FORMAT_MISMATCH"
2161
- end
2162
-
2163
- # Returns a string representing the name corresponding to the error
2164
- def name
2165
- return "IMAGE_FORMAT_MISMATCH"
2166
- end
2167
-
2168
- # Returns the code corresponding to this error class
2169
- def self.code
2170
- return -9
2171
- end
2172
-
2173
- end
2174
-
2175
- CLASSES[-9] = IMAGE_FORMAT_MISMATCH
2176
- ImageFormatMismatch = IMAGE_FORMAT_MISMATCH
2177
-
2178
- # Represents the OpenCL CL_MEM_COPY_OVERLAP error
2179
- class MEM_COPY_OVERLAP < Error
2180
-
2181
- # Initilizes code to -8
2182
- def initialize
2183
- super(-8)
2184
- end
2185
-
2186
- # Returns a string representing the name corresponding to the error classe
2187
- def self.name
2188
- return "MEM_COPY_OVERLAP"
2189
- end
2190
-
2191
- # Returns a string representing the name corresponding to the error
2192
- def name
2193
- return "MEM_COPY_OVERLAP"
2194
- end
2195
-
2196
- # Returns the code corresponding to this error class
2197
- def self.code
2198
- return -8
2199
- end
2200
-
2201
- end
2202
-
2203
- CLASSES[-8] = MEM_COPY_OVERLAP
2204
- MemCopyOverlap = MEM_COPY_OVERLAP
2205
-
2206
- # Represents the OpenCL CL_PROFILING_INFO_NOT_AVAILABLE error
2207
- class PROFILING_INFO_NOT_AVAILABLE < Error
2208
-
2209
- # Initilizes code to -7
2210
- def initialize
2211
- super(-7)
2212
- end
2213
-
2214
- # Returns a string representing the name corresponding to the error classe
2215
- def self.name
2216
- return "PROFILING_INFO_NOT_AVAILABLE"
2217
- end
2218
-
2219
- # Returns a string representing the name corresponding to the error
2220
- def name
2221
- return "PROFILING_INFO_NOT_AVAILABLE"
2222
- end
2223
-
2224
- # Returns the code corresponding to this error class
2225
- def self.code
2226
- return -7
2227
- end
2228
-
2229
- end
2230
-
2231
- CLASSES[-7] = PROFILING_INFO_NOT_AVAILABLE
2232
- ProfilingInfoNotAvailable = PROFILING_INFO_NOT_AVAILABLE
2233
-
2234
- # Represents the OpenCL CL_OUT_OF_HOST_MEMORY error
2235
- class OUT_OF_HOST_MEMORY < Error
2236
-
2237
- # Initilizes code to -6
2238
- def initialize
2239
- super(-6)
2240
- end
2241
-
2242
- # Returns a string representing the name corresponding to the error classe
2243
- def self.name
2244
- return "OUT_OF_HOST_MEMORY"
2245
- end
2246
-
2247
- # Returns a string representing the name corresponding to the error
2248
- def name
2249
- return "OUT_OF_HOST_MEMORY"
2250
- end
2251
-
2252
- # Returns the code corresponding to this error class
2253
- def self.code
2254
- return -6
2255
- end
2256
-
2257
- end
2258
-
2259
- CLASSES[-6] = OUT_OF_HOST_MEMORY
2260
- OutOfHostMemory = OUT_OF_HOST_MEMORY
2261
-
2262
- # Represents the OpenCL CL_OUT_OF_RESOURCES error
2263
- class OUT_OF_RESOURCES < Error
2264
-
2265
- # Initilizes code to -5
2266
- def initialize
2267
- super(-5)
2268
- end
2269
-
2270
- # Returns a string representing the name corresponding to the error classe
2271
- def self.name
2272
- return "OUT_OF_RESOURCES"
2273
- end
2274
-
2275
- # Returns a string representing the name corresponding to the error
2276
- def name
2277
- return "OUT_OF_RESOURCES"
2278
- end
2279
-
2280
- # Returns the code corresponding to this error class
2281
- def self.code
2282
- return -5
2283
- end
2284
-
2285
- end
2286
-
2287
- CLASSES[-5] = OUT_OF_RESOURCES
2288
- OutOfResources = OUT_OF_RESOURCES
2289
-
2290
- # Represents the OpenCL CL_MEM_OBJECT_ALLOCATION_FAILURE error
2291
- class MEM_OBJECT_ALLOCATION_FAILURE < Error
2292
-
2293
- # Initilizes code to -4
2294
- def initialize
2295
- super(-4)
2296
- end
2297
-
2298
- # Returns a string representing the name corresponding to the error classe
2299
- def self.name
2300
- return "MEM_OBJECT_ALLOCATION_FAILURE"
2301
- end
2302
-
2303
- # Returns a string representing the name corresponding to the error
2304
- def name
2305
- return "MEM_OBJECT_ALLOCATION_FAILURE"
2306
- end
2307
-
2308
- # Returns the code corresponding to this error class
2309
- def self.code
2310
- return -4
2311
- end
2312
-
2313
- end
2314
-
2315
- CLASSES[-4] = MEM_OBJECT_ALLOCATION_FAILURE
2316
- MemObjectAllocationFailure = MEM_OBJECT_ALLOCATION_FAILURE
2317
601
  end
2318
602
 
2319
603
  # A parent class to represent OpenCL enums that use :cl_uint
@@ -2379,28 +663,6 @@ module OpenCL
2379
663
  return @val
2380
664
  end
2381
665
 
2382
- # #:stopdoc:
2383
- # def self.to_native(value, context)
2384
- # if value then
2385
- # return value.flags
2386
- # else
2387
- # return 0
2388
- # end
2389
- # end
2390
- #
2391
- # def self.from_native(value, context)
2392
- # new(value)
2393
- # end
2394
- #
2395
- # def self.size
2396
- # find_type(:cl_uint).size
2397
- # end
2398
- #
2399
- # def self.reference_required?
2400
- # return false
2401
- # end
2402
- # #:startdoc:
2403
-
2404
666
  end
2405
667
 
2406
668
  # A parent class to represent enums that use cl_int
@@ -2476,39 +738,56 @@ module OpenCL
2476
738
  @val = val
2477
739
  end
2478
740
 
2479
- # #:stopdoc:
2480
- # def self.to_native(value, context)
2481
- # if value then
2482
- # return value.flags
2483
- # else
2484
- # return 0
2485
- # end
2486
- # end
2487
- #
2488
- # def self.from_native(value, context)
2489
- # new(value)
2490
- # end
2491
- #
2492
- # def self.size
2493
- # find_type(:cl_bitfield).size
2494
- # end
2495
- #
2496
- # def self.reference_required?
2497
- # return false
2498
- # end
2499
- # #:startdoc:
741
+ end
742
+
743
+ class ExtendedStruct < ManagedStruct
744
+
745
+ FORCE_EXTENSIONS_LOADING = ENV['DYNAMIC_EXTENSIONS'] ? false : true
746
+ private_constant :FORCE_EXTENSIONS_LOADING
747
+
748
+ if FORCE_EXTENSIONS_LOADING then
749
+
750
+ # @!macro [attach] register_extension
751
+ # @!parse include $2
752
+ # @private
753
+ def self.register_extension(name, mod, cond)
754
+ self.send(:include, mod)
755
+ end
756
+
757
+ else
758
+
759
+ def initialize(*args)
760
+ super
761
+ self.class.ancestors.each { |klass|
762
+ klass.const_get(:Extensions).each { |name, ext|
763
+ extend ext[0] if eval(ext[1])
764
+ } if klass.const_defined?(:Extensions)
765
+ }
766
+ end
767
+
768
+ def self.inherited(klass)
769
+ klass.const_set(:Extensions, {})
770
+ end
771
+
772
+ # @!macro [attach] register_extension
773
+ # @!parse include $2
774
+ # @private
775
+ def self.register_extension(name, mod, cond)
776
+ self.const_get(:Extensions)[name] = [mod, cond]
777
+ end
778
+
779
+ end
2500
780
 
2501
781
  end
2502
- class Platform < ManagedStruct
782
+
783
+ class Platform < ExtendedStruct
2503
784
  layout :dummy, :pointer
2504
- #:stopdoc:
2505
785
  PROFILE = 0x0900
2506
786
  VERSION = 0x0901
2507
787
  NAME = 0x0902
2508
788
  VENDOR = 0x0903
2509
789
  EXTENSIONS = 0x0904
2510
790
  HOST_TIMER_RESOLUTION = 0x0905
2511
- ICD_SUFFIX_KHR = 0x0920
2512
791
 
2513
792
  # Creates a new Platform and retains it if specified and aplicable
2514
793
  def initialize(ptr, retain = true)
@@ -2517,23 +796,14 @@ module OpenCL
2517
796
  end
2518
797
 
2519
798
  # method called at Platform deletion, releases the object if aplicable
799
+ # @private
2520
800
  def self.release(ptr)
2521
801
  end
2522
- #:startdoc:
2523
-
2524
- def to_s
2525
- if self.respond_to?(:name) then
2526
- return self.name
2527
- else
2528
- return super
2529
- end
2530
- end
2531
802
 
2532
803
  end
2533
804
 
2534
- class Device < ManagedStruct
805
+ class Device < ExtendedStruct
2535
806
  layout :dummy, :pointer
2536
- #:stopdoc:
2537
807
  TYPE_DEFAULT = (1 << 0)
2538
808
  TYPE_CPU = (1 << 1)
2539
809
  TYPE_GPU = (1 << 2)
@@ -2586,11 +856,11 @@ module OpenCL
2586
856
  QUEUE_ON_HOST_PROPERTIES = 0x102A
2587
857
  NAME = 0x102B
2588
858
  VENDOR = 0x102C
859
+ DRIVER_VERSION = 0x102D
2589
860
  PROFILE = 0x102E
2590
861
  VERSION = 0x102F
2591
862
  EXTENSIONS = 0x1030
2592
863
  PLATFORM = 0x1031
2593
- DOUBLE_FP_CONFIG = 0x1032
2594
864
  PREFERRED_VECTOR_WIDTH_HALF = 0x1034
2595
865
  HOST_UNIFIED_MEMORY = 0x1035
2596
866
  NATIVE_VECTOR_WIDTH_CHAR = 0x1036
@@ -2647,49 +917,25 @@ module OpenCL
2647
917
  SVM_FINE_GRAIN_BUFFER = (1 << 1)
2648
918
  SVM_FINE_GRAIN_SYSTEM = (1 << 2)
2649
919
  SVM_ATOMICS = (1 << 3)
2650
- HALF_FP_CONFIG = 0x1033
2651
- TERMINATE_CAPABILITY_KHR = 0x200F
2652
- SPIR_VERSIONS = 0x40E0
2653
- COMPUTE_CAPABILITY_MAJOR_NV = 0x4000
2654
- COMPUTE_CAPABILITY_MINOR_NV = 0x4001
2655
- REGISTERS_PER_BLOCK_NV = 0x4002
2656
- WARP_SIZE_NV = 0x4003
2657
- GPU_OVERLAP_NV = 0x4004
2658
- KERNEL_EXEC_TIMEOUT_NV = 0x4005
2659
- INTEGRATED_MEMORY_NV = 0x4006
2660
- PROFILING_TIMER_OFFSET_AMD = 0x4036
2661
920
  PAGE_SIZE_QCOM = 0x40A1
2662
921
 
2663
922
  # Creates a new Device and retains it if specified and aplicable
2664
923
  def initialize(ptr, retain = true)
2665
924
  super(ptr)
2666
- platform = MemoryPointer::new( Platform )
2667
- OpenCL.clGetDeviceInfo( ptr, OpenCL::Device::PLATFORM, platform.size, platform, nil)
2668
- p = OpenCL::Platform::new(platform.read_pointer)
2669
- if p.version_number >= 1.2 and retain then
925
+ if platform.version_number >= 1.2 and retain then
2670
926
  error = OpenCL.clRetainDevice(ptr)
2671
927
  error_check( error )
2672
928
  end
2673
- #STDERR.puts "Allocating Device: #{ptr}"
2674
929
  end
2675
930
 
2676
931
  # method called at Device deletion, releases the object if aplicable
932
+ # @private
2677
933
  def self.release(ptr)
2678
- platform = MemoryPointer::new( Platform )
2679
- OpenCL.clGetDeviceInfo( ptr, OpenCL::Device::PLATFORM, platform.size, platform, nil)
2680
- p = OpenCL::Platform::new(platform.read_pointer)
2681
- if p.version_number >= 1.2 then
2682
- error = OpenCL.clReleaseDevice(ptr)
2683
- error_check( error )
2684
- end
2685
- end
2686
- #:startdoc:
2687
-
2688
- def to_s
2689
- if self.respond_to?(:name) then
2690
- return self.name
2691
- else
2692
- return super
934
+ plat = FFI::MemoryPointer::new( Platform )
935
+ OpenCL.clGetDeviceInfo( ptr, OpenCL::Device::PLATFORM, plat.size, plat, nil)
936
+ platform = OpenCL::Platform::new(plat.read_pointer)
937
+ if platform.version_number >= 1.2 then
938
+ OpenCL.clReleaseDevice(ptr)
2693
939
  end
2694
940
  end
2695
941
 
@@ -2703,14 +949,16 @@ module OpenCL
2703
949
  BY_COUNTS_LIST_END = 0x0
2704
950
  BY_AFFINITY_DOMAIN = 0x1088
2705
951
  BY_NAMES_EXT = 0x4052
952
+ BY_NAMES_INTEL = 0x4052
2706
953
  BY_NAMES_LIST_END_EXT = -1
954
+ BY_NAMES_LIST_END_INTEL = -1
2707
955
  @codes = {}
2708
956
  @codes[0x1086] = 'EQUALLY'
2709
957
  @codes[0x1087] = 'BY_COUNTS'
2710
958
  @codes[0x0] = 'BY_COUNTS_LIST_END'
2711
959
  @codes[0x1088] = 'BY_AFFINITY_DOMAIN'
2712
- @codes[0x4052] = 'BY_NAMES_EXT'
2713
- @codes[-1] = 'BY_NAMES_LIST_END_EXT'
960
+ @codes[0x4052] = 'BY_NAMES_INTEL'
961
+ @codes[-1] = 'BY_NAMES_LIST_END_INTEL'
2714
962
  end
2715
963
 
2716
964
  # Bitfield that maps the :cl_device_type type
@@ -2820,17 +1068,14 @@ module OpenCL
2820
1068
  end
2821
1069
 
2822
1070
  end
2823
- class Context < ManagedStruct
1071
+ class Context < ExtendedStruct
2824
1072
  layout :dummy, :pointer
2825
- #:stopdoc:
2826
1073
  REFERENCE_COUNT = 0x1080
2827
1074
  DEVICES = 0x1081
2828
1075
  PROPERTIES = 0x1082
2829
1076
  NUM_DEVICES = 0x1083
2830
1077
  PLATFORM = 0x1084
2831
1078
  INTEROP_USER_SYNC = 0x1085
2832
- MEMORY_INITIALIZE_KHR = 0x200E
2833
- TERMINATE_KHR = 0x2010
2834
1079
 
2835
1080
  # Creates a new Context and retains it if specified and aplicable
2836
1081
  def initialize(ptr, retain = true)
@@ -2840,6 +1085,7 @@ module OpenCL
2840
1085
  end
2841
1086
 
2842
1087
  # method called at Context deletion, releases the object if aplicable
1088
+ # @private
2843
1089
  def self.release(ptr)
2844
1090
  #STDERR.puts "Releasing Context: #{ptr}"
2845
1091
  #ref_count = MemoryPointer::new( :cl_uint )
@@ -2849,15 +1095,6 @@ module OpenCL
2849
1095
  #STDERR.puts "Object released! #{error}"
2850
1096
  error_check( error )
2851
1097
  end
2852
- #:startdoc:
2853
-
2854
- def to_s
2855
- if self.respond_to?(:name) then
2856
- return self.name
2857
- else
2858
- return super
2859
- end
2860
- end
2861
1098
 
2862
1099
  end
2863
1100
 
@@ -2865,39 +1102,14 @@ module OpenCL
2865
1102
  class Properties < Enum
2866
1103
  PLATFORM = 0x1084
2867
1104
  INTEROP_USER_SYNC = 0x1085
2868
- D3D10_DEVICE_KHR = 0x4014
2869
- ADAPTER_D3D9_KHR = 0x2025
2870
- ADAPTER_D3D9EX_KHR = 0x2026
2871
- ADAPTER_DXVA_KHR = 0x2027
2872
- GL_CONTEXT_KHR = 0x2008
2873
- CGL_SHAREGROUP_KHR = 0x200C
2874
- EGL_DISPLAY_KHR = 0x2009
2875
- GLX_DISPLAY_KHR = 0x200A
2876
- WGL_HDC_KHR = 0x200B
2877
- D3D11_DEVICE_KHR = 0x401D
2878
- MEMORY_INITIALIZE_KHR = 0x2030
2879
- TERMINATE_KHR = 0x2032
2880
1105
  @codes = {}
2881
1106
  @codes[0x1084] = 'PLATFORM'
2882
1107
  @codes[0x1085] = 'INTEROP_USER_SYNC'
2883
- @codes[0x4014] = 'D3D10_DEVICE_KHR'
2884
- @codes[0x2025] = 'ADAPTER_D3D9_KHR'
2885
- @codes[0x2026] = 'ADAPTER_D3D9EX_KHR'
2886
- @codes[0x2027] = 'ADAPTER_DXVA_KHR'
2887
- @codes[0x2008] = 'GL_CONTEXT_KHR'
2888
- @codes[0x200C] = 'CGL_SHAREGROUP_KHR'
2889
- @codes[0x2009] = 'EGL_DISPLAY_KHR'
2890
- @codes[0x200A] = 'GLX_DISPLAY_KHR'
2891
- @codes[0x200B] = 'WGL_HDC_KHR'
2892
- @codes[0x401D] = 'D3D11_DEVICE_KHR'
2893
- @codes[0x2030] = 'MEMORY_INITIALIZE_KHR'
2894
- @codes[0x2032] = 'TERMINATE_KHR'
2895
1108
  end
2896
1109
  end
2897
1110
 
2898
- class CommandQueue < ManagedStruct
1111
+ class CommandQueue < ExtendedStruct
2899
1112
  layout :dummy, :pointer
2900
- #:stopdoc:
2901
1113
  OUT_OF_ORDER_EXEC_MODE_ENABLE = (1 << 0)
2902
1114
  PROFILING_ENABLE = (1 << 1)
2903
1115
  ON_DEVICE = (1 << 2)
@@ -2908,14 +1120,6 @@ module OpenCL
2908
1120
  PROPERTIES = 0x1093
2909
1121
  SIZE = 0x1094
2910
1122
  DEVICE_DEFAULT = 0x1095
2911
- PRIORITY_KHR = 0x1096
2912
- PRIORITY_HIGH_KHR = (1 << 0)
2913
- PRIORITY_MED_KHR = (1 << 1)
2914
- PRIORITY_LOW_KHR = (1 << 2)
2915
- THROTTLE_KHR = 0x1097
2916
- THROTTLE_HIGH_KHR = (1 << 0)
2917
- THROTTLE_MED_KHR = (1 << 1)
2918
- THROTTLE_LOW_KHR = (1 << 2)
2919
1123
  # Creates a new CommandQueue and retains it if specified and aplicable
2920
1124
  def initialize(ptr, retain = true)
2921
1125
  super(ptr)
@@ -2924,6 +1128,7 @@ module OpenCL
2924
1128
  end
2925
1129
 
2926
1130
  # method called at CommandQueue deletion, releases the object if aplicable
1131
+ # @private
2927
1132
  def self.release(ptr)
2928
1133
  #STDERR.puts "Releasing CommandQueue: #{ptr}"
2929
1134
  #ref_count = MemoryPointer::new( :cl_uint )
@@ -2933,15 +1138,6 @@ module OpenCL
2933
1138
  #STDERR.puts "Object released! #{error}"
2934
1139
  error_check( error )
2935
1140
  end
2936
- #:startdoc:
2937
-
2938
- def to_s
2939
- if self.respond_to?(:name) then
2940
- return self.name
2941
- else
2942
- return super
2943
- end
2944
- end
2945
1141
 
2946
1142
  end
2947
1143
 
@@ -2961,29 +1157,9 @@ module OpenCL
2961
1157
  end
2962
1158
  end
2963
1159
 
2964
- class PriorityKHR < Enum
2965
- PRIORITY_HIGH_KHR = (1 << 0)
2966
- PRIORITY_MED_KHR = (1 << 1)
2967
- PRIORITY_LOW_KHR = (1 << 2)
2968
- @codes = {}
2969
- @codes[(1 << 0)] = 'PRIORITY_HIGH_KHR'
2970
- @codes[(1 << 1)] = 'PRIORITY_MED_KHR'
2971
- @codes[(1 << 2)] = 'PRIORITY_LOW_KHR'
2972
- end
2973
-
2974
- class ThrottleKHR < Enum
2975
- THROTTLE_HIGH_KHR = (1 << 0)
2976
- THROTTLE_MED_KHR = (1 << 1)
2977
- THROTTLE_LOW_KHR = (1 << 2)
2978
- @codes = {}
2979
- @codes[(1 << 0)] = 'THROTTLE_HIGH_KHR'
2980
- @codes[(1 << 1)] = 'THROTTLE_MED_KHR'
2981
- @codes[(1 << 2)] = 'THROTTLE_LOW_KHR'
2982
- end
2983
1160
  end
2984
- class Mem < ManagedStruct
1161
+ class Mem < ExtendedStruct
2985
1162
  layout :dummy, :pointer
2986
- #:stopdoc:
2987
1163
  READ_WRITE = (1 << 0)
2988
1164
  WRITE_ONLY = (1 << 1)
2989
1165
  READ_ONLY = (1 << 2)
@@ -3028,6 +1204,7 @@ module OpenCL
3028
1204
  end
3029
1205
 
3030
1206
  # method called at Mem deletion, releases the object if aplicable
1207
+ # @private
3031
1208
  def self.release(ptr)
3032
1209
  #STDERR.puts "Releasing Mem: #{ptr}"
3033
1210
  #ref_count = MemoryPointer::new( :cl_uint )
@@ -3037,15 +1214,6 @@ module OpenCL
3037
1214
  #STDERR.puts "Object released! #{error}"
3038
1215
  error_check( error )
3039
1216
  end
3040
- #:startdoc:
3041
-
3042
- def to_s
3043
- if self.respond_to?(:name) then
3044
- return self.name
3045
- else
3046
- return super
3047
- end
3048
- end
3049
1217
 
3050
1218
  end
3051
1219
 
@@ -3127,9 +1295,8 @@ module OpenCL
3127
1295
  end
3128
1296
 
3129
1297
  end
3130
- class Program < ManagedStruct
1298
+ class Program < ExtendedStruct
3131
1299
  layout :dummy, :pointer
3132
- #:stopdoc:
3133
1300
  REFERENCE_COUNT = 0x1160
3134
1301
  CONTEXT = 0x1161
3135
1302
  NUM_DEVICES = 0x1162
@@ -3149,7 +1316,6 @@ module OpenCL
3149
1316
  BINARY_TYPE_COMPILED_OBJECT = 0x1
3150
1317
  BINARY_TYPE_LIBRARY = 0x2
3151
1318
  BINARY_TYPE_EXECUTABLE = 0x4
3152
- BINARY_TYPE_INTERMEDIATE = 0x40E1
3153
1319
 
3154
1320
  # Creates a new Program and retains it if specified and aplicable
3155
1321
  def initialize(ptr, retain = true)
@@ -3159,6 +1325,7 @@ module OpenCL
3159
1325
  end
3160
1326
 
3161
1327
  # method called at Program deletion, releases the object if aplicable
1328
+ # @private
3162
1329
  def self.release(ptr)
3163
1330
  #STDERR.puts "Releasing Program: #{ptr}"
3164
1331
  #ref_count = MemoryPointer::new( :cl_uint )
@@ -3168,15 +1335,6 @@ module OpenCL
3168
1335
  #STDERR.puts "Object released! #{error}"
3169
1336
  error_check( error )
3170
1337
  end
3171
- #:startdoc:
3172
-
3173
- def to_s
3174
- if self.respond_to?(:name) then
3175
- return self.name
3176
- else
3177
- return super
3178
- end
3179
- end
3180
1338
 
3181
1339
  end
3182
1340
 
@@ -3187,19 +1345,16 @@ module OpenCL
3187
1345
  COMPILED_OBJECT = 0x1
3188
1346
  LIBRARY = 0x2
3189
1347
  EXECUTABLE = 0x4
3190
- INTERMEDIATE = 0x40E1
3191
1348
  @codes = {}
3192
1349
  @codes[0x0] = 'NONE'
3193
1350
  @codes[0x1] = 'COMPILED_OBJECT'
3194
1351
  @codes[0x2] = 'LIBRARY'
3195
1352
  @codes[0x4] = 'EXECUTABLE'
3196
- @codes[0x40E1] = 'INTERMEDIATE'
3197
1353
  end
3198
1354
 
3199
1355
  end
3200
- class Kernel < ManagedStruct
1356
+ class Kernel < ExtendedStruct
3201
1357
  layout :dummy, :pointer
3202
- #:stopdoc:
3203
1358
  FUNCTION_NAME = 0x1190
3204
1359
  NUM_ARGS = 0x1191
3205
1360
  REFERENCE_COUNT = 0x1192
@@ -3246,6 +1401,7 @@ module OpenCL
3246
1401
  end
3247
1402
 
3248
1403
  # method called at Kernel deletion, releases the object if aplicable
1404
+ # @private
3249
1405
  def self.release(ptr)
3250
1406
  #STDERR.puts "Releasing Kernel: #{ptr}"
3251
1407
  #ref_count = MemoryPointer::new( :cl_uint )
@@ -3255,15 +1411,6 @@ module OpenCL
3255
1411
  #STDERR.puts "Object released! #{error}"
3256
1412
  error_check( error )
3257
1413
  end
3258
- #:startdoc:
3259
-
3260
- def to_s
3261
- if self.respond_to?(:name) then
3262
- return self.name
3263
- else
3264
- return super
3265
- end
3266
- end
3267
1414
 
3268
1415
  end
3269
1416
 
@@ -3336,9 +1483,8 @@ module OpenCL
3336
1483
 
3337
1484
  end
3338
1485
  end
3339
- class Event < ManagedStruct
1486
+ class Event < ExtendedStruct
3340
1487
  layout :dummy, :pointer
3341
- #:stopdoc:
3342
1488
  COMMAND_QUEUE = 0x11D0
3343
1489
  COMMAND_TYPE = 0x11D1
3344
1490
  REFERENCE_COUNT = 0x11D2
@@ -3353,6 +1499,7 @@ module OpenCL
3353
1499
  end
3354
1500
 
3355
1501
  # method called at Event deletion, releases the object if aplicable
1502
+ # @private
3356
1503
  def self.release(ptr)
3357
1504
  #STDERR.puts "Releasing Event: #{ptr}"
3358
1505
  #ref_count = MemoryPointer::new( :cl_uint )
@@ -3362,21 +1509,11 @@ module OpenCL
3362
1509
  #STDERR.puts "Object released! #{error}"
3363
1510
  error_check( error )
3364
1511
  end
3365
- #:startdoc:
3366
-
3367
- def to_s
3368
- if self.respond_to?(:name) then
3369
- return self.name
3370
- else
3371
- return super
3372
- end
3373
- end
3374
1512
 
3375
1513
  end
3376
1514
 
3377
- class Sampler < ManagedStruct
1515
+ class Sampler < ExtendedStruct
3378
1516
  layout :dummy, :pointer
3379
- #:stopdoc:
3380
1517
  REFERENCE_COUNT = 0x1150
3381
1518
  CONTEXT = 0x1151
3382
1519
  NORMALIZED_COORDS = 0x1152
@@ -3394,6 +1531,7 @@ module OpenCL
3394
1531
  end
3395
1532
 
3396
1533
  # method called at Sampler deletion, releases the object if aplicable
1534
+ # @private
3397
1535
  def self.release(ptr)
3398
1536
  #STDERR.puts "Releasing Sampler: #{ptr}"
3399
1537
  #ref_count = MemoryPointer::new( :cl_uint )
@@ -3403,20 +1541,10 @@ module OpenCL
3403
1541
  #STDERR.puts "Object released! #{error}"
3404
1542
  error_check( error )
3405
1543
  end
3406
- #:startdoc:
3407
-
3408
- def to_s
3409
- if self.respond_to?(:name) then
3410
- return self.name
3411
- else
3412
- return super
3413
- end
3414
- end
3415
1544
 
3416
1545
  end
3417
- class GLsync < ManagedStruct
1546
+ class GLsync < ExtendedStruct
3418
1547
  layout :dummy, :pointer
3419
- #:stopdoc:
3420
1548
 
3421
1549
 
3422
1550
  # Creates a new GLsync and retains it if specified and aplicable
@@ -3426,17 +1554,9 @@ module OpenCL
3426
1554
  end
3427
1555
 
3428
1556
  # method called at GLsync deletion, releases the object if aplicable
1557
+ # @private
3429
1558
  def self.release(ptr)
3430
1559
  end
3431
- #:startdoc:
3432
-
3433
- def to_s
3434
- if self.respond_to?(:name) then
3435
- return self.name
3436
- else
3437
- return super
3438
- end
3439
- end
3440
1560
 
3441
1561
  end
3442
1562
 
@@ -3603,16 +1723,6 @@ module OpenCL
3603
1723
  SVM_MEMFILL = 0x120B
3604
1724
  SVM_MAP = 0x120C
3605
1725
  SVM_UNMAP = 0x120D
3606
- GL_FENCE_SYNC_OBJECT_KHR = 0x200D
3607
- ACQUIRE_DX9_MEDIA_SURFACES_KHR = 0x202B
3608
- RELEASE_DX9_MEDIA_SURFACES_KHR = 0x202C
3609
- EGL_FENCE_SYNC_OBJECT_KHR = 0x202F
3610
- ACQUIRE_EGL_OBJECTS_KHR = 0x202D
3611
- RELEASE_EGL_OBJECTS_KHR = 0x202E
3612
- ACQUIRE_D3D10_OBJECTS_KHR = 0x4017
3613
- RELEASE_D3D10_OBJECTS_KHR = 0x4018
3614
- ACQUIRE_D3D11_OBJECTS_KHR = 0x4020
3615
- RELEASE_D3D11_OBJECTS_KHR = 0x4021
3616
1726
  @codes = {}
3617
1727
  @codes[0x11F0] = 'NDRANGE_KERNEL'
3618
1728
  @codes[0x11F1] = 'TASK'
@@ -3644,16 +1754,6 @@ module OpenCL
3644
1754
  @codes[0x120B] = 'SVM_MEMFILL'
3645
1755
  @codes[0x120C] = 'SVM_MAP'
3646
1756
  @codes[0x120D] = 'SVM_UNMAP'
3647
- @codes[0x200D] = 'GL_FENCE_SYNC_OBJECT_KHR'
3648
- @codes[0x202B] = 'ACQUIRE_DX9_MEDIA_SURFACES_KHR'
3649
- @codes[0x202C] = 'RELEASE_DX9_MEDIA_SURFACES_KHR'
3650
- @codes[0x202F] = 'EGL_FENCE_SYNC_OBJECT_KHR'
3651
- @codes[0x202D] = 'ACQUIRE_EGL_OBJECTS_KHR'
3652
- @codes[0x202E] = 'RELEASE_EGL_OBJECTS_KHR'
3653
- @codes[0x4017] = 'ACQUIRE_D3D10_OBJECTS_KHR'
3654
- @codes[0x4018] = 'RELEASE_D3D10_OBJECTS_KHR'
3655
- @codes[0x4020] = 'ACQUIRE_D3D11_OBJECTS_KHR'
3656
- @codes[0x4021] = 'RELEASE_D3D11_OBJECTS_KHR'
3657
1757
  end
3658
1758
 
3659
1759
  # Enum that maps the :cl_gl_object_type type
@@ -3705,7 +1805,6 @@ module OpenCL
3705
1805
 
3706
1806
  class Image < Mem
3707
1807
  layout :dummy, :pointer
3708
- #:stopdoc:
3709
1808
  FORMAT_MISMATCH = -9
3710
1809
  FORMAT_NOT_SUPPORTED = -10
3711
1810
  FORMAT = 0x1110
@@ -3721,14 +1820,11 @@ module OpenCL
3721
1820
  NUM_SAMPLES = 0x111A
3722
1821
  ROW_ALIGNMENT_QCOM = 0x40A2
3723
1822
  SLICE_ALIGNMENT_QCOM = 0x40A3
3724
- #:startdoc:
3725
1823
  end
3726
1824
  class Pipe < Mem
3727
1825
  layout :dummy, :pointer
3728
- #:stopdoc:
3729
1826
  PACKET_SIZE = 0x1120
3730
1827
  MAX_PACKETS = 0x1121
3731
- #:startdoc:
3732
1828
  end
3733
1829
  attach_function :clGetPlatformIDs, [:cl_uint,:pointer,:pointer], :cl_int
3734
1830
  attach_function :clGetPlatformInfo, [Platform,:cl_platform_info,:size_t,:pointer,:pointer], :cl_int
@@ -3745,14 +1841,11 @@ module OpenCL
3745
1841
  attach_function :clReleaseCommandQueue, [CommandQueue], :cl_int
3746
1842
  attach_function :clGetCommandQueueInfo, [CommandQueue,:cl_command_queue_info,:size_t,:pointer,:pointer], :cl_int
3747
1843
  attach_function :clCreateBuffer, [Context,:cl_mem_flags,:size_t,:pointer,:pointer], Mem
3748
- attach_function :clCreateSubBuffer, [Mem,:cl_mem_flags,:cl_buffer_create_type,:pointer,:pointer], Mem
3749
1844
  attach_function :clRetainMemObject, [Mem], :cl_int
3750
1845
  attach_function :clReleaseMemObject, [Mem], :cl_int
3751
1846
  attach_function :clGetSupportedImageFormats, [Context,:cl_mem_flags,:cl_mem_object_type,:cl_uint,:pointer,:pointer], :cl_int
3752
1847
  attach_function :clGetMemObjectInfo, [Mem,:cl_mem_info,:size_t,:pointer,:pointer], :cl_int
3753
1848
  attach_function :clGetImageInfo, [Mem,:cl_image_info,:size_t,:pointer,:pointer], :cl_int
3754
- callback :clSetMemObjectDestructorCallback_notify, [:pointer,:pointer], :void
3755
- attach_function :clSetMemObjectDestructorCallback, [Mem,:clSetMemObjectDestructorCallback_notify,:pointer], :cl_int
3756
1849
  attach_function :clRetainSampler, [Sampler], :cl_int
3757
1850
  attach_function :clReleaseSampler, [Sampler], :cl_int
3758
1851
  attach_function :clGetSamplerInfo, [Sampler,:cl_sampler_info,:size_t,:pointer,:pointer], :cl_int
@@ -3773,21 +1866,14 @@ module OpenCL
3773
1866
  attach_function :clGetKernelWorkGroupInfo, [Kernel,Device,:cl_kernel_work_group_info,:size_t,:pointer,:pointer], :cl_int
3774
1867
  attach_function :clWaitForEvents, [:cl_uint,:pointer], :cl_int
3775
1868
  attach_function :clGetEventInfo, [Event,:cl_event_info,:size_t,:pointer,:pointer], :cl_int
3776
- attach_function :clCreateUserEvent, [Context,:pointer], Event
3777
1869
  attach_function :clRetainEvent, [Event], :cl_int
3778
1870
  attach_function :clReleaseEvent, [Event], :cl_int
3779
- attach_function :clSetUserEventStatus, [Event,:cl_int], :cl_int
3780
- callback :clSetEventCallback_notify, [Event.by_ref,:cl_int,:pointer], :void
3781
- attach_function :clSetEventCallback, [Event,:cl_int,:clSetEventCallback_notify,:pointer], :cl_int
3782
1871
  attach_function :clGetEventProfilingInfo, [Event,:cl_profiling_info,:size_t,:pointer,:pointer], :cl_int
3783
1872
  attach_function :clFlush, [CommandQueue], :cl_int
3784
1873
  attach_function :clFinish, [CommandQueue], :cl_int
3785
1874
  attach_function :clEnqueueReadBuffer, [CommandQueue,Mem,:cl_bool,:size_t,:size_t,:pointer,:cl_uint,:pointer,:pointer], :cl_int
3786
- attach_function :clEnqueueReadBufferRect, [CommandQueue,Mem,:cl_bool,:pointer,:pointer,:pointer,:size_t,:size_t,:size_t,:size_t,:pointer,:cl_uint,:pointer,:pointer], :cl_int
3787
1875
  attach_function :clEnqueueWriteBuffer, [CommandQueue,Mem,:cl_bool,:size_t,:size_t,:pointer,:cl_uint,:pointer,:pointer], :cl_int
3788
- attach_function :clEnqueueWriteBufferRect, [CommandQueue,Mem,:cl_bool,:pointer,:pointer,:pointer,:size_t,:size_t,:size_t,:size_t,:pointer,:cl_uint,:pointer,:pointer], :cl_int
3789
1876
  attach_function :clEnqueueCopyBuffer, [CommandQueue,Mem,Mem,:size_t,:size_t,:size_t,:cl_uint,:pointer,:pointer], :cl_int
3790
- attach_function :clEnqueueCopyBufferRect, [CommandQueue,Mem,Mem,:pointer,:pointer,:pointer,:size_t,:size_t,:size_t,:size_t,:cl_uint,:pointer,:pointer], :cl_int
3791
1877
  attach_function :clEnqueueReadImage, [CommandQueue,Mem,:cl_bool,:pointer,:pointer,:size_t,:size_t,:pointer,:cl_uint,:pointer,:pointer], :cl_int
3792
1878
  attach_function :clEnqueueWriteImage, [CommandQueue,Mem,:cl_bool,:pointer,:pointer,:size_t,:size_t,:pointer,:cl_uint,:pointer,:pointer], :cl_int
3793
1879
  attach_function :clEnqueueCopyImage, [CommandQueue,Mem,Mem,:pointer,:pointer,:pointer,:cl_uint,:pointer,:pointer], :cl_int
@@ -3817,55 +1903,69 @@ module OpenCL
3817
1903
  attach_function :clEnqueueReleaseGLObjects, [CommandQueue,:cl_uint,:pointer,:cl_uint,:pointer,:pointer], :cl_int
3818
1904
  attach_function :clCreateFromGLTexture2D, [Context,:cl_mem_flags,:cl_GLenum,:cl_GLint,:cl_GLuint,:pointer], Mem
3819
1905
  attach_function :clCreateFromGLTexture3D, [Context,:cl_mem_flags,:cl_GLenum,:cl_GLint,:cl_GLuint,:pointer], Mem
3820
- begin
3821
- attach_function :clCreateSubDevices, [Device,:pointer,:cl_uint,:pointer,:pointer], :cl_int
3822
- attach_function :clRetainDevice, [Device], :cl_int
3823
- attach_function :clReleaseDevice, [Device], :cl_int
3824
- attach_function :clCreateImage, [Context,:cl_mem_flags,:pointer,:pointer,:pointer,:pointer], Mem
3825
- attach_function :clCreateProgramWithBuiltInKernels, [Context,:cl_uint,:pointer,:pointer,:pointer], Program
3826
- callback :clCompileProgram_notify, [Program.by_ref,:pointer], :void
3827
- attach_function :clCompileProgram, [Program,:cl_uint,:pointer,:pointer,:cl_uint,:pointer,:pointer,:clCompileProgram_notify,:pointer], :cl_int
3828
- callback :clLinkProgram_notify, [Program.by_ref,:pointer], :void
3829
- attach_function :clLinkProgram, [Context,:cl_uint,:pointer,:pointer,:cl_uint,:pointer,:clLinkProgram_notify,:pointer,:pointer], Program
3830
- attach_function :clUnloadPlatformCompiler, [Platform], :cl_int
3831
- attach_function :clGetKernelArgInfo, [Kernel,:cl_uint,:cl_kernel_arg_info,:size_t,:pointer,:pointer], :cl_int
3832
- attach_function :clEnqueueFillBuffer, [CommandQueue,Mem,:pointer,:size_t,:size_t,:size_t,:cl_uint,:pointer,:pointer], :cl_int
3833
- attach_function :clEnqueueFillImage, [CommandQueue,Mem,:pointer,:pointer,:pointer,:cl_uint,:pointer,:pointer], :cl_int
3834
- attach_function :clEnqueueMigrateMemObjects, [CommandQueue,:cl_uint,:pointer,:cl_mem_migration_flags,:cl_uint,:pointer,:pointer], :cl_int
3835
- attach_function :clEnqueueMarkerWithWaitList, [CommandQueue,:cl_uint,:pointer,:pointer], :cl_int
3836
- attach_function :clEnqueueBarrierWithWaitList, [CommandQueue,:cl_uint,:pointer,:pointer], :cl_int
3837
- attach_function :clGetExtensionFunctionAddressForPlatform, [Platform,:pointer], :pointer
3838
- attach_function :clCreateFromGLTexture, [Context,:cl_mem_flags,:cl_GLenum,:cl_GLint,:cl_GLuint,:pointer], Mem
3839
- begin
3840
- attach_function :clCreateCommandQueueWithProperties, [Context,Device,:pointer,:pointer], CommandQueue
3841
- attach_function :clCreatePipe, [Context,:cl_mem_flags,:cl_uint,:cl_uint,:pointer,:pointer], Mem
3842
- attach_function :clGetPipeInfo, [Mem,:cl_pipe_info,:size_t,:pointer,:pointer], :cl_int
3843
- attach_function :clSVMAlloc, [Context,:cl_svm_mem_flags,:size_t,:cl_uint], :pointer
3844
- attach_function :clSVMFree, [Context,:pointer], :void
3845
- attach_function :clCreateSamplerWithProperties, [Context,:pointer,:pointer], Sampler
3846
- attach_function :clSetKernelArgSVMPointer, [Kernel,:cl_uint,:pointer], :cl_int
3847
- attach_function :clSetKernelExecInfo, [Kernel,:cl_kernel_exec_info,:size_t,:pointer], :cl_int
3848
- callback :clEnqueueSVMFree_notify, [CommandQueue.by_ref,:cl_uint,:pointer,:pointer], :void
3849
- attach_function :clEnqueueSVMFree, [CommandQueue,:cl_uint,:pointer,:clEnqueueSVMFree_notify,:pointer,:cl_uint,:pointer,:pointer], :cl_int
3850
- attach_function :clEnqueueSVMMemcpy, [CommandQueue,:cl_bool,:pointer,:pointer,:size_t,:cl_uint,:pointer,:pointer], :cl_int
3851
- attach_function :clEnqueueSVMMemFill, [CommandQueue,:pointer,:pointer,:size_t,:size_t,:cl_uint,:pointer,:pointer], :cl_int
3852
- attach_function :clEnqueueSVMMap, [CommandQueue,:cl_bool,:cl_map_flags,:pointer,:size_t,:cl_uint,:pointer,:pointer], :cl_int
3853
- attach_function :clEnqueueSVMUnmap, [CommandQueue,:pointer,:cl_uint,:pointer,:pointer], :cl_int
3854
- begin
3855
- attach_function :clSetDefaultDeviceCommandQueue, [Context,Device,CommandQueue], :cl_int
3856
- attach_function :clGetDeviceAndHostTimer, [Device,:pointer,:pointer], :cl_int
3857
- attach_function :clGetHostTimer, [Device,:pointer], :cl_int
3858
- attach_function :clCreateProgramWithIL, [Context,:pointer,:size_t,:pointer], Program
3859
- attach_function :clCloneKernel, [Kernel,:pointer], Kernel
3860
- attach_function :clGetKernelSubGroupInfo, [Kernel,Device,:cl_kernel_sub_group_info,:size_t,:pointer,:size_t,:pointer,:pointer], :cl_int
3861
- attach_function :clEnqueueSVMMigrateMem, [CommandQueue,:cl_uint,:pointer,:pointer,:cl_mem_migration_flags,:cl_uint,:pointer,:pointer], :cl_int
1906
+ begin # OpenCL 1.1
1907
+ attach_function :clCreateSubBuffer, [Mem,:cl_mem_flags,:cl_buffer_create_type,:pointer,:pointer], Mem
1908
+ attach_function :clEnqueueReadBufferRect, [CommandQueue,Mem,:cl_bool,:pointer,:pointer,:pointer,:size_t,:size_t,:size_t,:size_t,:pointer,:cl_uint,:pointer,:pointer], :cl_int
1909
+ attach_function :clEnqueueWriteBufferRect, [CommandQueue,Mem,:cl_bool,:pointer,:pointer,:pointer,:size_t,:size_t,:size_t,:size_t,:pointer,:cl_uint,:pointer,:pointer], :cl_int
1910
+ attach_function :clEnqueueCopyBufferRect, [CommandQueue,Mem,Mem,:pointer,:pointer,:pointer,:size_t,:size_t,:size_t,:size_t,:cl_uint,:pointer,:pointer], :cl_int
1911
+ callback :clSetMemObjectDestructorCallback_notify, [:pointer,:pointer], :void
1912
+ attach_function :clSetMemObjectDestructorCallback, [Mem,:clSetMemObjectDestructorCallback_notify,:pointer], :cl_int
1913
+ attach_function :clCreateUserEvent, [Context,:pointer], Event
1914
+ attach_function :clSetUserEventStatus, [Event,:cl_int], :cl_int
1915
+ callback :clSetEventCallback_notify, [Event.by_ref,:cl_int,:pointer], :void
1916
+ attach_function :clSetEventCallback, [Event,:cl_int,:clSetEventCallback_notify,:pointer], :cl_int
1917
+ begin # OpenCL 1.2
1918
+ attach_function :clCreateSubDevices, [Device,:pointer,:cl_uint,:pointer,:pointer], :cl_int
1919
+ attach_function :clRetainDevice, [Device], :cl_int
1920
+ attach_function :clReleaseDevice, [Device], :cl_int
1921
+ attach_function :clCreateImage, [Context,:cl_mem_flags,:pointer,:pointer,:pointer,:pointer], Mem
1922
+ attach_function :clCreateProgramWithBuiltInKernels, [Context,:cl_uint,:pointer,:pointer,:pointer], Program
1923
+ callback :clCompileProgram_notify, [Program.by_ref,:pointer], :void
1924
+ attach_function :clCompileProgram, [Program,:cl_uint,:pointer,:pointer,:cl_uint,:pointer,:pointer,:clCompileProgram_notify,:pointer], :cl_int
1925
+ callback :clLinkProgram_notify, [Program.by_ref,:pointer], :void
1926
+ attach_function :clLinkProgram, [Context,:cl_uint,:pointer,:pointer,:cl_uint,:pointer,:clLinkProgram_notify,:pointer,:pointer], Program
1927
+ attach_function :clUnloadPlatformCompiler, [Platform], :cl_int
1928
+ attach_function :clGetKernelArgInfo, [Kernel,:cl_uint,:cl_kernel_arg_info,:size_t,:pointer,:pointer], :cl_int
1929
+ attach_function :clEnqueueFillBuffer, [CommandQueue,Mem,:pointer,:size_t,:size_t,:size_t,:cl_uint,:pointer,:pointer], :cl_int
1930
+ attach_function :clEnqueueFillImage, [CommandQueue,Mem,:pointer,:pointer,:pointer,:cl_uint,:pointer,:pointer], :cl_int
1931
+ attach_function :clEnqueueMigrateMemObjects, [CommandQueue,:cl_uint,:pointer,:cl_mem_migration_flags,:cl_uint,:pointer,:pointer], :cl_int
1932
+ attach_function :clEnqueueMarkerWithWaitList, [CommandQueue,:cl_uint,:pointer,:pointer], :cl_int
1933
+ attach_function :clEnqueueBarrierWithWaitList, [CommandQueue,:cl_uint,:pointer,:pointer], :cl_int
1934
+ attach_function :clGetExtensionFunctionAddressForPlatform, [Platform,:pointer], :pointer
1935
+ attach_function :clCreateFromGLTexture, [Context,:cl_mem_flags,:cl_GLenum,:cl_GLint,:cl_GLuint,:pointer], Mem
1936
+ begin # OpenCL 2.0
1937
+ attach_function :clCreateCommandQueueWithProperties, [Context,Device,:pointer,:pointer], CommandQueue
1938
+ attach_function :clCreatePipe, [Context,:cl_mem_flags,:cl_uint,:cl_uint,:pointer,:pointer], Mem
1939
+ attach_function :clGetPipeInfo, [Mem,:cl_pipe_info,:size_t,:pointer,:pointer], :cl_int
1940
+ attach_function :clSVMAlloc, [Context,:cl_svm_mem_flags,:size_t,:cl_uint], :pointer
1941
+ attach_function :clSVMFree, [Context,:pointer], :void
1942
+ attach_function :clCreateSamplerWithProperties, [Context,:pointer,:pointer], Sampler
1943
+ attach_function :clSetKernelArgSVMPointer, [Kernel,:cl_uint,:pointer], :cl_int
1944
+ attach_function :clSetKernelExecInfo, [Kernel,:cl_kernel_exec_info,:size_t,:pointer], :cl_int
1945
+ callback :clEnqueueSVMFree_notify, [CommandQueue.by_ref,:cl_uint,:pointer,:pointer], :void
1946
+ attach_function :clEnqueueSVMFree, [CommandQueue,:cl_uint,:pointer,:clEnqueueSVMFree_notify,:pointer,:cl_uint,:pointer,:pointer], :cl_int
1947
+ attach_function :clEnqueueSVMMemcpy, [CommandQueue,:cl_bool,:pointer,:pointer,:size_t,:cl_uint,:pointer,:pointer], :cl_int
1948
+ attach_function :clEnqueueSVMMemFill, [CommandQueue,:pointer,:pointer,:size_t,:size_t,:cl_uint,:pointer,:pointer], :cl_int
1949
+ attach_function :clEnqueueSVMMap, [CommandQueue,:cl_bool,:cl_map_flags,:pointer,:size_t,:cl_uint,:pointer,:pointer], :cl_int
1950
+ attach_function :clEnqueueSVMUnmap, [CommandQueue,:pointer,:cl_uint,:pointer,:pointer], :cl_int
1951
+ begin # OpenCL 2.1
1952
+ attach_function :clSetDefaultDeviceCommandQueue, [Context,Device,CommandQueue], :cl_int
1953
+ attach_function :clGetDeviceAndHostTimer, [Device,:pointer,:pointer], :cl_int
1954
+ attach_function :clGetHostTimer, [Device,:pointer], :cl_int
1955
+ attach_function :clCreateProgramWithIL, [Context,:pointer,:size_t,:pointer], Program
1956
+ attach_function :clCloneKernel, [Kernel,:pointer], Kernel
1957
+ attach_function :clGetKernelSubGroupInfo, [Kernel,Device,:cl_kernel_sub_group_info,:size_t,:pointer,:size_t,:pointer,:pointer], :cl_int
1958
+ attach_function :clEnqueueSVMMigrateMem, [CommandQueue,:cl_uint,:pointer,:pointer,:cl_mem_migration_flags,:cl_uint,:pointer,:pointer], :cl_int
1959
+ rescue NotFoundError => e
1960
+ warn "Warning OpenCL 2.0 loader detected!"
1961
+ end
3862
1962
  rescue NotFoundError => e
3863
- warn "Warning OpenCL 2.0 loader detected!"
1963
+ warn "Warning OpenCL 1.2 loader detected!"
3864
1964
  end
3865
1965
  rescue NotFoundError => e
3866
- warn "Warning OpenCL 1.2 loader detected!"
1966
+ warn "Warning OpenCL 1.1 loader detected!"
3867
1967
  end
3868
1968
  rescue NotFoundError => e
3869
- warn "Warning OpenCL 1.1 loader detected!"
1969
+ warn "Warning OpenCL 1.0 loader detected!"
3870
1970
  end
3871
1971
  end