opencl_ruby_ffi 0.992 → 0.993

Sign up to get free protection for your applications and to get access to all the features.
@@ -62,7 +62,7 @@ module OpenCL
62
62
  end
63
63
 
64
64
  # Maps the cl_mem OpenCL object of type CL_MEM_OBJECT_BUFFER
65
- class Buffer < OpenCL::Mem
65
+ class Buffer < Mem
66
66
  layout :dummy, :pointer
67
67
 
68
68
  # Creates a Buffer from a sub part of the Buffer
@@ -51,7 +51,7 @@ module OpenCL
51
51
  return FFI::Function::new(return_type, param_types, ptr, options)
52
52
  end
53
53
 
54
- # Returns an Array of Platforms containing the available OpenCL platforms
54
+ # Returns an Array of Platform containing the available OpenCL platforms
55
55
  def self.get_platforms
56
56
  ptr1 = FFI::MemoryPointer::new(:cl_uint , 1)
57
57
 
@@ -32,9 +32,15 @@ module FFI
32
32
 
33
33
  end
34
34
  end
35
+
36
+ class Struct
37
+
38
+ # alias initialize in order to call it from another function from a child class
39
+ alias_method :parent_initialize, :initialize
40
+ end
41
+
35
42
  end
36
43
 
37
- # Maps the OpenCL API using FFI.
38
44
  module OpenCL
39
45
  @@type_converter = {
40
46
  :cl_device_type => OpenCL::Device::Type,
@@ -67,12 +73,6 @@ module OpenCL
67
73
  return @@type_converter[type]
68
74
  end
69
75
 
70
- class FFI::Struct
71
-
72
- # alias initialize in order to call it from another function from a child class
73
- alias_method :parent_initialize, :initialize
74
- end
75
-
76
76
  # Maps the :cl_image_fomat type of OpenCL
77
77
  class ImageFormat < FFI::Struct
78
78
  layout :image_channel_order, :cl_channel_order,
@@ -1,5 +1,6 @@
1
1
  require 'ffi'
2
2
 
3
+ # Maps the OpenCL API using FFI
3
4
  module OpenCL
4
5
  extend FFI::Library
5
6
  begin
@@ -471,7 +472,7 @@ module OpenCL
471
472
  MEM_HOST_WRITE_COMBINING_QCOM = 0x40A7
472
473
  MEM_ION_HOST_PTR_QCOM = 0x40A8
473
474
  #:startdoc:
474
- # Maps OpenCL logiczal Error Type, and is used to raise Errors
475
+ # Parent claas to map OpenCL errors, and is used to raise unknown errors
475
476
  class Error < StandardError
476
477
  attr_reader :code
477
478
 
@@ -496,8 +497,10 @@ module OpenCL
496
497
  return "#{@code}"
497
498
  end
498
499
 
500
+ # Represents the OpenCL CL_PLATFORM_NOT_FOUND_KHR error
499
501
  class PLATFORM_NOT_FOUND_KHR < Error
500
502
 
503
+ # Initilizes code to -1001
501
504
  def initialize
502
505
  super(-1001)
503
506
  end
@@ -522,8 +525,10 @@ module OpenCL
522
525
  CLASSES[-1001] = PLATFORM_NOT_FOUND_KHR
523
526
  PlatformNotFoundKHR = PLATFORM_NOT_FOUND_KHR
524
527
 
528
+ # Represents the OpenCL CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR error
525
529
  class INVALID_GL_SHAREGROUP_REFERENCE_KHR < Error
526
530
 
531
+ # Initilizes code to -1000
527
532
  def initialize
528
533
  super(-1000)
529
534
  end
@@ -548,8 +553,10 @@ module OpenCL
548
553
  CLASSES[-1000] = INVALID_GL_SHAREGROUP_REFERENCE_KHR
549
554
  InvalidGLSharegroupReferenceKHR = INVALID_GL_SHAREGROUP_REFERENCE_KHR
550
555
 
556
+ # Represents the OpenCL CL_COMPILER_NOT_AVAILABLE error
551
557
  class COMPILER_NOT_AVAILABLE < Error
552
558
 
559
+ # Initilizes code to -3
553
560
  def initialize
554
561
  super(-3)
555
562
  end
@@ -574,8 +581,10 @@ module OpenCL
574
581
  CLASSES[-3] = COMPILER_NOT_AVAILABLE
575
582
  CompilerNotAvailable = COMPILER_NOT_AVAILABLE
576
583
 
584
+ # Represents the OpenCL CL_DEVICE_NOT_AVAILABLE error
577
585
  class DEVICE_NOT_AVAILABLE < Error
578
586
 
587
+ # Initilizes code to -2
579
588
  def initialize
580
589
  super(-2)
581
590
  end
@@ -600,8 +609,10 @@ module OpenCL
600
609
  CLASSES[-2] = DEVICE_NOT_AVAILABLE
601
610
  DeviceNotAvailable = DEVICE_NOT_AVAILABLE
602
611
 
612
+ # Represents the OpenCL CL_DEVICE_NOT_FOUND error
603
613
  class DEVICE_NOT_FOUND < Error
604
614
 
615
+ # Initilizes code to -1
605
616
  def initialize
606
617
  super(-1)
607
618
  end
@@ -626,8 +637,10 @@ module OpenCL
626
637
  CLASSES[-1] = DEVICE_NOT_FOUND
627
638
  DeviceNotFound = DEVICE_NOT_FOUND
628
639
 
640
+ # Represents the OpenCL CL_INVALID_DEVICE_QUEUE error
629
641
  class INVALID_DEVICE_QUEUE < Error
630
642
 
643
+ # Initilizes code to -70
631
644
  def initialize
632
645
  super(-70)
633
646
  end
@@ -652,8 +665,10 @@ module OpenCL
652
665
  CLASSES[-70] = INVALID_DEVICE_QUEUE
653
666
  InvalidDeviceQueue = INVALID_DEVICE_QUEUE
654
667
 
668
+ # Represents the OpenCL CL_INVALID_PIPE_SIZE error
655
669
  class INVALID_PIPE_SIZE < Error
656
670
 
671
+ # Initilizes code to -69
657
672
  def initialize
658
673
  super(-69)
659
674
  end
@@ -678,8 +693,10 @@ module OpenCL
678
693
  CLASSES[-69] = INVALID_PIPE_SIZE
679
694
  InvalidPipeSize = INVALID_PIPE_SIZE
680
695
 
696
+ # Represents the OpenCL CL_INVALID_DEVICE_PARTITION_COUNT error
681
697
  class INVALID_DEVICE_PARTITION_COUNT < Error
682
698
 
699
+ # Initilizes code to -68
683
700
  def initialize
684
701
  super(-68)
685
702
  end
@@ -704,8 +721,10 @@ module OpenCL
704
721
  CLASSES[-68] = INVALID_DEVICE_PARTITION_COUNT
705
722
  InvalidDevicePartitionCount = INVALID_DEVICE_PARTITION_COUNT
706
723
 
724
+ # Represents the OpenCL CL_INVALID_LINKER_OPTIONS error
707
725
  class INVALID_LINKER_OPTIONS < Error
708
726
 
727
+ # Initilizes code to -67
709
728
  def initialize
710
729
  super(-67)
711
730
  end
@@ -730,8 +749,10 @@ module OpenCL
730
749
  CLASSES[-67] = INVALID_LINKER_OPTIONS
731
750
  InvalidLinkerOptions = INVALID_LINKER_OPTIONS
732
751
 
752
+ # Represents the OpenCL CL_INVALID_COMPILER_OPTIONS error
733
753
  class INVALID_COMPILER_OPTIONS < Error
734
754
 
755
+ # Initilizes code to -66
735
756
  def initialize
736
757
  super(-66)
737
758
  end
@@ -756,8 +777,10 @@ module OpenCL
756
777
  CLASSES[-66] = INVALID_COMPILER_OPTIONS
757
778
  InvalidCompilerOptions = INVALID_COMPILER_OPTIONS
758
779
 
780
+ # Represents the OpenCL CL_INVALID_IMAGE_DESCRIPTOR error
759
781
  class INVALID_IMAGE_DESCRIPTOR < Error
760
782
 
783
+ # Initilizes code to -65
761
784
  def initialize
762
785
  super(-65)
763
786
  end
@@ -782,8 +805,10 @@ module OpenCL
782
805
  CLASSES[-65] = INVALID_IMAGE_DESCRIPTOR
783
806
  InvalidImageDescriptor = INVALID_IMAGE_DESCRIPTOR
784
807
 
808
+ # Represents the OpenCL CL_INVALID_PROPERTY error
785
809
  class INVALID_PROPERTY < Error
786
810
 
811
+ # Initilizes code to -64
787
812
  def initialize
788
813
  super(-64)
789
814
  end
@@ -808,8 +833,10 @@ module OpenCL
808
833
  CLASSES[-64] = INVALID_PROPERTY
809
834
  InvalidProperty = INVALID_PROPERTY
810
835
 
836
+ # Represents the OpenCL CL_INVALID_GLOBAL_WORK_SIZE error
811
837
  class INVALID_GLOBAL_WORK_SIZE < Error
812
838
 
839
+ # Initilizes code to -63
813
840
  def initialize
814
841
  super(-63)
815
842
  end
@@ -834,8 +861,10 @@ module OpenCL
834
861
  CLASSES[-63] = INVALID_GLOBAL_WORK_SIZE
835
862
  InvalidGLOBALWorkSize = INVALID_GLOBAL_WORK_SIZE
836
863
 
864
+ # Represents the OpenCL CL_INVALID_MIP_LEVEL error
837
865
  class INVALID_MIP_LEVEL < Error
838
866
 
867
+ # Initilizes code to -62
839
868
  def initialize
840
869
  super(-62)
841
870
  end
@@ -860,8 +889,10 @@ module OpenCL
860
889
  CLASSES[-62] = INVALID_MIP_LEVEL
861
890
  InvalidMipLevel = INVALID_MIP_LEVEL
862
891
 
892
+ # Represents the OpenCL CL_INVALID_BUFFER_SIZE error
863
893
  class INVALID_BUFFER_SIZE < Error
864
894
 
895
+ # Initilizes code to -61
865
896
  def initialize
866
897
  super(-61)
867
898
  end
@@ -886,8 +917,10 @@ module OpenCL
886
917
  CLASSES[-61] = INVALID_BUFFER_SIZE
887
918
  InvalidBufferSize = INVALID_BUFFER_SIZE
888
919
 
920
+ # Represents the OpenCL CL_INVALID_GL_OBJECT error
889
921
  class INVALID_GL_OBJECT < Error
890
922
 
923
+ # Initilizes code to -60
891
924
  def initialize
892
925
  super(-60)
893
926
  end
@@ -912,8 +945,10 @@ module OpenCL
912
945
  CLASSES[-60] = INVALID_GL_OBJECT
913
946
  InvalidGLObject = INVALID_GL_OBJECT
914
947
 
948
+ # Represents the OpenCL CL_INVALID_OPERATION error
915
949
  class INVALID_OPERATION < Error
916
950
 
951
+ # Initilizes code to -59
917
952
  def initialize
918
953
  super(-59)
919
954
  end
@@ -938,8 +973,10 @@ module OpenCL
938
973
  CLASSES[-59] = INVALID_OPERATION
939
974
  InvalidOperation = INVALID_OPERATION
940
975
 
976
+ # Represents the OpenCL CL_INVALID_EVENT error
941
977
  class INVALID_EVENT < Error
942
978
 
979
+ # Initilizes code to -58
943
980
  def initialize
944
981
  super(-58)
945
982
  end
@@ -964,8 +1001,10 @@ module OpenCL
964
1001
  CLASSES[-58] = INVALID_EVENT
965
1002
  InvalidEvent = INVALID_EVENT
966
1003
 
1004
+ # Represents the OpenCL CL_INVALID_EVENT_WAIT_LIST error
967
1005
  class INVALID_EVENT_WAIT_LIST < Error
968
1006
 
1007
+ # Initilizes code to -57
969
1008
  def initialize
970
1009
  super(-57)
971
1010
  end
@@ -990,8 +1029,10 @@ module OpenCL
990
1029
  CLASSES[-57] = INVALID_EVENT_WAIT_LIST
991
1030
  InvalidEventWaitList = INVALID_EVENT_WAIT_LIST
992
1031
 
1032
+ # Represents the OpenCL CL_INVALID_GLOBAL_OFFSET error
993
1033
  class INVALID_GLOBAL_OFFSET < Error
994
1034
 
1035
+ # Initilizes code to -56
995
1036
  def initialize
996
1037
  super(-56)
997
1038
  end
@@ -1016,8 +1057,10 @@ module OpenCL
1016
1057
  CLASSES[-56] = INVALID_GLOBAL_OFFSET
1017
1058
  InvalidGLOBALOffset = INVALID_GLOBAL_OFFSET
1018
1059
 
1060
+ # Represents the OpenCL CL_INVALID_WORK_ITEM_SIZE error
1019
1061
  class INVALID_WORK_ITEM_SIZE < Error
1020
1062
 
1063
+ # Initilizes code to -55
1021
1064
  def initialize
1022
1065
  super(-55)
1023
1066
  end
@@ -1042,8 +1085,10 @@ module OpenCL
1042
1085
  CLASSES[-55] = INVALID_WORK_ITEM_SIZE
1043
1086
  InvalidWorkItemSize = INVALID_WORK_ITEM_SIZE
1044
1087
 
1088
+ # Represents the OpenCL CL_INVALID_WORK_GROUP_SIZE error
1045
1089
  class INVALID_WORK_GROUP_SIZE < Error
1046
1090
 
1091
+ # Initilizes code to -54
1047
1092
  def initialize
1048
1093
  super(-54)
1049
1094
  end
@@ -1068,8 +1113,10 @@ module OpenCL
1068
1113
  CLASSES[-54] = INVALID_WORK_GROUP_SIZE
1069
1114
  InvalidWorkGroupSize = INVALID_WORK_GROUP_SIZE
1070
1115
 
1116
+ # Represents the OpenCL CL_INVALID_WORK_DIMENSION error
1071
1117
  class INVALID_WORK_DIMENSION < Error
1072
1118
 
1119
+ # Initilizes code to -53
1073
1120
  def initialize
1074
1121
  super(-53)
1075
1122
  end
@@ -1094,8 +1141,10 @@ module OpenCL
1094
1141
  CLASSES[-53] = INVALID_WORK_DIMENSION
1095
1142
  InvalidWorkDimension = INVALID_WORK_DIMENSION
1096
1143
 
1144
+ # Represents the OpenCL CL_INVALID_KERNEL_ARGS error
1097
1145
  class INVALID_KERNEL_ARGS < Error
1098
1146
 
1147
+ # Initilizes code to -52
1099
1148
  def initialize
1100
1149
  super(-52)
1101
1150
  end
@@ -1120,8 +1169,10 @@ module OpenCL
1120
1169
  CLASSES[-52] = INVALID_KERNEL_ARGS
1121
1170
  InvalidKernelArgs = INVALID_KERNEL_ARGS
1122
1171
 
1172
+ # Represents the OpenCL CL_INVALID_ARG_SIZE error
1123
1173
  class INVALID_ARG_SIZE < Error
1124
1174
 
1175
+ # Initilizes code to -51
1125
1176
  def initialize
1126
1177
  super(-51)
1127
1178
  end
@@ -1146,8 +1197,10 @@ module OpenCL
1146
1197
  CLASSES[-51] = INVALID_ARG_SIZE
1147
1198
  InvalidArgSize = INVALID_ARG_SIZE
1148
1199
 
1200
+ # Represents the OpenCL CL_INVALID_ARG_VALUE error
1149
1201
  class INVALID_ARG_VALUE < Error
1150
1202
 
1203
+ # Initilizes code to -50
1151
1204
  def initialize
1152
1205
  super(-50)
1153
1206
  end
@@ -1172,8 +1225,10 @@ module OpenCL
1172
1225
  CLASSES[-50] = INVALID_ARG_VALUE
1173
1226
  InvalidArgValue = INVALID_ARG_VALUE
1174
1227
 
1228
+ # Represents the OpenCL CL_INVALID_ARG_INDEX error
1175
1229
  class INVALID_ARG_INDEX < Error
1176
1230
 
1231
+ # Initilizes code to -49
1177
1232
  def initialize
1178
1233
  super(-49)
1179
1234
  end
@@ -1198,8 +1253,10 @@ module OpenCL
1198
1253
  CLASSES[-49] = INVALID_ARG_INDEX
1199
1254
  InvalidArgIndex = INVALID_ARG_INDEX
1200
1255
 
1256
+ # Represents the OpenCL CL_INVALID_KERNEL error
1201
1257
  class INVALID_KERNEL < Error
1202
1258
 
1259
+ # Initilizes code to -48
1203
1260
  def initialize
1204
1261
  super(-48)
1205
1262
  end
@@ -1224,8 +1281,10 @@ module OpenCL
1224
1281
  CLASSES[-48] = INVALID_KERNEL
1225
1282
  InvalidKernel = INVALID_KERNEL
1226
1283
 
1284
+ # Represents the OpenCL CL_INVALID_KERNEL_DEFINITION error
1227
1285
  class INVALID_KERNEL_DEFINITION < Error
1228
1286
 
1287
+ # Initilizes code to -47
1229
1288
  def initialize
1230
1289
  super(-47)
1231
1290
  end
@@ -1250,8 +1309,10 @@ module OpenCL
1250
1309
  CLASSES[-47] = INVALID_KERNEL_DEFINITION
1251
1310
  InvalidKernelDefinition = INVALID_KERNEL_DEFINITION
1252
1311
 
1312
+ # Represents the OpenCL CL_INVALID_KERNEL_NAME error
1253
1313
  class INVALID_KERNEL_NAME < Error
1254
1314
 
1315
+ # Initilizes code to -46
1255
1316
  def initialize
1256
1317
  super(-46)
1257
1318
  end
@@ -1276,8 +1337,10 @@ module OpenCL
1276
1337
  CLASSES[-46] = INVALID_KERNEL_NAME
1277
1338
  InvalidKernelName = INVALID_KERNEL_NAME
1278
1339
 
1340
+ # Represents the OpenCL CL_INVALID_PROGRAM_EXECUTABLE error
1279
1341
  class INVALID_PROGRAM_EXECUTABLE < Error
1280
1342
 
1343
+ # Initilizes code to -45
1281
1344
  def initialize
1282
1345
  super(-45)
1283
1346
  end
@@ -1302,8 +1365,10 @@ module OpenCL
1302
1365
  CLASSES[-45] = INVALID_PROGRAM_EXECUTABLE
1303
1366
  InvalidProgramExecutable = INVALID_PROGRAM_EXECUTABLE
1304
1367
 
1368
+ # Represents the OpenCL CL_INVALID_PROGRAM error
1305
1369
  class INVALID_PROGRAM < Error
1306
1370
 
1371
+ # Initilizes code to -44
1307
1372
  def initialize
1308
1373
  super(-44)
1309
1374
  end
@@ -1328,8 +1393,10 @@ module OpenCL
1328
1393
  CLASSES[-44] = INVALID_PROGRAM
1329
1394
  InvalidProgram = INVALID_PROGRAM
1330
1395
 
1396
+ # Represents the OpenCL CL_INVALID_BUILD_OPTIONS error
1331
1397
  class INVALID_BUILD_OPTIONS < Error
1332
1398
 
1399
+ # Initilizes code to -43
1333
1400
  def initialize
1334
1401
  super(-43)
1335
1402
  end
@@ -1354,8 +1421,10 @@ module OpenCL
1354
1421
  CLASSES[-43] = INVALID_BUILD_OPTIONS
1355
1422
  InvalidBuildOptions = INVALID_BUILD_OPTIONS
1356
1423
 
1424
+ # Represents the OpenCL CL_INVALID_BINARY error
1357
1425
  class INVALID_BINARY < Error
1358
1426
 
1427
+ # Initilizes code to -42
1359
1428
  def initialize
1360
1429
  super(-42)
1361
1430
  end
@@ -1380,8 +1449,10 @@ module OpenCL
1380
1449
  CLASSES[-42] = INVALID_BINARY
1381
1450
  InvalidBinary = INVALID_BINARY
1382
1451
 
1452
+ # Represents the OpenCL CL_INVALID_SAMPLER error
1383
1453
  class INVALID_SAMPLER < Error
1384
1454
 
1455
+ # Initilizes code to -41
1385
1456
  def initialize
1386
1457
  super(-41)
1387
1458
  end
@@ -1406,8 +1477,10 @@ module OpenCL
1406
1477
  CLASSES[-41] = INVALID_SAMPLER
1407
1478
  InvalidSampler = INVALID_SAMPLER
1408
1479
 
1480
+ # Represents the OpenCL CL_INVALID_IMAGE_SIZE error
1409
1481
  class INVALID_IMAGE_SIZE < Error
1410
1482
 
1483
+ # Initilizes code to -40
1411
1484
  def initialize
1412
1485
  super(-40)
1413
1486
  end
@@ -1432,8 +1505,10 @@ module OpenCL
1432
1505
  CLASSES[-40] = INVALID_IMAGE_SIZE
1433
1506
  InvalidImageSize = INVALID_IMAGE_SIZE
1434
1507
 
1508
+ # Represents the OpenCL CL_INVALID_IMAGE_FORMAT_DESCRIPTOR error
1435
1509
  class INVALID_IMAGE_FORMAT_DESCRIPTOR < Error
1436
1510
 
1511
+ # Initilizes code to -39
1437
1512
  def initialize
1438
1513
  super(-39)
1439
1514
  end
@@ -1458,8 +1533,10 @@ module OpenCL
1458
1533
  CLASSES[-39] = INVALID_IMAGE_FORMAT_DESCRIPTOR
1459
1534
  InvalidImageFormatDescriptor = INVALID_IMAGE_FORMAT_DESCRIPTOR
1460
1535
 
1536
+ # Represents the OpenCL CL_INVALID_MEM_OBJECT error
1461
1537
  class INVALID_MEM_OBJECT < Error
1462
1538
 
1539
+ # Initilizes code to -38
1463
1540
  def initialize
1464
1541
  super(-38)
1465
1542
  end
@@ -1484,8 +1561,10 @@ module OpenCL
1484
1561
  CLASSES[-38] = INVALID_MEM_OBJECT
1485
1562
  InvalidMemObject = INVALID_MEM_OBJECT
1486
1563
 
1564
+ # Represents the OpenCL CL_INVALID_HOST_PTR error
1487
1565
  class INVALID_HOST_PTR < Error
1488
1566
 
1567
+ # Initilizes code to -37
1489
1568
  def initialize
1490
1569
  super(-37)
1491
1570
  end
@@ -1510,8 +1589,10 @@ module OpenCL
1510
1589
  CLASSES[-37] = INVALID_HOST_PTR
1511
1590
  InvalidHostPtr = INVALID_HOST_PTR
1512
1591
 
1592
+ # Represents the OpenCL CL_INVALID_COMMAND_QUEUE error
1513
1593
  class INVALID_COMMAND_QUEUE < Error
1514
1594
 
1595
+ # Initilizes code to -36
1515
1596
  def initialize
1516
1597
  super(-36)
1517
1598
  end
@@ -1536,8 +1617,10 @@ module OpenCL
1536
1617
  CLASSES[-36] = INVALID_COMMAND_QUEUE
1537
1618
  InvalidCommandQueue = INVALID_COMMAND_QUEUE
1538
1619
 
1620
+ # Represents the OpenCL CL_INVALID_QUEUE_PROPERTIES error
1539
1621
  class INVALID_QUEUE_PROPERTIES < Error
1540
1622
 
1623
+ # Initilizes code to -35
1541
1624
  def initialize
1542
1625
  super(-35)
1543
1626
  end
@@ -1562,8 +1645,10 @@ module OpenCL
1562
1645
  CLASSES[-35] = INVALID_QUEUE_PROPERTIES
1563
1646
  InvalidQueueProperties = INVALID_QUEUE_PROPERTIES
1564
1647
 
1648
+ # Represents the OpenCL CL_INVALID_CONTEXT error
1565
1649
  class INVALID_CONTEXT < Error
1566
1650
 
1651
+ # Initilizes code to -34
1567
1652
  def initialize
1568
1653
  super(-34)
1569
1654
  end
@@ -1588,8 +1673,10 @@ module OpenCL
1588
1673
  CLASSES[-34] = INVALID_CONTEXT
1589
1674
  InvalidContext = INVALID_CONTEXT
1590
1675
 
1676
+ # Represents the OpenCL CL_INVALID_DEVICE error
1591
1677
  class INVALID_DEVICE < Error
1592
1678
 
1679
+ # Initilizes code to -33
1593
1680
  def initialize
1594
1681
  super(-33)
1595
1682
  end
@@ -1614,8 +1701,10 @@ module OpenCL
1614
1701
  CLASSES[-33] = INVALID_DEVICE
1615
1702
  InvalidDevice = INVALID_DEVICE
1616
1703
 
1704
+ # Represents the OpenCL CL_INVALID_PLATFORM error
1617
1705
  class INVALID_PLATFORM < Error
1618
1706
 
1707
+ # Initilizes code to -32
1619
1708
  def initialize
1620
1709
  super(-32)
1621
1710
  end
@@ -1640,8 +1729,10 @@ module OpenCL
1640
1729
  CLASSES[-32] = INVALID_PLATFORM
1641
1730
  InvalidPlatform = INVALID_PLATFORM
1642
1731
 
1732
+ # Represents the OpenCL CL_INVALID_DEVICE_TYPE error
1643
1733
  class INVALID_DEVICE_TYPE < Error
1644
1734
 
1735
+ # Initilizes code to -31
1645
1736
  def initialize
1646
1737
  super(-31)
1647
1738
  end
@@ -1666,8 +1757,10 @@ module OpenCL
1666
1757
  CLASSES[-31] = INVALID_DEVICE_TYPE
1667
1758
  InvalidDeviceType = INVALID_DEVICE_TYPE
1668
1759
 
1760
+ # Represents the OpenCL CL_INVALID_VALUE error
1669
1761
  class INVALID_VALUE < Error
1670
1762
 
1763
+ # Initilizes code to -30
1671
1764
  def initialize
1672
1765
  super(-30)
1673
1766
  end
@@ -1692,8 +1785,10 @@ module OpenCL
1692
1785
  CLASSES[-30] = INVALID_VALUE
1693
1786
  InvalidValue = INVALID_VALUE
1694
1787
 
1788
+ # Represents the OpenCL CL_KERNEL_ARG_INFO_NOT_AVAILABLE error
1695
1789
  class KERNEL_ARG_INFO_NOT_AVAILABLE < Error
1696
1790
 
1791
+ # Initilizes code to -19
1697
1792
  def initialize
1698
1793
  super(-19)
1699
1794
  end
@@ -1718,8 +1813,10 @@ module OpenCL
1718
1813
  CLASSES[-19] = KERNEL_ARG_INFO_NOT_AVAILABLE
1719
1814
  KernelArgInfoNotAvailable = KERNEL_ARG_INFO_NOT_AVAILABLE
1720
1815
 
1816
+ # Represents the OpenCL CL_DEVICE_PARTITION_FAILED error
1721
1817
  class DEVICE_PARTITION_FAILED < Error
1722
1818
 
1819
+ # Initilizes code to -18
1723
1820
  def initialize
1724
1821
  super(-18)
1725
1822
  end
@@ -1744,8 +1841,10 @@ module OpenCL
1744
1841
  CLASSES[-18] = DEVICE_PARTITION_FAILED
1745
1842
  DevicePartitionFailed = DEVICE_PARTITION_FAILED
1746
1843
 
1844
+ # Represents the OpenCL CL_LINK_PROGRAM_FAILURE error
1747
1845
  class LINK_PROGRAM_FAILURE < Error
1748
1846
 
1847
+ # Initilizes code to -17
1749
1848
  def initialize
1750
1849
  super(-17)
1751
1850
  end
@@ -1770,8 +1869,10 @@ module OpenCL
1770
1869
  CLASSES[-17] = LINK_PROGRAM_FAILURE
1771
1870
  LinkProgramFailure = LINK_PROGRAM_FAILURE
1772
1871
 
1872
+ # Represents the OpenCL CL_LINKER_NOT_AVAILABLE error
1773
1873
  class LINKER_NOT_AVAILABLE < Error
1774
1874
 
1875
+ # Initilizes code to -16
1775
1876
  def initialize
1776
1877
  super(-16)
1777
1878
  end
@@ -1796,8 +1897,10 @@ module OpenCL
1796
1897
  CLASSES[-16] = LINKER_NOT_AVAILABLE
1797
1898
  LinkerNotAvailable = LINKER_NOT_AVAILABLE
1798
1899
 
1900
+ # Represents the OpenCL CL_COMPILE_PROGRAM_FAILURE error
1799
1901
  class COMPILE_PROGRAM_FAILURE < Error
1800
1902
 
1903
+ # Initilizes code to -15
1801
1904
  def initialize
1802
1905
  super(-15)
1803
1906
  end
@@ -1822,8 +1925,10 @@ module OpenCL
1822
1925
  CLASSES[-15] = COMPILE_PROGRAM_FAILURE
1823
1926
  CompileProgramFailure = COMPILE_PROGRAM_FAILURE
1824
1927
 
1928
+ # Represents the OpenCL CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST error
1825
1929
  class EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST < Error
1826
1930
 
1931
+ # Initilizes code to -14
1827
1932
  def initialize
1828
1933
  super(-14)
1829
1934
  end
@@ -1848,8 +1953,10 @@ module OpenCL
1848
1953
  CLASSES[-14] = EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST
1849
1954
  ExecStatusErrorForEventsInWaitList = EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST
1850
1955
 
1956
+ # Represents the OpenCL CL_MISALIGNED_SUB_BUFFER_OFFSET error
1851
1957
  class MISALIGNED_SUB_BUFFER_OFFSET < Error
1852
1958
 
1959
+ # Initilizes code to -13
1853
1960
  def initialize
1854
1961
  super(-13)
1855
1962
  end
@@ -1874,8 +1981,10 @@ module OpenCL
1874
1981
  CLASSES[-13] = MISALIGNED_SUB_BUFFER_OFFSET
1875
1982
  MisalignedSubBufferOffset = MISALIGNED_SUB_BUFFER_OFFSET
1876
1983
 
1984
+ # Represents the OpenCL CL_MAP_FAILURE error
1877
1985
  class MAP_FAILURE < Error
1878
1986
 
1987
+ # Initilizes code to -12
1879
1988
  def initialize
1880
1989
  super(-12)
1881
1990
  end
@@ -1900,8 +2009,10 @@ module OpenCL
1900
2009
  CLASSES[-12] = MAP_FAILURE
1901
2010
  MapFailure = MAP_FAILURE
1902
2011
 
2012
+ # Represents the OpenCL CL_BUILD_PROGRAM_FAILURE error
1903
2013
  class BUILD_PROGRAM_FAILURE < Error
1904
2014
 
2015
+ # Initilizes code to -11
1905
2016
  def initialize
1906
2017
  super(-11)
1907
2018
  end
@@ -1926,8 +2037,10 @@ module OpenCL
1926
2037
  CLASSES[-11] = BUILD_PROGRAM_FAILURE
1927
2038
  BuildProgramFailure = BUILD_PROGRAM_FAILURE
1928
2039
 
2040
+ # Represents the OpenCL CL_IMAGE_FORMAT_NOT_SUPPORTED error
1929
2041
  class IMAGE_FORMAT_NOT_SUPPORTED < Error
1930
2042
 
2043
+ # Initilizes code to -10
1931
2044
  def initialize
1932
2045
  super(-10)
1933
2046
  end
@@ -1952,8 +2065,10 @@ module OpenCL
1952
2065
  CLASSES[-10] = IMAGE_FORMAT_NOT_SUPPORTED
1953
2066
  ImageFormatNotSupported = IMAGE_FORMAT_NOT_SUPPORTED
1954
2067
 
2068
+ # Represents the OpenCL CL_IMAGE_FORMAT_MISMATCH error
1955
2069
  class IMAGE_FORMAT_MISMATCH < Error
1956
2070
 
2071
+ # Initilizes code to -9
1957
2072
  def initialize
1958
2073
  super(-9)
1959
2074
  end
@@ -1978,8 +2093,10 @@ module OpenCL
1978
2093
  CLASSES[-9] = IMAGE_FORMAT_MISMATCH
1979
2094
  ImageFormatMismatch = IMAGE_FORMAT_MISMATCH
1980
2095
 
2096
+ # Represents the OpenCL CL_MEM_COPY_OVERLAP error
1981
2097
  class MEM_COPY_OVERLAP < Error
1982
2098
 
2099
+ # Initilizes code to -8
1983
2100
  def initialize
1984
2101
  super(-8)
1985
2102
  end
@@ -2004,8 +2121,10 @@ module OpenCL
2004
2121
  CLASSES[-8] = MEM_COPY_OVERLAP
2005
2122
  MemCopyOverlap = MEM_COPY_OVERLAP
2006
2123
 
2124
+ # Represents the OpenCL CL_PROFILING_INFO_NOT_AVAILABLE error
2007
2125
  class PROFILING_INFO_NOT_AVAILABLE < Error
2008
2126
 
2127
+ # Initilizes code to -7
2009
2128
  def initialize
2010
2129
  super(-7)
2011
2130
  end
@@ -2030,8 +2149,10 @@ module OpenCL
2030
2149
  CLASSES[-7] = PROFILING_INFO_NOT_AVAILABLE
2031
2150
  ProfilingInfoNotAvailable = PROFILING_INFO_NOT_AVAILABLE
2032
2151
 
2152
+ # Represents the OpenCL CL_OUT_OF_HOST_MEMORY error
2033
2153
  class OUT_OF_HOST_MEMORY < Error
2034
2154
 
2155
+ # Initilizes code to -6
2035
2156
  def initialize
2036
2157
  super(-6)
2037
2158
  end
@@ -2056,8 +2177,10 @@ module OpenCL
2056
2177
  CLASSES[-6] = OUT_OF_HOST_MEMORY
2057
2178
  OutOfHostMemory = OUT_OF_HOST_MEMORY
2058
2179
 
2180
+ # Represents the OpenCL CL_OUT_OF_RESOURCES error
2059
2181
  class OUT_OF_RESOURCES < Error
2060
2182
 
2183
+ # Initilizes code to -5
2061
2184
  def initialize
2062
2185
  super(-5)
2063
2186
  end
@@ -2082,8 +2205,10 @@ module OpenCL
2082
2205
  CLASSES[-5] = OUT_OF_RESOURCES
2083
2206
  OutOfResources = OUT_OF_RESOURCES
2084
2207
 
2208
+ # Represents the OpenCL CL_MEM_OBJECT_ALLOCATION_FAILURE error
2085
2209
  class MEM_OBJECT_ALLOCATION_FAILURE < Error
2086
2210
 
2211
+ # Initilizes code to -4
2087
2212
  def initialize
2088
2213
  super(-4)
2089
2214
  end
@@ -2242,7 +2367,7 @@ module OpenCL
2242
2367
  end
2243
2368
 
2244
2369
  # A parent class to represent enums that use cl_int
2245
- class EnumInt < OpenCL::Enum
2370
+ class EnumInt < Enum
2246
2371
  # extend FFI::DataConverter
2247
2372
  # native_type :cl_int
2248
2373
  end
@@ -2519,7 +2644,7 @@ module OpenCL
2519
2644
 
2520
2645
  class Device
2521
2646
  # Bitfield that maps the :cl_device_type type
2522
- class Type < OpenCL::Bitfield
2647
+ class Type < Bitfield
2523
2648
  #:stopdoc:
2524
2649
  DEFAULT = (1 << 0)
2525
2650
  CPU = (1 << 1)
@@ -2539,7 +2664,7 @@ module OpenCL
2539
2664
  end
2540
2665
 
2541
2666
  # Bitfield that maps the :cl_device_fp_config type
2542
- class FPConfig < OpenCL::Bitfield
2667
+ class FPConfig < Bitfield
2543
2668
  #:stopdoc:
2544
2669
  DENORM = (1 << 0)
2545
2670
  INF_NAN = (1 << 1)
@@ -2561,7 +2686,7 @@ module OpenCL
2561
2686
  end
2562
2687
 
2563
2688
  # Bitfield that maps the :cl_device_exec_capabilities type
2564
- class ExecCapabilities < OpenCL::Bitfield
2689
+ class ExecCapabilities < Bitfield
2565
2690
  #:stopdoc:
2566
2691
  KERNEL = (1 << 0)
2567
2692
  NATIVE_KERNEL = (1 << 1)
@@ -2577,7 +2702,7 @@ module OpenCL
2577
2702
  end
2578
2703
 
2579
2704
  # Enum that maps the :cl_device_mem_cache_type type
2580
- class MemCacheType < OpenCL::Enum
2705
+ class MemCacheType < Enum
2581
2706
  #:stopdoc:
2582
2707
  NONE = 0x0
2583
2708
  READ_ONLY_CACHE = 0x1
@@ -2593,7 +2718,7 @@ module OpenCL
2593
2718
  end
2594
2719
 
2595
2720
  # Enum that maps the :cl_device_local_mem_type type
2596
- class LocalMemType < OpenCL::Enum
2721
+ class LocalMemType < Enum
2597
2722
  #:stopdoc:
2598
2723
  LOCAL = 0x1
2599
2724
  GLOBAL = 0x2
@@ -2607,7 +2732,7 @@ module OpenCL
2607
2732
  end
2608
2733
 
2609
2734
  # Bitfield that maps the :cl_device_affinity_domain type
2610
- class AffinityDomain < OpenCL::Bitfield
2735
+ class AffinityDomain < Bitfield
2611
2736
  #:stopdoc:
2612
2737
  NUMA = (1 << 0)
2613
2738
  L4_CACHE = (1 << 1)
@@ -2627,7 +2752,7 @@ module OpenCL
2627
2752
  end
2628
2753
 
2629
2754
  # Bitfield that maps the :cl_device_svm_capabilities
2630
- class SVMCapabilities < OpenCL::Bitfield
2755
+ class SVMCapabilities < Bitfield
2631
2756
  #:stopdoc:
2632
2757
  COARSE_GRAIN_BUFFER = (1 << 0)
2633
2758
  FINE_GRAIN_BUFFER = (1 << 1)
@@ -2727,7 +2852,7 @@ module OpenCL
2727
2852
  end
2728
2853
 
2729
2854
  class CommandQueue
2730
- class Properties < OpenCL::Bitfield
2855
+ class Properties < Bitfield
2731
2856
  #:stopdoc:
2732
2857
  OUT_OF_ORDER_EXEC_MODE_ENABLE = (1 << 0)
2733
2858
  PROFILING_ENABLE = (1 << 1)
@@ -2813,7 +2938,7 @@ module OpenCL
2813
2938
 
2814
2939
  class Mem
2815
2940
  # Bitfield that maps the :cl_mem_flags type
2816
- class Flags < OpenCL::Bitfield
2941
+ class Flags < Bitfield
2817
2942
  #:stopdoc:
2818
2943
  READ_WRITE = (1 << 0)
2819
2944
  WRITE_ONLY = (1 << 1)
@@ -2836,7 +2961,7 @@ module OpenCL
2836
2961
  end
2837
2962
 
2838
2963
  # Bitfield that maps the :cl_mem_migration_flags type
2839
- class MigrationFlags < OpenCL::Bitfield
2964
+ class MigrationFlags < Bitfield
2840
2965
  #:stopdoc:
2841
2966
  HOST = (1 << 0)
2842
2967
  CONTENT_UNDEFINED = (1 << 1)
@@ -2852,7 +2977,7 @@ module OpenCL
2852
2977
  end
2853
2978
 
2854
2979
  # Enum that maps the :cl_mem_object_type
2855
- class Type < OpenCL::Enum
2980
+ class Type < Enum
2856
2981
  #:stopdoc:
2857
2982
  BUFFER = 0x10F0
2858
2983
  IMAGE2D = 0x10F1
@@ -2878,7 +3003,7 @@ module OpenCL
2878
3003
  end
2879
3004
 
2880
3005
  # Bitfield that maps the :cl_svm_mem_flags type
2881
- class SVMFlags < OpenCL::Bitfield
3006
+ class SVMFlags < Bitfield
2882
3007
  #:stopdoc:
2883
3008
  READ_WRITE = (1 << 0)
2884
3009
  WRITE_ONLY = (1 << 1)
@@ -2950,7 +3075,7 @@ module OpenCL
2950
3075
 
2951
3076
  class Program
2952
3077
  # Enum that maps the :cl_program_binary_type type
2953
- class BinaryType < OpenCL::Enum
3078
+ class BinaryType < Enum
2954
3079
  #:stopdoc:
2955
3080
  NONE = 0x0
2956
3081
  COMPILED_OBJECT = 0x1
@@ -3061,7 +3186,7 @@ module OpenCL
3061
3186
 
3062
3187
  class Arg
3063
3188
  # Enum that maps the :cl_kernel_arg_address_qualifier type
3064
- class AddressQualifier < OpenCL::Enum
3189
+ class AddressQualifier < Enum
3065
3190
  #:stopdoc:
3066
3191
  GLOBAL = 0x119B
3067
3192
  LOCAL = 0x119C
@@ -3079,7 +3204,7 @@ module OpenCL
3079
3204
  end
3080
3205
 
3081
3206
  # Enum that maps the :cl_kernel_arg_access_qualifier type
3082
- class AccessQualifier < OpenCL::Enum
3207
+ class AccessQualifier < Enum
3083
3208
  #:stopdoc:
3084
3209
  READ_ONLY = 0x11A0
3085
3210
  WRITE_ONLY = 0x11A1
@@ -3097,7 +3222,7 @@ module OpenCL
3097
3222
  end
3098
3223
 
3099
3224
  # Bitfield that maps the :cl_kernel_arg_type_qualifier type
3100
- class TypeQualifier < OpenCL::Bitfield
3225
+ class TypeQualifier < Bitfield
3101
3226
  #:stopdoc:
3102
3227
  NONE = 0
3103
3228
  CONST = (1 << 0)
@@ -3196,7 +3321,7 @@ module OpenCL
3196
3321
 
3197
3322
  class Sampler
3198
3323
  # Enum that maps the :cl_sampler_properties
3199
- class Type < OpenCL::Enum
3324
+ class Type < Enum
3200
3325
  #:stopdoc:
3201
3326
  NORMALIZED_COORDS = 0x1152
3202
3327
  ADDRESSING_MODE = 0x1153
@@ -3244,7 +3369,7 @@ module OpenCL
3244
3369
  end
3245
3370
 
3246
3371
  # Enum that maps the :cl_channel_order type
3247
- class ChannelOrder < OpenCL::Enum
3372
+ class ChannelOrder < Enum
3248
3373
  #:stopdoc:
3249
3374
  R = 0x10B0
3250
3375
  A = 0x10B1
@@ -3294,7 +3419,7 @@ module OpenCL
3294
3419
  end
3295
3420
 
3296
3421
  # Enum that maps the :cl_channel_type type
3297
- class ChannelType < OpenCL::Enum
3422
+ class ChannelType < Enum
3298
3423
  #:stopdoc:
3299
3424
  SNORM_INT8 = 0x10D0
3300
3425
  SNORM_INT16 = 0x10D1
@@ -3336,7 +3461,7 @@ module OpenCL
3336
3461
  end
3337
3462
 
3338
3463
  # Enum that maps the :cl_addressing_mode type
3339
- class AddressingMode < OpenCL::Enum
3464
+ class AddressingMode < Enum
3340
3465
  #:stopdoc:
3341
3466
  NONE = 0x1130
3342
3467
  CLAMP_TO_EDGE = 0x1131
@@ -3356,7 +3481,7 @@ module OpenCL
3356
3481
  end
3357
3482
 
3358
3483
  # Enum that maps the :cl_filter_mode type
3359
- class FilterMode < OpenCL::Enum
3484
+ class FilterMode < Enum
3360
3485
  #:stopdoc:
3361
3486
  NEAREST = 0x1140
3362
3487
  LINEAR = 0x1141
@@ -3370,7 +3495,7 @@ module OpenCL
3370
3495
  end
3371
3496
 
3372
3497
  # Bitfield that maps the :cl_map_flags type
3373
- class MapFlags < OpenCL::Bitfield
3498
+ class MapFlags < Bitfield
3374
3499
  #:stopdoc:
3375
3500
  READ = (1 << 0)
3376
3501
  WRITE = (1 << 1)
@@ -3387,7 +3512,7 @@ module OpenCL
3387
3512
  end
3388
3513
 
3389
3514
  # Enum that maps the :cl_command_type type
3390
- class CommandType < OpenCL::Enum
3515
+ class CommandType < Enum
3391
3516
  #:stopdoc:
3392
3517
  NDRANGE_KERNEL = 0x11F0
3393
3518
  TASK = 0x11F1
@@ -3457,7 +3582,7 @@ module OpenCL
3457
3582
  end
3458
3583
 
3459
3584
  # Enum that maps the :cl_gl_object_type type
3460
- class GLObjectType < OpenCL::Enum
3585
+ class GLObjectType < Enum
3461
3586
  #:stopdoc:
3462
3587
  BUFFER = 0x2000
3463
3588
  TEXTURE2D = 0x2001
@@ -3483,7 +3608,7 @@ module OpenCL
3483
3608
  end
3484
3609
 
3485
3610
  # Enum that maps the :cl_build_status type
3486
- class BuildStatus < OpenCL::EnumInt
3611
+ class BuildStatus < EnumInt
3487
3612
  #:stopdoc:
3488
3613
  SUCCESS = 0
3489
3614
  NONE = -1
@@ -3501,7 +3626,7 @@ module OpenCL
3501
3626
  end
3502
3627
 
3503
3628
  # Enum that maps the command execution status logical type
3504
- class CommandExecutionStatus < OpenCL::EnumInt
3629
+ class CommandExecutionStatus < EnumInt
3505
3630
  #:stopdoc:
3506
3631
  COMPLETE = 0x0
3507
3632
  RUNNING = 0x1
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'opencl_ruby_ffi'
3
- s.version = "0.992"
3
+ s.version = "0.993"
4
4
  s.author = "Brice Videau"
5
5
  s.email = "brice.videau@imag.fr"
6
6
  s.homepage = "https://forge.imag.fr/projects/opencl-ruby/"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opencl_ruby_ffi
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.992'
4
+ version: '0.993'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: