cumo 0.4.3 → 0.5.1

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