cumo 0.4.3 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +3 -0
  3. data/.rubocop.yml +15 -0
  4. data/.rubocop_todo.yml +1272 -0
  5. data/3rd_party/mkmf-cu/Gemfile +2 -0
  6. data/3rd_party/mkmf-cu/Rakefile +2 -1
  7. data/3rd_party/mkmf-cu/bin/mkmf-cu-nvcc +2 -0
  8. data/3rd_party/mkmf-cu/lib/mkmf-cu/cli.rb +36 -7
  9. data/3rd_party/mkmf-cu/lib/mkmf-cu/nvcc.rb +51 -45
  10. data/3rd_party/mkmf-cu/lib/mkmf-cu.rb +2 -0
  11. data/3rd_party/mkmf-cu/mkmf-cu.gemspec +3 -1
  12. data/3rd_party/mkmf-cu/test/test_mkmf-cu.rb +5 -3
  13. data/CHANGELOG.md +69 -0
  14. data/Gemfile +6 -1
  15. data/README.md +2 -10
  16. data/Rakefile +8 -11
  17. data/bench/broadcast_fp32.rb +28 -26
  18. data/bench/cumo_bench.rb +18 -16
  19. data/bench/numo_bench.rb +18 -16
  20. data/bench/reduction_fp32.rb +14 -12
  21. data/bin/console +1 -0
  22. data/cumo.gemspec +5 -8
  23. data/ext/cumo/cuda/cudnn.c +2 -2
  24. data/ext/cumo/cumo.c +7 -3
  25. data/ext/cumo/depend.erb +15 -13
  26. data/ext/cumo/extconf.rb +32 -46
  27. data/ext/cumo/include/cumo/cuda/cudnn.h +3 -1
  28. data/ext/cumo/include/cumo/intern.h +1 -0
  29. data/ext/cumo/include/cumo/narray.h +13 -1
  30. data/ext/cumo/include/cumo/template.h +2 -4
  31. data/ext/cumo/include/cumo/types/complex_macro.h +1 -1
  32. data/ext/cumo/include/cumo/types/float_macro.h +2 -2
  33. data/ext/cumo/include/cumo/types/xint_macro.h +3 -2
  34. data/ext/cumo/include/cumo.h +2 -2
  35. data/ext/cumo/narray/array.c +3 -3
  36. data/ext/cumo/narray/data.c +23 -2
  37. data/ext/cumo/narray/gen/cogen.rb +8 -7
  38. data/ext/cumo/narray/gen/cogen_kernel.rb +8 -7
  39. data/ext/cumo/narray/gen/def/bit.rb +3 -1
  40. data/ext/cumo/narray/gen/def/dcomplex.rb +2 -0
  41. data/ext/cumo/narray/gen/def/dfloat.rb +2 -0
  42. data/ext/cumo/narray/gen/def/int16.rb +2 -0
  43. data/ext/cumo/narray/gen/def/int32.rb +2 -0
  44. data/ext/cumo/narray/gen/def/int64.rb +2 -0
  45. data/ext/cumo/narray/gen/def/int8.rb +2 -0
  46. data/ext/cumo/narray/gen/def/robject.rb +2 -0
  47. data/ext/cumo/narray/gen/def/scomplex.rb +2 -0
  48. data/ext/cumo/narray/gen/def/sfloat.rb +2 -0
  49. data/ext/cumo/narray/gen/def/uint16.rb +2 -0
  50. data/ext/cumo/narray/gen/def/uint32.rb +2 -0
  51. data/ext/cumo/narray/gen/def/uint64.rb +2 -0
  52. data/ext/cumo/narray/gen/def/uint8.rb +2 -0
  53. data/ext/cumo/narray/gen/erbln.rb +9 -7
  54. data/ext/cumo/narray/gen/erbpp2.rb +26 -24
  55. data/ext/cumo/narray/gen/narray_def.rb +13 -11
  56. data/ext/cumo/narray/gen/spec.rb +58 -55
  57. data/ext/cumo/narray/gen/tmpl/alloc_func.c +1 -1
  58. data/ext/cumo/narray/gen/tmpl/at.c +34 -0
  59. data/ext/cumo/narray/gen/tmpl/batch_norm.c +1 -1
  60. data/ext/cumo/narray/gen/tmpl/batch_norm_backward.c +2 -2
  61. data/ext/cumo/narray/gen/tmpl/conv.c +1 -1
  62. data/ext/cumo/narray/gen/tmpl/conv_grad_w.c +3 -1
  63. data/ext/cumo/narray/gen/tmpl/conv_transpose.c +1 -1
  64. data/ext/cumo/narray/gen/tmpl/fixed_batch_norm.c +1 -1
  65. data/ext/cumo/narray/gen/tmpl/init_class.c +1 -0
  66. data/ext/cumo/narray/gen/tmpl/pooling_backward.c +1 -1
  67. data/ext/cumo/narray/gen/tmpl/pooling_forward.c +1 -1
  68. data/ext/cumo/narray/gen/tmpl/qsort.c +1 -5
  69. data/ext/cumo/narray/gen/tmpl/sort.c +1 -1
  70. data/ext/cumo/narray/gen/tmpl_bit/binary.c +42 -14
  71. data/ext/cumo/narray/gen/tmpl_bit/bit_count.c +5 -0
  72. data/ext/cumo/narray/gen/tmpl_bit/bit_reduce.c +5 -0
  73. data/ext/cumo/narray/gen/tmpl_bit/mask.c +27 -7
  74. data/ext/cumo/narray/gen/tmpl_bit/store_bit.c +21 -7
  75. data/ext/cumo/narray/gen/tmpl_bit/unary.c +21 -7
  76. data/ext/cumo/narray/index.c +243 -39
  77. data/ext/cumo/narray/index_kernel.cu +84 -0
  78. data/ext/cumo/narray/narray.c +38 -1
  79. data/ext/cumo/narray/ndloop.c +1 -1
  80. data/ext/cumo/narray/struct.c +1 -1
  81. data/lib/cumo/cuda/compile_error.rb +1 -1
  82. data/lib/cumo/cuda/compiler.rb +23 -22
  83. data/lib/cumo/cuda/cudnn.rb +1 -1
  84. data/lib/cumo/cuda/device.rb +1 -1
  85. data/lib/cumo/cuda/link_state.rb +2 -2
  86. data/lib/cumo/cuda/module.rb +1 -2
  87. data/lib/cumo/cuda/nvrtc_program.rb +3 -2
  88. data/lib/cumo/cuda.rb +2 -0
  89. data/lib/cumo/linalg.rb +2 -0
  90. data/lib/cumo/narray/extra.rb +137 -185
  91. data/lib/cumo/narray.rb +2 -0
  92. data/lib/cumo.rb +3 -1
  93. data/test/bit_test.rb +157 -0
  94. data/test/cuda/compiler_test.rb +69 -0
  95. data/test/cuda/device_test.rb +30 -0
  96. data/test/cuda/memory_pool_test.rb +45 -0
  97. data/test/cuda/nvrtc_test.rb +51 -0
  98. data/test/cuda/runtime_test.rb +28 -0
  99. data/test/cudnn_test.rb +498 -0
  100. data/test/cumo_test.rb +27 -0
  101. data/test/narray_test.rb +745 -0
  102. data/test/ractor_test.rb +52 -0
  103. data/test/test_helper.rb +31 -0
  104. metadata +31 -54
  105. data/.travis.yml +0 -5
  106. data/numo-narray-version +0 -1
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,1272 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2025-10-05 08:00:13 UTC using RuboCop version 1.81.1.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 7
10
+ # Configuration parameters: IgnoredGems, OnlyFor.
11
+ Bundler/GemComment:
12
+ Exclude:
13
+ - 'Gemfile'
14
+
15
+ # Offense count: 7
16
+ # Configuration parameters: AllowedGems.
17
+ # SupportedStyles: required, forbidden
18
+ Bundler/GemVersion:
19
+ EnforcedStyle: forbidden
20
+
21
+ # Offense count: 2
22
+ # This cop supports safe autocorrection (--autocorrect).
23
+ # Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation.
24
+ Bundler/OrderedGems:
25
+ Exclude:
26
+ - 'Gemfile'
27
+
28
+ # Offense count: 1
29
+ # Configuration parameters: EnforcedStyle, AllowedGems.
30
+ # SupportedStyles: required, forbidden
31
+ Gemspec/DependencyVersion:
32
+ Exclude:
33
+ - 'cumo.gemspec'
34
+
35
+ # Offense count: 2
36
+ # This cop supports safe autocorrection (--autocorrect).
37
+ # Configuration parameters: Severity.
38
+ Gemspec/DeprecatedAttributeAssignment:
39
+ Exclude:
40
+ - '3rd_party/mkmf-cu/mkmf-cu.gemspec'
41
+ - 'cumo.gemspec'
42
+
43
+ # Offense count: 1
44
+ # Configuration parameters: EnforcedStyle, AllowedGems.
45
+ # SupportedStyles: Gemfile, gems.rb, gemspec
46
+ Gemspec/DevelopmentDependencies:
47
+ Exclude:
48
+ - '3rd_party/mkmf-cu/mkmf-cu.gemspec'
49
+
50
+ # Offense count: 2
51
+ # This cop supports safe autocorrection (--autocorrect).
52
+ # Configuration parameters: Severity.
53
+ Gemspec/RequireMFA:
54
+ Exclude:
55
+ - '3rd_party/mkmf-cu/mkmf-cu.gemspec'
56
+ - 'cumo.gemspec'
57
+
58
+ # Offense count: 1
59
+ # Configuration parameters: Severity.
60
+ Gemspec/RequiredRubyVersion:
61
+ Exclude:
62
+ - '3rd_party/mkmf-cu/mkmf-cu.gemspec'
63
+
64
+ # Offense count: 1
65
+ # This cop supports safe autocorrection (--autocorrect).
66
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
67
+ # SupportedStyles: outdent, indent
68
+ Layout/AccessModifierIndentation:
69
+ Exclude:
70
+ - 'lib/cumo/narray/extra.rb'
71
+
72
+ # Offense count: 6
73
+ # This cop supports safe autocorrection (--autocorrect).
74
+ Layout/BlockEndNewline:
75
+ Exclude:
76
+ - 'test/narray_test.rb'
77
+
78
+ # Offense count: 5
79
+ # This cop supports unsafe autocorrection (--autocorrect-all).
80
+ # Configuration parameters: Categories, ExpectedOrder.
81
+ # ExpectedOrder: module_inclusion, constants, public_class_methods, initializer, public_methods, protected_methods, private_methods
82
+ Layout/ClassStructure:
83
+ Exclude:
84
+ - '3rd_party/mkmf-cu/lib/mkmf-cu/cli.rb'
85
+ - 'lib/cumo/narray/extra.rb'
86
+
87
+ # Offense count: 30
88
+ # This cop supports safe autocorrection (--autocorrect).
89
+ Layout/EmptyLineAfterGuardClause:
90
+ Exclude:
91
+ - '3rd_party/mkmf-cu/lib/mkmf-cu/cli.rb'
92
+ - 'ext/cumo/narray/gen/erbln.rb'
93
+ - 'ext/cumo/narray/gen/erbpp2.rb'
94
+ - 'lib/cumo/cuda/compiler.rb'
95
+ - 'lib/cumo/cuda/device.rb'
96
+ - 'lib/cumo/cuda/link_state.rb'
97
+ - 'lib/cumo/cuda/module.rb'
98
+ - 'lib/cumo/narray/extra.rb'
99
+
100
+ # Offense count: 1
101
+ # This cop supports safe autocorrection (--autocorrect).
102
+ Layout/EmptyLineAfterMultilineCondition:
103
+ Exclude:
104
+ - 'lib/cumo/narray/extra.rb'
105
+
106
+ # Offense count: 29
107
+ # This cop supports safe autocorrection (--autocorrect).
108
+ # Configuration parameters: EmptyLineBetweenMethodDefs, EmptyLineBetweenClassDefs, EmptyLineBetweenModuleDefs, DefLikeMacros, AllowAdjacentOneLineDefs, NumberOfEmptyLines.
109
+ Layout/EmptyLineBetweenDefs:
110
+ Exclude:
111
+ - 'ext/cumo/narray/gen/erbpp2.rb'
112
+ - 'lib/cumo/narray/extra.rb'
113
+
114
+ # Offense count: 7
115
+ # This cop supports safe autocorrection (--autocorrect).
116
+ Layout/EmptyLines:
117
+ Exclude:
118
+ - 'ext/cumo/narray/gen/erbpp2.rb'
119
+ - 'ext/cumo/narray/gen/spec.rb'
120
+ - 'lib/cumo/narray/extra.rb'
121
+
122
+ # Offense count: 5
123
+ # This cop supports safe autocorrection (--autocorrect).
124
+ Layout/EmptyLinesAfterModuleInclusion:
125
+ Exclude:
126
+ - 'ext/cumo/narray/gen/cogen.rb'
127
+ - 'ext/cumo/narray/gen/cogen_kernel.rb'
128
+ - 'ext/cumo/narray/gen/erbpp2.rb'
129
+ - 'ext/cumo/narray/gen/spec.rb'
130
+
131
+ # Offense count: 1
132
+ # This cop supports safe autocorrection (--autocorrect).
133
+ # Configuration parameters: EnforcedStyle.
134
+ # SupportedStyles: around, only_before
135
+ Layout/EmptyLinesAroundAccessModifier:
136
+ Exclude:
137
+ - 'lib/cumo/narray/extra.rb'
138
+
139
+ # Offense count: 5
140
+ # This cop supports safe autocorrection (--autocorrect).
141
+ # Configuration parameters: EnforcedStyle.
142
+ # SupportedStyles: empty_lines, no_empty_lines
143
+ Layout/EmptyLinesAroundBlockBody:
144
+ Exclude:
145
+ - 'test/bit_test.rb'
146
+ - 'test/narray_test.rb'
147
+
148
+ # Offense count: 11
149
+ # This cop supports safe autocorrection (--autocorrect).
150
+ # Configuration parameters: EnforcedStyle.
151
+ # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines, beginning_only, ending_only
152
+ Layout/EmptyLinesAroundClassBody:
153
+ Exclude:
154
+ - '3rd_party/mkmf-cu/test/test_mkmf-cu.rb'
155
+ - 'ext/cumo/narray/gen/erbln.rb'
156
+ - 'ext/cumo/narray/gen/erbpp2.rb'
157
+ - 'lib/cumo/narray/extra.rb'
158
+
159
+ # Offense count: 4
160
+ # This cop supports safe autocorrection (--autocorrect).
161
+ # Configuration parameters: EnforcedStyle.
162
+ # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines
163
+ Layout/EmptyLinesAroundModuleBody:
164
+ Exclude:
165
+ - 'ext/cumo/narray/gen/narray_def.rb'
166
+
167
+ # Offense count: 1
168
+ # This cop supports safe autocorrection (--autocorrect).
169
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
170
+ # SupportedStyles: special_inside_parentheses, consistent, align_brackets
171
+ Layout/FirstArrayElementIndentation:
172
+ Exclude:
173
+ - 'ext/cumo/extconf.rb'
174
+
175
+ # Offense count: 26
176
+ # This cop supports safe autocorrection (--autocorrect).
177
+ # Configuration parameters: AllowMultilineFinalElement.
178
+ Layout/FirstArrayElementLineBreak:
179
+ Exclude:
180
+ - '3rd_party/mkmf-cu/test/test_mkmf-cu.rb'
181
+ - 'test/narray_test.rb'
182
+
183
+ # Offense count: 1
184
+ # This cop supports safe autocorrection (--autocorrect).
185
+ # Configuration parameters: AllowMultilineFinalElement.
186
+ Layout/FirstHashElementLineBreak:
187
+ Exclude:
188
+ - 'ext/cumo/narray/gen/narray_def.rb'
189
+
190
+ # Offense count: 7
191
+ # This cop supports safe autocorrection (--autocorrect).
192
+ # Configuration parameters: AllowMultilineFinalElement, AllowedMethods.
193
+ Layout/FirstMethodArgumentLineBreak:
194
+ Exclude:
195
+ - '3rd_party/mkmf-cu/test/test_mkmf-cu.rb'
196
+ - 'ext/cumo/narray/gen/erbpp2.rb'
197
+ - 'test/narray_test.rb'
198
+ - 'test/ractor_test.rb'
199
+
200
+ # Offense count: 1
201
+ # This cop supports safe autocorrection (--autocorrect).
202
+ # Configuration parameters: AllowMultilineFinalElement.
203
+ Layout/FirstMethodParameterLineBreak:
204
+ Exclude:
205
+ - 'lib/cumo/narray/extra.rb'
206
+
207
+ # Offense count: 7
208
+ # This cop supports safe autocorrection (--autocorrect).
209
+ # Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
210
+ # SupportedHashRocketStyles: key, separator, table
211
+ # SupportedColonStyles: key, separator, table
212
+ # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
213
+ Layout/HashAlignment:
214
+ Exclude:
215
+ - 'ext/cumo/narray/gen/erbpp2.rb'
216
+ - 'ext/cumo/narray/gen/narray_def.rb'
217
+
218
+ # Offense count: 9
219
+ # This cop supports safe autocorrection (--autocorrect).
220
+ # Configuration parameters: Width, AllowedPatterns.
221
+ Layout/IndentationWidth:
222
+ Exclude:
223
+ - 'ext/cumo/narray/gen/spec.rb'
224
+ - 'lib/cumo/narray/extra.rb'
225
+
226
+ # Offense count: 16
227
+ # This cop supports safe autocorrection (--autocorrect).
228
+ # Configuration parameters: AllowDoxygenCommentStyle, AllowGemfileRubyComment, AllowRBSInlineAnnotation, AllowSteepAnnotation.
229
+ Layout/LeadingCommentSpace:
230
+ Exclude:
231
+ - 'ext/cumo/extconf.rb'
232
+ - 'ext/cumo/narray/gen/erbln.rb'
233
+ - 'ext/cumo/narray/gen/erbpp2.rb'
234
+ - 'lib/cumo/narray/extra.rb'
235
+ - 'test/narray_test.rb'
236
+
237
+ # Offense count: 6
238
+ # This cop supports safe autocorrection (--autocorrect).
239
+ # Configuration parameters: AllowMultilineFinalElement.
240
+ Layout/MultilineArrayLineBreaks:
241
+ Exclude:
242
+ - '3rd_party/mkmf-cu/test/test_mkmf-cu.rb'
243
+
244
+ # Offense count: 10
245
+ # This cop supports safe autocorrection (--autocorrect).
246
+ # Configuration parameters: EnforcedStyle.
247
+ # SupportedTypes: block, case, class, if, kwbegin, module
248
+ # SupportedStyles: same_line, new_line
249
+ Layout/MultilineAssignmentLayout:
250
+ Exclude:
251
+ - '3rd_party/mkmf-cu/lib/mkmf-cu/cli.rb'
252
+ - 'cumo.gemspec'
253
+ - 'lib/cumo/narray/extra.rb'
254
+ - 'test/ractor_test.rb'
255
+
256
+ # Offense count: 6
257
+ # This cop supports safe autocorrection (--autocorrect).
258
+ Layout/MultilineBlockLayout:
259
+ Exclude:
260
+ - 'test/narray_test.rb'
261
+
262
+ # Offense count: 2
263
+ # This cop supports safe autocorrection (--autocorrect).
264
+ # Configuration parameters: AllowMultilineFinalElement.
265
+ Layout/MultilineMethodParameterLineBreaks:
266
+ Exclude:
267
+ - 'lib/cumo/narray/extra.rb'
268
+
269
+ # Offense count: 8
270
+ # This cop supports safe autocorrection (--autocorrect).
271
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
272
+ # SupportedStyles: aligned, indented
273
+ Layout/MultilineOperationIndentation:
274
+ Exclude:
275
+ - 'lib/cumo/narray/extra.rb'
276
+ - 'test/narray_test.rb'
277
+
278
+ # Offense count: 16
279
+ # This cop supports safe autocorrection (--autocorrect).
280
+ # Configuration parameters: InspectBlocks.
281
+ Layout/RedundantLineBreak:
282
+ Exclude:
283
+ - '3rd_party/mkmf-cu/lib/mkmf-cu/cli.rb'
284
+ - '3rd_party/mkmf-cu/test/test_mkmf-cu.rb'
285
+ - 'ext/cumo/narray/gen/narray_def.rb'
286
+ - 'test/bit_test.rb'
287
+ - 'test/cudnn_test.rb'
288
+ - 'test/narray_test.rb'
289
+ - 'test/ractor_test.rb'
290
+ - 'test/test_helper.rb'
291
+
292
+ # Offense count: 5
293
+ # This cop supports safe autocorrection (--autocorrect).
294
+ Layout/SingleLineBlockChain:
295
+ Exclude:
296
+ - '3rd_party/mkmf-cu/test/test_mkmf-cu.rb'
297
+ - 'ext/cumo/narray/gen/erbpp2.rb'
298
+ - 'lib/cumo/narray/extra.rb'
299
+
300
+ # Offense count: 89
301
+ # This cop supports safe autocorrection (--autocorrect).
302
+ Layout/SpaceAfterColon:
303
+ Exclude:
304
+ - 'ext/cumo/narray/gen/erbpp2.rb'
305
+ - 'ext/cumo/narray/gen/narray_def.rb'
306
+ - 'ext/cumo/narray/gen/spec.rb'
307
+ - 'lib/cumo/narray/extra.rb'
308
+
309
+ # Offense count: 49
310
+ # This cop supports safe autocorrection (--autocorrect).
311
+ # Configuration parameters: EnforcedStyle.
312
+ # SupportedStyles: space, no_space
313
+ Layout/SpaceAroundEqualsInParameterDefault:
314
+ Exclude:
315
+ - 'ext/cumo/narray/gen/erbln.rb'
316
+ - 'ext/cumo/narray/gen/erbpp2.rb'
317
+ - 'ext/cumo/narray/gen/narray_def.rb'
318
+ - 'lib/cumo/narray/extra.rb'
319
+ - 'test/ractor_test.rb'
320
+
321
+ # Offense count: 4
322
+ # This cop supports safe autocorrection (--autocorrect).
323
+ Layout/SpaceBeforeComma:
324
+ Exclude:
325
+ - 'ext/cumo/narray/gen/spec.rb'
326
+
327
+ # Offense count: 20
328
+ # This cop supports safe autocorrection (--autocorrect).
329
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
330
+ # SupportedStyles: space, no_space, compact
331
+ # SupportedStylesForEmptyBraces: space, no_space
332
+ Layout/SpaceInsideHashLiteralBraces:
333
+ Exclude:
334
+ - '3rd_party/mkmf-cu/test/test_mkmf-cu.rb'
335
+ - 'ext/cumo/narray/gen/narray_def.rb'
336
+
337
+ # Offense count: 2
338
+ # This cop supports safe autocorrection (--autocorrect).
339
+ Layout/SpaceInsideRangeLiteral:
340
+ Exclude:
341
+ - 'lib/cumo/narray/extra.rb'
342
+
343
+ # Offense count: 14
344
+ # This cop supports safe autocorrection (--autocorrect).
345
+ # Configuration parameters: AllowedMethods, AllowedPatterns.
346
+ Lint/AmbiguousBlockAssociation:
347
+ Exclude:
348
+ - 'test/cudnn_test.rb'
349
+
350
+ # Offense count: 24
351
+ # This cop supports safe autocorrection (--autocorrect).
352
+ Lint/AmbiguousOperatorPrecedence:
353
+ Exclude:
354
+ - '3rd_party/mkmf-cu/lib/mkmf-cu/nvcc.rb'
355
+ - 'ext/cumo/narray/gen/erbpp2.rb'
356
+ - 'lib/cumo/narray/extra.rb'
357
+ - 'test/narray_test.rb'
358
+
359
+ # Offense count: 7
360
+ # This cop supports unsafe autocorrection (--autocorrect-all).
361
+ # Configuration parameters: RequireParenthesesForMethodChains.
362
+ Lint/AmbiguousRange:
363
+ Exclude:
364
+ - 'lib/cumo/narray/extra.rb'
365
+ - 'test/narray_test.rb'
366
+
367
+ # Offense count: 7
368
+ # This cop supports unsafe autocorrection (--autocorrect-all).
369
+ # Configuration parameters: AllowSafeAssignment.
370
+ Lint/AssignmentInCondition:
371
+ Exclude:
372
+ - '3rd_party/mkmf-cu/lib/mkmf-cu/nvcc.rb'
373
+ - 'ext/cumo/narray/gen/erbpp2.rb'
374
+
375
+ # Offense count: 1
376
+ # Configuration parameters: AllowedMethods.
377
+ # AllowedMethods: enums
378
+ Lint/ConstantDefinitionInBlock:
379
+ Exclude:
380
+ - 'test/cuda/compiler_test.rb'
381
+
382
+ # Offense count: 655
383
+ # Configuration parameters: Only, Ignore.
384
+ Lint/ConstantResolution:
385
+ Enabled: false
386
+
387
+ # Offense count: 1
388
+ # Configuration parameters: AllowComments.
389
+ Lint/EmptyWhen:
390
+ Exclude:
391
+ - 'ext/cumo/narray/gen/narray_def.rb'
392
+
393
+ # Offense count: 2
394
+ # This cop supports safe autocorrection (--autocorrect).
395
+ Lint/ErbNewArguments:
396
+ Exclude:
397
+ - 'ext/cumo/narray/gen/erbpp2.rb'
398
+
399
+ # Offense count: 7
400
+ Lint/FloatComparison:
401
+ Exclude:
402
+ - 'test/narray_test.rb'
403
+
404
+ # Offense count: 4
405
+ # This cop supports safe autocorrection (--autocorrect).
406
+ Lint/IdentityComparison:
407
+ Exclude:
408
+ - 'test/narray_test.rb'
409
+
410
+ # Offense count: 1
411
+ # Configuration parameters: AllowedParentClasses.
412
+ Lint/MissingSuper:
413
+ Exclude:
414
+ - 'lib/cumo/cuda/compile_error.rb'
415
+
416
+ # Offense count: 1
417
+ # This cop supports unsafe autocorrection (--autocorrect-all).
418
+ Lint/NonAtomicFileOperation:
419
+ Exclude:
420
+ - 'lib/cumo/cuda/compiler.rb'
421
+
422
+ # Offense count: 24
423
+ # This cop supports unsafe autocorrection (--autocorrect-all).
424
+ # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredClasses.
425
+ # IgnoredClasses: Time, DateTime
426
+ Lint/NumberConversion:
427
+ Exclude:
428
+ - 'bench/cumo_bench.rb'
429
+ - 'bench/numo_bench.rb'
430
+ - 'ext/cumo/narray/gen/cogen_kernel.rb'
431
+ - 'ext/cumo/narray/gen/erbln.rb'
432
+ - 'lib/cumo/narray/extra.rb'
433
+ - 'test/cudnn_test.rb'
434
+
435
+ # Offense count: 2
436
+ # This cop supports safe autocorrection (--autocorrect).
437
+ Lint/ScriptPermission:
438
+ Exclude:
439
+ - 'ext/cumo/narray/gen/cogen.rb'
440
+ - 'ext/cumo/narray/gen/cogen_kernel.rb'
441
+
442
+ # Offense count: 1
443
+ # Configuration parameters: AllowComments, AllowNil.
444
+ Lint/SuppressedException:
445
+ Exclude:
446
+ - 'ext/cumo/extconf.rb'
447
+
448
+ # Offense count: 1
449
+ # Configuration parameters: AllowKeywordBlockArguments.
450
+ Lint/UnderscorePrefixedVariableName:
451
+ Exclude:
452
+ - 'ext/cumo/narray/gen/erbpp2.rb'
453
+
454
+ # Offense count: 6
455
+ # This cop supports safe autocorrection (--autocorrect).
456
+ # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
457
+ Lint/UnusedBlockArgument:
458
+ Exclude:
459
+ - '3rd_party/mkmf-cu/lib/mkmf-cu/nvcc.rb'
460
+ - 'lib/cumo/narray/extra.rb'
461
+
462
+ # Offense count: 2
463
+ # This cop supports safe autocorrection (--autocorrect).
464
+ # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods, NotImplementedExceptions.
465
+ # NotImplementedExceptions: NotImplementedError
466
+ Lint/UnusedMethodArgument:
467
+ Exclude:
468
+ - '3rd_party/mkmf-cu/lib/mkmf-cu/nvcc.rb'
469
+ - 'ext/cumo/narray/gen/narray_def.rb'
470
+
471
+ # Offense count: 3
472
+ # This cop supports safe autocorrection (--autocorrect).
473
+ Lint/UselessAssignment:
474
+ Exclude:
475
+ - '3rd_party/mkmf-cu/lib/mkmf-cu/nvcc.rb'
476
+ - 'bench/numo_bench.rb'
477
+
478
+ # Offense count: 3
479
+ # This cop supports safe autocorrection (--autocorrect).
480
+ # Configuration parameters: CheckForMethodsWithNoSideEffects.
481
+ Lint/Void:
482
+ Exclude:
483
+ - 'test/bit_test.rb'
484
+ - 'test/narray_test.rb'
485
+
486
+ # Offense count: 4
487
+ Naming/AccessorMethodName:
488
+ Exclude:
489
+ - 'lib/cumo/cuda/compiler.rb'
490
+ - 'lib/cumo/cuda/device.rb'
491
+
492
+ # Offense count: 2
493
+ # Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, CheckDefinitionPathHierarchyRoots, Regex, IgnoreExecutableScripts, AllowedAcronyms.
494
+ # CheckDefinitionPathHierarchyRoots: lib, spec, test, src
495
+ # AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
496
+ Naming/FileName:
497
+ Exclude:
498
+ - 'Rakefile.rb'
499
+ - '3rd_party/mkmf-cu/lib/mkmf-cu.rb'
500
+ - '3rd_party/mkmf-cu/test/test_mkmf-cu.rb'
501
+
502
+ # Offense count: 13
503
+ # Configuration parameters: EnforcedStyle, AllowedPatterns, ForbiddenIdentifiers, ForbiddenPatterns.
504
+ # SupportedStyles: snake_case, camelCase
505
+ # ForbiddenIdentifiers: __id__, __send__
506
+ Naming/MethodName:
507
+ Exclude:
508
+ - '3rd_party/mkmf-cu/test/test_mkmf-cu.rb'
509
+ - 'test/cuda/nvrtc_test.rb'
510
+ - 'test/cuda/runtime_test.rb'
511
+
512
+ # Offense count: 61
513
+ # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
514
+ # AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to
515
+ Naming/MethodParameterName:
516
+ Exclude:
517
+ - 'ext/cumo/narray/gen/erbln.rb'
518
+ - 'ext/cumo/narray/gen/erbpp2.rb'
519
+ - 'ext/cumo/narray/gen/narray_def.rb'
520
+ - 'lib/cumo/cuda/cudnn.rb'
521
+ - 'lib/cumo/linalg.rb'
522
+ - 'lib/cumo/narray/extra.rb'
523
+ - 'test/ractor_test.rb'
524
+
525
+ # Offense count: 1
526
+ # Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros, UseSorbetSigs.
527
+ # NamePrefix: is_, has_, have_, does_
528
+ # ForbiddenPrefixes: is_, has_, have_, does_
529
+ # AllowedMethods: is_a?
530
+ # MethodDefinitionMacros: define_method, define_singleton_method
531
+ Naming/PredicatePrefix:
532
+ Exclude:
533
+ - 'spec/**/*'
534
+ - 'ext/cumo/extconf.rb'
535
+
536
+ # Offense count: 1
537
+ # Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
538
+ # SupportedStyles: snake_case, normalcase, non_integer
539
+ # AllowedIdentifiers: TLS1_1, TLS1_2, capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339, x86_64
540
+ Naming/VariableNumber:
541
+ Exclude:
542
+ - 'test/cudnn_test.rb'
543
+
544
+ # Offense count: 6
545
+ Security/Eval:
546
+ Exclude:
547
+ - 'ext/cumo/narray/gen/cogen.rb'
548
+ - 'ext/cumo/narray/gen/cogen_kernel.rb'
549
+ - 'ext/cumo/narray/gen/erbln.rb'
550
+ - 'lib/cumo/narray/extra.rb'
551
+
552
+ # Offense count: 2
553
+ Security/Open:
554
+ Exclude:
555
+ - 'ext/cumo/narray/gen/cogen.rb'
556
+ - 'ext/cumo/narray/gen/cogen_kernel.rb'
557
+
558
+ # Offense count: 2
559
+ # This cop supports safe autocorrection (--autocorrect).
560
+ # Configuration parameters: EnforcedStyle.
561
+ # SupportedStyles: prefer_alias, prefer_alias_method
562
+ Style/Alias:
563
+ Exclude:
564
+ - 'lib/cumo/cuda/cudnn.rb'
565
+
566
+ # Offense count: 3
567
+ # This cop supports unsafe autocorrection (--autocorrect-all).
568
+ # Configuration parameters: EnforcedStyle.
569
+ # SupportedStyles: always, conditionals
570
+ Style/AndOr:
571
+ Exclude:
572
+ - '3rd_party/mkmf-cu/lib/mkmf-cu/nvcc.rb'
573
+ - 'lib/cumo/cuda/compiler.rb'
574
+ - 'lib/cumo/narray/extra.rb'
575
+
576
+ # Offense count: 8
577
+ # This cop supports safe autocorrection (--autocorrect).
578
+ # Configuration parameters: AllowOnlyRestArgument, UseAnonymousForwarding, RedundantRestArgumentNames, RedundantKeywordRestArgumentNames, RedundantBlockArgumentNames.
579
+ # RedundantRestArgumentNames: args, arguments
580
+ # RedundantKeywordRestArgumentNames: kwargs, options, opts
581
+ # RedundantBlockArgumentNames: blk, block, proc
582
+ Style/ArgumentsForwarding:
583
+ Exclude:
584
+ - 'ext/cumo/narray/gen/erbpp2.rb'
585
+
586
+ # Offense count: 19
587
+ # This cop supports unsafe autocorrection (--autocorrect-all).
588
+ Style/ArrayFirstLast:
589
+ Exclude:
590
+ - 'ext/cumo/narray/gen/cogen.rb'
591
+ - 'ext/cumo/narray/gen/cogen_kernel.rb'
592
+ - 'ext/cumo/narray/gen/erbln.rb'
593
+ - 'ext/cumo/narray/gen/erbpp2.rb'
594
+ - 'lib/cumo/narray/extra.rb'
595
+ - 'test/bit_test.rb'
596
+ - 'test/narray_test.rb'
597
+
598
+ # Offense count: 1
599
+ # Configuration parameters: AllowedChars.
600
+ # AllowedChars: ©
601
+ Style/AsciiComments:
602
+ Exclude:
603
+ - '3rd_party/mkmf-cu/lib/mkmf-cu/cli.rb'
604
+
605
+ # Offense count: 21
606
+ # This cop supports safe autocorrection (--autocorrect).
607
+ # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
608
+ # SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
609
+ # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
610
+ # FunctionalMethods: let, let!, subject, watch
611
+ # AllowedMethods: lambda, proc, it
612
+ Style/BlockDelimiters:
613
+ Exclude:
614
+ - '3rd_party/mkmf-cu/lib/mkmf-cu/nvcc.rb'
615
+ - 'test/narray_test.rb'
616
+
617
+ # Offense count: 1
618
+ # This cop supports safe autocorrection (--autocorrect).
619
+ # Configuration parameters: AllowOnConstant, AllowOnSelfClass.
620
+ Style/CaseEquality:
621
+ Exclude:
622
+ - 'lib/cumo/narray/extra.rb'
623
+
624
+ # Offense count: 11
625
+ # This cop supports unsafe autocorrection (--autocorrect-all).
626
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForClasses, EnforcedStyleForModules.
627
+ # SupportedStyles: nested, compact
628
+ # SupportedStylesForClasses: ~, nested, compact
629
+ # SupportedStylesForModules: ~, nested, compact
630
+ Style/ClassAndModuleChildren:
631
+ Exclude:
632
+ - 'lib/cumo/cuda/compile_error.rb'
633
+ - 'lib/cumo/cuda/compiler.rb'
634
+ - 'lib/cumo/cuda/device.rb'
635
+ - 'lib/cumo/cuda/link_state.rb'
636
+ - 'lib/cumo/cuda/module.rb'
637
+ - 'lib/cumo/cuda/nvrtc_program.rb'
638
+ - 'test/cuda/compiler_test.rb'
639
+ - 'test/cuda/device_test.rb'
640
+ - 'test/cuda/memory_pool_test.rb'
641
+ - 'test/cuda/nvrtc_test.rb'
642
+ - 'test/cuda/runtime_test.rb'
643
+
644
+ # Offense count: 5
645
+ # This cop supports safe autocorrection (--autocorrect).
646
+ # Configuration parameters: EnforcedStyle.
647
+ # SupportedStyles: is_a?, kind_of?
648
+ Style/ClassCheck:
649
+ Exclude:
650
+ - 'ext/cumo/narray/gen/erbpp2.rb'
651
+ - 'lib/cumo/narray/extra.rb'
652
+
653
+ # Offense count: 4
654
+ # This cop supports safe autocorrection (--autocorrect).
655
+ # Configuration parameters: EnforcedStyle.
656
+ # SupportedStyles: def_self, self_class
657
+ Style/ClassMethodsDefinitions:
658
+ Exclude:
659
+ - '3rd_party/mkmf-cu/lib/mkmf-cu.rb'
660
+ - 'lib/cumo/cuda/cudnn.rb'
661
+ - 'lib/cumo/linalg.rb'
662
+ - 'test/cuda/compiler_test.rb'
663
+
664
+ # Offense count: 4
665
+ Style/ClassVars:
666
+ Exclude:
667
+ - 'lib/cumo/cuda/compiler.rb'
668
+ - 'lib/cumo/narray/extra.rb'
669
+
670
+ # Offense count: 2
671
+ # This cop supports unsafe autocorrection (--autocorrect-all).
672
+ Style/CommentedKeyword:
673
+ Exclude:
674
+ - 'ext/cumo/narray/gen/spec.rb'
675
+ - 'lib/cumo/narray/extra.rb'
676
+
677
+ # Offense count: 10
678
+ # This cop supports safe autocorrection (--autocorrect).
679
+ # Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
680
+ # SupportedStyles: assign_to_condition, assign_inside_condition
681
+ Style/ConditionalAssignment:
682
+ Exclude:
683
+ - '3rd_party/mkmf-cu/lib/mkmf-cu/cli.rb'
684
+ - '3rd_party/mkmf-cu/lib/mkmf-cu/nvcc.rb'
685
+ - 'ext/cumo/extconf.rb'
686
+ - 'ext/cumo/narray/gen/erbln.rb'
687
+ - 'ext/cumo/narray/gen/narray_def.rb'
688
+ - 'lib/cumo/cuda/device.rb'
689
+ - 'lib/cumo/narray/extra.rb'
690
+
691
+ # Offense count: 6
692
+ # Configuration parameters: IgnoreModules.
693
+ Style/ConstantVisibility:
694
+ Exclude:
695
+ - '3rd_party/mkmf-cu/lib/mkmf-cu.rb'
696
+ - '3rd_party/mkmf-cu/lib/mkmf-cu/cli.rb'
697
+ - 'lib/cumo/cuda/compiler.rb'
698
+ - 'test/test_helper.rb'
699
+
700
+ # Offense count: 38
701
+ # Configuration parameters: AllowedConstants.
702
+ Style/Documentation:
703
+ Exclude:
704
+ - 'spec/**/*'
705
+ - 'test/**/*'
706
+ - '3rd_party/mkmf-cu/lib/mkmf-cu.rb'
707
+ - '3rd_party/mkmf-cu/lib/mkmf-cu/cli.rb'
708
+ - '3rd_party/mkmf-cu/lib/mkmf-cu/nvcc.rb'
709
+ - '3rd_party/mkmf-cu/test/test_mkmf-cu.rb'
710
+ - 'ext/cumo/narray/gen/erbln.rb'
711
+ - 'ext/cumo/narray/gen/erbpp2.rb'
712
+ - 'ext/cumo/narray/gen/narray_def.rb'
713
+ - 'lib/cumo/cuda.rb'
714
+ - 'lib/cumo/cuda/compile_error.rb'
715
+ - 'lib/cumo/cuda/compiler.rb'
716
+ - 'lib/cumo/cuda/cudnn.rb'
717
+ - 'lib/cumo/cuda/device.rb'
718
+ - 'lib/cumo/cuda/nvrtc_program.rb'
719
+ - 'lib/cumo/linalg.rb'
720
+ - 'lib/cumo/narray/extra.rb'
721
+
722
+ # Offense count: 203
723
+ # Configuration parameters: AllowedMethods, RequireForNonPublicMethods.
724
+ Style/DocumentationMethod:
725
+ Enabled: false
726
+
727
+ # Offense count: 1
728
+ # This cop supports safe autocorrection (--autocorrect).
729
+ # Configuration parameters: EnforcedStyle, AllowComments.
730
+ # SupportedStyles: empty, nil, both
731
+ Style/EmptyElse:
732
+ Exclude:
733
+ - 'ext/cumo/narray/gen/erbln.rb'
734
+
735
+ # Offense count: 1
736
+ # This cop supports safe autocorrection (--autocorrect).
737
+ # Configuration parameters: EnforcedStyle.
738
+ # SupportedStyles: compact, expanded
739
+ Style/EmptyMethod:
740
+ Exclude:
741
+ - 'ext/cumo/narray/gen/erbpp2.rb'
742
+
743
+ # Offense count: 8
744
+ # This cop supports safe autocorrection (--autocorrect).
745
+ Style/EvalWithLocation:
746
+ Exclude:
747
+ - 'test/narray_test.rb'
748
+
749
+ # Offense count: 3
750
+ # This cop supports safe autocorrection (--autocorrect).
751
+ Style/ExpandPathArguments:
752
+ Exclude:
753
+ - 'cumo.gemspec'
754
+ - 'ext/cumo/narray/gen/cogen_kernel.rb'
755
+ - 'test/test_helper.rb'
756
+
757
+ # Offense count: 1
758
+ # This cop supports safe autocorrection (--autocorrect).
759
+ # Configuration parameters: AllowedVars, DefaultToNil.
760
+ Style/FetchEnvVar:
761
+ Exclude:
762
+ - 'lib/cumo/cuda/compiler.rb'
763
+
764
+ # Offense count: 2
765
+ # This cop supports safe autocorrection (--autocorrect).
766
+ Style/FileWrite:
767
+ Exclude:
768
+ - 'lib/cumo/cuda/compiler.rb'
769
+
770
+ # Offense count: 29
771
+ # Configuration parameters: AllowedVariables.
772
+ Style/GlobalVars:
773
+ Exclude:
774
+ - 'ext/cumo/extconf.rb'
775
+ - 'ext/cumo/narray/gen/cogen.rb'
776
+ - 'ext/cumo/narray/gen/cogen_kernel.rb'
777
+
778
+ # Offense count: 12
779
+ # This cop supports safe autocorrection (--autocorrect).
780
+ # Configuration parameters: MinBodyLength, AllowConsecutiveConditionals.
781
+ Style/GuardClause:
782
+ Exclude:
783
+ - 'ext/cumo/extconf.rb'
784
+ - 'ext/cumo/narray/gen/erbpp2.rb'
785
+ - 'lib/cumo/cuda/link_state.rb'
786
+ - 'lib/cumo/cuda/module.rb'
787
+ - 'lib/cumo/narray/extra.rb'
788
+
789
+ # Offense count: 4
790
+ # This cop supports safe autocorrection (--autocorrect).
791
+ # Configuration parameters: EnforcedStyle, EnforcedShorthandSyntax, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
792
+ # SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
793
+ # SupportedShorthandSyntax: always, never, either, consistent, either_consistent
794
+ Style/HashSyntax:
795
+ Exclude:
796
+ - '3rd_party/mkmf-cu/Rakefile'
797
+ - 'Rakefile'
798
+
799
+ # Offense count: 2
800
+ # This cop supports unsafe autocorrection (--autocorrect-all).
801
+ Style/IdenticalConditionalBranches:
802
+ Exclude:
803
+ - 'lib/cumo/narray/extra.rb'
804
+
805
+ # Offense count: 1
806
+ # This cop supports safe autocorrection (--autocorrect).
807
+ # Configuration parameters: AllowIfModifier.
808
+ Style/IfInsideElse:
809
+ Exclude:
810
+ - 'ext/cumo/narray/gen/erbln.rb'
811
+
812
+ # Offense count: 50
813
+ # This cop supports safe autocorrection (--autocorrect).
814
+ Style/IfUnlessModifier:
815
+ Exclude:
816
+ - '3rd_party/mkmf-cu/lib/mkmf-cu/cli.rb'
817
+ - '3rd_party/mkmf-cu/lib/mkmf-cu/nvcc.rb'
818
+ - 'ext/cumo/extconf.rb'
819
+ - 'ext/cumo/narray/gen/erbln.rb'
820
+ - 'ext/cumo/narray/gen/erbpp2.rb'
821
+ - 'ext/cumo/narray/gen/spec.rb'
822
+ - 'lib/cumo/cuda/compiler.rb'
823
+ - 'lib/cumo/narray/extra.rb'
824
+ - 'test/cudnn_test.rb'
825
+ - 'test/narray_test.rb'
826
+
827
+ # Offense count: 7
828
+ Style/ImplicitRuntimeError:
829
+ Exclude:
830
+ - '3rd_party/mkmf-cu/lib/mkmf-cu/cli.rb'
831
+ - '3rd_party/mkmf-cu/lib/mkmf-cu/nvcc.rb'
832
+ - 'ext/cumo/narray/gen/narray_def.rb'
833
+ - 'lib/cumo/cuda/cudnn.rb'
834
+
835
+ # Offense count: 2
836
+ # This cop supports unsafe autocorrection (--autocorrect-all).
837
+ Style/InfiniteLoop:
838
+ Exclude:
839
+ - 'ext/cumo/narray/gen/cogen.rb'
840
+ - 'ext/cumo/narray/gen/cogen_kernel.rb'
841
+
842
+ # Offense count: 32
843
+ Style/InlineComment:
844
+ Exclude:
845
+ - '3rd_party/mkmf-cu/lib/mkmf-cu/cli.rb'
846
+ - 'bench/cumo_bench.rb'
847
+ - 'ext/cumo/extconf.rb'
848
+ - 'ext/cumo/narray/gen/spec.rb'
849
+ - 'lib/cumo/cuda/nvrtc_program.rb'
850
+ - 'lib/cumo/narray/extra.rb'
851
+ - 'test/narray_test.rb'
852
+
853
+ # Offense count: 2
854
+ # This cop supports unsafe autocorrection (--autocorrect-all).
855
+ # Configuration parameters: InverseMethods, InverseBlocks.
856
+ Style/InverseMethods:
857
+ Exclude:
858
+ - 'test/bit_test.rb'
859
+
860
+ # Offense count: 2
861
+ # This cop supports unsafe autocorrection (--autocorrect-all).
862
+ # Configuration parameters: InverseMethods.
863
+ Style/InvertibleUnlessCondition:
864
+ Exclude:
865
+ - 'lib/cumo/cuda/compiler.rb'
866
+ - 'lib/cumo/cuda/device.rb'
867
+
868
+ # Offense count: 122
869
+ # This cop supports safe autocorrection (--autocorrect).
870
+ # Configuration parameters: IgnoreMacros, AllowedMethods, AllowedPatterns, IncludedMacros, AllowParenthesesInMultilineCall, AllowParenthesesInChaining, AllowParenthesesInCamelCaseMethod, AllowParenthesesInStringInterpolation, EnforcedStyle.
871
+ # SupportedStyles: require_parentheses, omit_parentheses
872
+ Style/MethodCallWithArgsParentheses:
873
+ Enabled: false
874
+
875
+ # Offense count: 4
876
+ # This cop supports safe autocorrection (--autocorrect).
877
+ # Configuration parameters: AllowedMethods, AllowedPatterns.
878
+ Style/MethodCallWithoutArgsParentheses:
879
+ Exclude:
880
+ - '3rd_party/mkmf-cu/lib/mkmf-cu/nvcc.rb'
881
+ - '3rd_party/mkmf-cu/test/test_mkmf-cu.rb'
882
+ - 'lib/cumo/cuda/compiler.rb'
883
+
884
+ # Offense count: 3
885
+ Style/MethodCalledOnDoEndBlock:
886
+ Exclude:
887
+ - 'ext/cumo/narray/gen/cogen.rb'
888
+ - 'ext/cumo/narray/gen/cogen_kernel.rb'
889
+ - 'lib/cumo/narray/extra.rb'
890
+
891
+ # Offense count: 106
892
+ # This cop supports safe autocorrection (--autocorrect).
893
+ # Configuration parameters: EnforcedStyle.
894
+ # SupportedStyles: if, case, both
895
+ Style/MissingElse:
896
+ Enabled: false
897
+
898
+ # Offense count: 1
899
+ Style/MissingRespondToMissing:
900
+ Exclude:
901
+ - 'ext/cumo/narray/gen/erbpp2.rb'
902
+
903
+ # Offense count: 1
904
+ # This cop supports safe autocorrection (--autocorrect).
905
+ Style/MultilineMethodSignature:
906
+ Exclude:
907
+ - 'lib/cumo/narray/extra.rb'
908
+
909
+ # Offense count: 5
910
+ # This cop supports safe autocorrection (--autocorrect).
911
+ # Configuration parameters: AllowMethodComparison, ComparisonsThreshold.
912
+ Style/MultipleComparison:
913
+ Exclude:
914
+ - 'test/cudnn_test.rb'
915
+ - 'test/narray_test.rb'
916
+
917
+ # Offense count: 3
918
+ # This cop supports unsafe autocorrection (--autocorrect-all).
919
+ # Configuration parameters: EnforcedStyle.
920
+ # SupportedStyles: literals, strict
921
+ Style/MutableConstant:
922
+ Exclude:
923
+ - '3rd_party/mkmf-cu/lib/mkmf-cu/cli.rb'
924
+ - 'test/test_helper.rb'
925
+
926
+ # Offense count: 14
927
+ # This cop supports safe autocorrection (--autocorrect).
928
+ # Configuration parameters: EnforcedStyle.
929
+ # SupportedStyles: both, prefix, postfix
930
+ Style/NegatedIf:
931
+ Exclude:
932
+ - 'ext/cumo/extconf.rb'
933
+ - 'ext/cumo/narray/gen/erbpp2.rb'
934
+ - 'ext/cumo/narray/gen/spec.rb'
935
+ - 'lib/cumo/narray/extra.rb'
936
+
937
+ # Offense count: 2
938
+ # This cop supports safe autocorrection (--autocorrect).
939
+ # Configuration parameters: EnforcedStyle, MinBodyLength, AllowConsecutiveConditionals.
940
+ # SupportedStyles: skip_modifier_ifs, always
941
+ Style/Next:
942
+ Exclude:
943
+ - 'ext/cumo/narray/gen/erbpp2.rb'
944
+ - 'lib/cumo/narray/extra.rb'
945
+
946
+ # Offense count: 44
947
+ # This cop supports safe autocorrection (--autocorrect).
948
+ # Configuration parameters: Strict, AllowedNumbers, AllowedPatterns.
949
+ Style/NumericLiterals:
950
+ MinDigits: 10
951
+
952
+ # Offense count: 30
953
+ # This cop supports unsafe autocorrection (--autocorrect-all).
954
+ # Configuration parameters: EnforcedStyle, AllowedMethods, AllowedPatterns.
955
+ # SupportedStyles: predicate, comparison
956
+ Style/NumericPredicate:
957
+ Exclude:
958
+ - 'spec/**/*'
959
+ - '3rd_party/mkmf-cu/lib/mkmf-cu/nvcc.rb'
960
+ - 'lib/cumo/cuda/compiler.rb'
961
+ - 'lib/cumo/cuda/cudnn.rb'
962
+ - 'lib/cumo/narray/extra.rb'
963
+ - 'test/bit_test.rb'
964
+ - 'test/cuda/device_test.rb'
965
+ - 'test/cuda/runtime_test.rb'
966
+ - 'test/narray_test.rb'
967
+
968
+ # Offense count: 1
969
+ Style/OptionalArguments:
970
+ Exclude:
971
+ - 'ext/cumo/narray/gen/erbpp2.rb'
972
+
973
+ # Offense count: 1
974
+ # This cop supports safe autocorrection (--autocorrect).
975
+ Style/OrAssignment:
976
+ Exclude:
977
+ - 'ext/cumo/narray/gen/narray_def.rb'
978
+
979
+ # Offense count: 2
980
+ # This cop supports safe autocorrection (--autocorrect).
981
+ # Configuration parameters: AllowSafeAssignment, AllowInMultilineConditions.
982
+ Style/ParenthesesAroundCondition:
983
+ Exclude:
984
+ - 'ext/cumo/narray/gen/cogen.rb'
985
+ - 'ext/cumo/narray/gen/cogen_kernel.rb'
986
+
987
+ # Offense count: 3
988
+ # This cop supports safe autocorrection (--autocorrect).
989
+ # Configuration parameters: PreferredDelimiters.
990
+ Style/PercentLiteralDelimiters:
991
+ Exclude:
992
+ - 'cumo.gemspec'
993
+ - 'ext/cumo/extconf.rb'
994
+
995
+ # Offense count: 6
996
+ # This cop supports safe autocorrection (--autocorrect).
997
+ Style/PerlBackrefs:
998
+ Exclude:
999
+ - '3rd_party/mkmf-cu/lib/mkmf-cu/cli.rb'
1000
+ - '3rd_party/mkmf-cu/lib/mkmf-cu/nvcc.rb'
1001
+ - 'ext/cumo/narray/gen/erbln.rb'
1002
+
1003
+ # Offense count: 1
1004
+ # This cop supports unsafe autocorrection (--autocorrect-all).
1005
+ # Configuration parameters: EnforcedStyle.
1006
+ # SupportedStyles: short, verbose
1007
+ Style/PreferredHashMethods:
1008
+ Exclude:
1009
+ - 'ext/cumo/narray/gen/erbpp2.rb'
1010
+
1011
+ # Offense count: 1
1012
+ # This cop supports unsafe autocorrection (--autocorrect-all).
1013
+ # Configuration parameters: Methods.
1014
+ Style/RedundantArgument:
1015
+ Exclude:
1016
+ - 'test/narray_test.rb'
1017
+
1018
+ # Offense count: 1
1019
+ # This cop supports safe autocorrection (--autocorrect).
1020
+ Style/RedundantBegin:
1021
+ Exclude:
1022
+ - 'lib/cumo/cuda/nvrtc_program.rb'
1023
+
1024
+ # Offense count: 1
1025
+ # This cop supports safe autocorrection (--autocorrect).
1026
+ # Configuration parameters: AllowedMethods.
1027
+ # AllowedMethods: nonzero?
1028
+ Style/RedundantCondition:
1029
+ Exclude:
1030
+ - 'lib/cumo/cuda/device.rb'
1031
+
1032
+ # Offense count: 1
1033
+ # This cop supports safe autocorrection (--autocorrect).
1034
+ Style/RedundantFileExtensionInRequire:
1035
+ Exclude:
1036
+ - 'ext/cumo/extconf.rb'
1037
+
1038
+ # Offense count: 20
1039
+ # This cop supports safe autocorrection (--autocorrect).
1040
+ Style/RedundantParentheses:
1041
+ Exclude:
1042
+ - 'bench/cumo_bench.rb'
1043
+ - 'bench/numo_bench.rb'
1044
+ - 'ext/cumo/narray/gen/erbln.rb'
1045
+ - 'ext/cumo/narray/gen/erbpp2.rb'
1046
+ - 'test/bit_test.rb'
1047
+ - 'test/ractor_test.rb'
1048
+
1049
+ # Offense count: 2
1050
+ # This cop supports safe autocorrection (--autocorrect).
1051
+ Style/RedundantPercentQ:
1052
+ Exclude:
1053
+ - 'cumo.gemspec'
1054
+
1055
+ # Offense count: 7
1056
+ # This cop supports safe autocorrection (--autocorrect).
1057
+ Style/RedundantRegexpArgument:
1058
+ Exclude:
1059
+ - 'ext/cumo/narray/gen/erbpp2.rb'
1060
+
1061
+ # Offense count: 7
1062
+ # This cop supports safe autocorrection (--autocorrect).
1063
+ Style/RedundantRegexpEscape:
1064
+ Exclude:
1065
+ - '3rd_party/mkmf-cu/lib/mkmf-cu/nvcc.rb'
1066
+ - 'ext/cumo/narray/gen/erbpp2.rb'
1067
+
1068
+ # Offense count: 14
1069
+ # This cop supports safe autocorrection (--autocorrect).
1070
+ # Configuration parameters: AllowMultipleReturnValues.
1071
+ Style/RedundantReturn:
1072
+ Exclude:
1073
+ - '3rd_party/mkmf-cu/lib/mkmf-cu/nvcc.rb'
1074
+ - 'lib/cumo/cuda/compiler.rb'
1075
+ - 'lib/cumo/cuda/nvrtc_program.rb'
1076
+ - 'lib/cumo/narray/extra.rb'
1077
+
1078
+ # Offense count: 19
1079
+ # This cop supports safe autocorrection (--autocorrect).
1080
+ Style/RedundantSelf:
1081
+ Exclude:
1082
+ - 'ext/cumo/narray/gen/erbln.rb'
1083
+ - 'lib/cumo/cuda/cudnn.rb'
1084
+ - 'lib/cumo/narray/extra.rb'
1085
+
1086
+ # Offense count: 2
1087
+ # This cop supports safe autocorrection (--autocorrect).
1088
+ # Configuration parameters: EnforcedStyle, AllowInnerSlashes.
1089
+ # SupportedStyles: slashes, percent_r, mixed
1090
+ Style/RegexpLiteral:
1091
+ Exclude:
1092
+ - 'ext/cumo/narray/gen/erbln.rb'
1093
+
1094
+ # Offense count: 13
1095
+ # This cop supports unsafe autocorrection (--autocorrect-all).
1096
+ Style/RequireOrder:
1097
+ Exclude:
1098
+ - '3rd_party/mkmf-cu/Rakefile'
1099
+ - '3rd_party/mkmf-cu/test/test_mkmf-cu.rb'
1100
+ - 'bench/cumo_bench.rb'
1101
+ - 'bench/numo_bench.rb'
1102
+ - 'ext/cumo/extconf.rb'
1103
+ - 'lib/cumo/cuda.rb'
1104
+ - 'lib/cumo/cuda/compiler.rb'
1105
+
1106
+ # Offense count: 1
1107
+ # This cop supports safe autocorrection (--autocorrect).
1108
+ Style/RescueModifier:
1109
+ Exclude:
1110
+ - 'lib/cumo/cuda/compiler.rb'
1111
+
1112
+ # Offense count: 1
1113
+ # This cop supports safe autocorrection (--autocorrect).
1114
+ # Configuration parameters: EnforcedStyle.
1115
+ # SupportedStyles: return, return_nil
1116
+ Style/ReturnNil:
1117
+ Exclude:
1118
+ - 'lib/cumo/cuda/compiler.rb'
1119
+
1120
+ # Offense count: 1
1121
+ # This cop supports unsafe autocorrection (--autocorrect-all).
1122
+ # Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.
1123
+ # AllowedMethods: present?, blank?, presence, try, try!
1124
+ Style/SafeNavigation:
1125
+ Exclude:
1126
+ - 'ext/cumo/narray/gen/erbpp2.rb'
1127
+
1128
+ # Offense count: 1
1129
+ # This cop supports safe autocorrection (--autocorrect).
1130
+ Style/SelfAssignment:
1131
+ Exclude:
1132
+ - 'lib/cumo/narray/extra.rb'
1133
+
1134
+ # Offense count: 2
1135
+ # This cop supports safe autocorrection (--autocorrect).
1136
+ # Configuration parameters: AllowAsExpressionSeparator.
1137
+ Style/Semicolon:
1138
+ Exclude:
1139
+ - 'ext/cumo/narray/gen/erbpp2.rb'
1140
+
1141
+ # Offense count: 1
1142
+ Style/Send:
1143
+ Exclude:
1144
+ - 'ext/cumo/narray/gen/erbpp2.rb'
1145
+
1146
+ # Offense count: 16
1147
+ # This cop supports unsafe autocorrection (--autocorrect-all).
1148
+ Style/SlicingWithRange:
1149
+ Exclude:
1150
+ - '3rd_party/mkmf-cu/lib/mkmf-cu/cli.rb'
1151
+ - 'lib/cumo/cuda/compiler.rb'
1152
+ - 'lib/cumo/narray/extra.rb'
1153
+ - 'test/bit_test.rb'
1154
+ - 'test/cudnn_test.rb'
1155
+ - 'test/narray_test.rb'
1156
+
1157
+ # Offense count: 2
1158
+ # This cop supports safe autocorrection (--autocorrect).
1159
+ # Configuration parameters: AllowModifier.
1160
+ Style/SoleNestedConditional:
1161
+ Exclude:
1162
+ - 'ext/cumo/narray/gen/erbpp2.rb'
1163
+
1164
+ # Offense count: 2
1165
+ # This cop supports unsafe autocorrection (--autocorrect-all).
1166
+ # Configuration parameters: RequireEnglish, EnforcedStyle.
1167
+ # SupportedStyles: use_perl_names, use_english_names, use_builtin_english_names
1168
+ Style/SpecialGlobalVars:
1169
+ Exclude:
1170
+ - 'ext/cumo/narray/gen/cogen.rb'
1171
+ - 'ext/cumo/narray/gen/cogen_kernel.rb'
1172
+
1173
+ # Offense count: 25
1174
+ # This cop supports unsafe autocorrection (--autocorrect-all).
1175
+ # Configuration parameters: Mode.
1176
+ Style/StringConcatenation:
1177
+ Exclude:
1178
+ - '3rd_party/mkmf-cu/lib/mkmf-cu/nvcc.rb'
1179
+ - '3rd_party/mkmf-cu/test/test_mkmf-cu.rb'
1180
+ - 'ext/cumo/narray/gen/cogen.rb'
1181
+ - 'ext/cumo/narray/gen/cogen_kernel.rb'
1182
+ - 'ext/cumo/narray/gen/erbln.rb'
1183
+ - 'ext/cumo/narray/gen/erbpp2.rb'
1184
+ - 'ext/cumo/narray/gen/narray_def.rb'
1185
+ - 'ext/cumo/narray/gen/spec.rb'
1186
+
1187
+ # Offense count: 9
1188
+ # This cop supports unsafe autocorrection (--autocorrect-all).
1189
+ Style/StringHashKeys:
1190
+ Exclude:
1191
+ - '3rd_party/mkmf-cu/test/test_mkmf-cu.rb'
1192
+
1193
+ # Offense count: 1376
1194
+ # This cop supports safe autocorrection (--autocorrect).
1195
+ # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
1196
+ # SupportedStyles: single_quotes, double_quotes
1197
+ Style/StringLiterals:
1198
+ Enabled: false
1199
+
1200
+ # Offense count: 2
1201
+ # This cop supports safe autocorrection (--autocorrect).
1202
+ Style/SuperArguments:
1203
+ Exclude:
1204
+ - 'ext/cumo/narray/gen/erbpp2.rb'
1205
+
1206
+ # Offense count: 1
1207
+ # This cop supports safe autocorrection (--autocorrect).
1208
+ # Configuration parameters: MinSize.
1209
+ # SupportedStyles: percent, brackets
1210
+ Style/SymbolArray:
1211
+ EnforcedStyle: brackets
1212
+
1213
+ # Offense count: 2
1214
+ # This cop supports unsafe autocorrection (--autocorrect-all).
1215
+ # Configuration parameters: AllowMethodsWithArguments, AllowedMethods, AllowedPatterns, AllowComments.
1216
+ # AllowedMethods: define_method
1217
+ Style/SymbolProc:
1218
+ Exclude:
1219
+ - '3rd_party/mkmf-cu/lib/mkmf-cu/cli.rb'
1220
+ - 'ext/cumo/narray/gen/erbpp2.rb'
1221
+
1222
+ # Offense count: 10
1223
+ # This cop supports safe autocorrection (--autocorrect).
1224
+ # Configuration parameters: EnforcedStyle, AllowSafeAssignment.
1225
+ # SupportedStyles: require_parentheses, require_no_parentheses, require_parentheses_when_complex
1226
+ Style/TernaryParentheses:
1227
+ Exclude:
1228
+ - 'ext/cumo/narray/gen/erbpp2.rb'
1229
+ - 'ext/cumo/narray/gen/narray_def.rb'
1230
+ - 'lib/cumo/narray/extra.rb'
1231
+
1232
+ # Offense count: 9
1233
+ Style/TopLevelMethodDefinition:
1234
+ Exclude:
1235
+ - 'bench/cumo_bench.rb'
1236
+ - 'bench/numo_bench.rb'
1237
+ - 'ext/cumo/extconf.rb'
1238
+
1239
+ # Offense count: 6
1240
+ # This cop supports safe autocorrection (--autocorrect).
1241
+ # Configuration parameters: EnforcedStyleForMultiline.
1242
+ # SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
1243
+ Style/TrailingCommaInArrayLiteral:
1244
+ Exclude:
1245
+ - 'test/bit_test.rb'
1246
+ - 'test/cudnn_test.rb'
1247
+ - 'test/narray_test.rb'
1248
+ - 'test/test_helper.rb'
1249
+
1250
+ # Offense count: 7
1251
+ # This cop supports safe autocorrection (--autocorrect).
1252
+ Style/WhenThen:
1253
+ Exclude:
1254
+ - 'lib/cumo/narray/extra.rb'
1255
+
1256
+ # Offense count: 3
1257
+ # This cop supports unsafe autocorrection (--autocorrect-all).
1258
+ # Configuration parameters: .
1259
+ # SupportedOperators: *, +, &, |, ^
1260
+ Style/YodaExpression:
1261
+ Exclude:
1262
+ - 'lib/cumo/narray/extra.rb'
1263
+ - 'test/narray_test.rb'
1264
+
1265
+ # Offense count: 7
1266
+ # This cop supports unsafe autocorrection (--autocorrect-all).
1267
+ Style/ZeroLengthPredicate:
1268
+ Exclude:
1269
+ - '3rd_party/mkmf-cu/lib/mkmf-cu/nvcc.rb'
1270
+ - 'lib/cumo/cuda/compiler.rb'
1271
+ - 'test/bit_test.rb'
1272
+ - 'test/narray_test.rb'