carray-jit 0.1.6 → 0.2.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 (65) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +91 -0
  3. data/README.md +3 -7
  4. data/carray-jit.gemspec +11 -3
  5. data/docs/01_GettingStarted.md +1 -1
  6. data/docs/02_KernelShapes.md +33 -17
  7. data/docs/03_SupportedFeatures.md +31 -30
  8. data/docs/04_Compiling.md +10 -7
  9. data/docs/05_DesignNotes.md +1 -3
  10. data/docs/06_Cheatsheet.md +31 -21
  11. data/docs/07_StepByStep.ja.md +45 -45
  12. data/docs/07_StepByStep.md +45 -45
  13. data/docs/08_LanguageReference.md +2 -1
  14. data/examples/applications/alarm.rb +2 -2
  15. data/examples/applications/cubic_spline.rb +20 -20
  16. data/examples/applications/dithering.rb +8 -8
  17. data/examples/applications/game_of_life.rb +1 -1
  18. data/examples/applications/group_stats.rb +4 -4
  19. data/examples/applications/heat_equation.rb +6 -6
  20. data/examples/applications/kepler.rb +10 -10
  21. data/examples/applications/lookup.rb +3 -3
  22. data/examples/applications/median_filter.rb +7 -7
  23. data/examples/applications/moving_average.rb +6 -6
  24. data/examples/applications/parcel_ascent.rb +12 -12
  25. data/examples/applications/partial_sums.rb +6 -6
  26. data/examples/applications/point_cloud.rb +4 -4
  27. data/examples/applications/point_in_polygon.rb +4 -4
  28. data/examples/applications/quicksort.rb +1 -1
  29. data/examples/applications/relaxation.rb +1 -1
  30. data/examples/applications/sensor_gaps.rb +3 -3
  31. data/examples/applications/sobel_edges.rb +6 -6
  32. data/examples/applications/van_der_pol.rb +3 -3
  33. data/examples/applications/wet_bulb.rb +5 -5
  34. data/examples/features/01_element_wise.rb +8 -8
  35. data/examples/features/02_stencil.rb +4 -4
  36. data/examples/features/03_recurrence.rb +1 -1
  37. data/examples/features/04_thomas.rb +8 -8
  38. data/examples/features/05_reduction.rb +8 -8
  39. data/examples/features/06_jit_contract.rb +10 -10
  40. data/examples/features/07_masks.rb +4 -4
  41. data/examples/features/08_views.rb +6 -6
  42. data/examples/features/09_inspecting.rb +2 -2
  43. data/examples/features/10_complex.rb +7 -7
  44. data/examples/features/11_c_functions.rb +17 -17
  45. data/examples/features/12_sweep.rb +20 -25
  46. data/examples/features/13_cscalar.rb +12 -12
  47. data/examples/features/14_stencil_window.rb +6 -6
  48. data/examples/features/15_loops.rb +6 -6
  49. data/examples/features/16_raising.rb +4 -4
  50. data/lib/carray/jit/analyzer.rb +48 -34
  51. data/lib/carray/jit/c_function.rb +213 -153
  52. data/lib/carray/jit/c_generator.rb +33 -12
  53. data/lib/carray/jit/call.rb +1 -1
  54. data/lib/carray/jit/compiler.rb +115 -47
  55. data/lib/carray/jit/errors.rb +22 -0
  56. data/lib/carray/jit/expression.rb +78 -32
  57. data/lib/carray/jit/kernel.rb +28 -53
  58. data/lib/carray/jit/native.rb +171 -0
  59. data/lib/carray/jit/node.rb +1 -1
  60. data/lib/carray/jit/sweep.rb +14 -64
  61. data/lib/carray/jit/type_assignment.rb +9 -4
  62. data/lib/carray/jit/vector_math.rb +111 -0
  63. data/lib/carray/jit/version.rb +1 -1
  64. data/lib/carray/jit.rb +257 -106
  65. metadata +148 -122
metadata CHANGED
@@ -1,48 +1,70 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carray-jit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
- - himotoyoshi
7
+ - himotoyoshi
8
8
  bindir: bin
9
9
  cert_chain: []
10
10
  date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
- - !ruby/object:Gem::Dependency
13
- name: carray
14
- requirement: !ruby/object:Gem::Requirement
15
- requirements:
16
- - - ">="
17
- - !ruby/object:Gem::Version
18
- version: 3.0.5
19
- - - "<"
20
- - !ruby/object:Gem::Version
21
- version: '3.1'
22
- type: :runtime
23
- prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- version: 3.0.5
29
- - - "<"
30
- - !ruby/object:Gem::Version
31
- version: '3.1'
32
- - !ruby/object:Gem::Dependency
33
- name: fiddle
34
- requirement: !ruby/object:Gem::Requirement
35
- requirements:
36
- - - ">="
37
- - !ruby/object:Gem::Version
38
- version: '0'
39
- type: :runtime
40
- prerelease: false
41
- version_requirements: !ruby/object:Gem::Requirement
42
- requirements:
43
- - - ">="
44
- - !ruby/object:Gem::Version
45
- version: '0'
12
+ - !ruby/object:Gem::Dependency
13
+ name: carray
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ -
17
+ - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 3.1.0
20
+ -
21
+ - "<"
22
+ - !ruby/object:Gem::Version
23
+ version: "3.2"
24
+ type: :runtime
25
+ prerelease: false
26
+ version_requirements: !ruby/object:Gem::Requirement
27
+ requirements:
28
+ -
29
+ - ">="
30
+ - !ruby/object:Gem::Version
31
+ version: 3.1.0
32
+ -
33
+ - "<"
34
+ - !ruby/object:Gem::Version
35
+ version: "3.2"
36
+ - !ruby/object:Gem::Dependency
37
+ name: prism
38
+ requirement: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ -
41
+ - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: "1.0"
44
+ type: :runtime
45
+ prerelease: false
46
+ version_requirements: !ruby/object:Gem::Requirement
47
+ requirements:
48
+ -
49
+ - ">="
50
+ - !ruby/object:Gem::Version
51
+ version: "1.0"
52
+ - !ruby/object:Gem::Dependency
53
+ name: fiddle
54
+ requirement: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ -
57
+ - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: 1.1.1
60
+ type: :runtime
61
+ prerelease: false
62
+ version_requirements: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ -
65
+ - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: 1.1.1
46
68
  description: |
47
69
  Write the loop in Ruby, and it runs at the speed of C -- one to two orders
48
70
  of magnitude faster than interpreted. It is for what a CArray expression
@@ -50,105 +72,109 @@ description: |
50
72
  written out. What may be in a block is a subset of Ruby, and a C compiler
51
73
  has to be present at run time.
52
74
  email:
53
- - himotoyoshi@users.noreply.github.com
75
+ - himotoyoshi@users.noreply.github.com
54
76
  executables:
55
- - carray-jit
77
+ - carray-jit
56
78
  extensions: []
57
79
  extra_rdoc_files: []
58
80
  files:
59
- - ".yardopts"
60
- - CHANGELOG.md
61
- - LICENSE
62
- - README.md
63
- - bin/carray-jit
64
- - carray-jit.gemspec
65
- - docs/00_Introduction.md
66
- - docs/01_GettingStarted.md
67
- - docs/02_KernelShapes.md
68
- - docs/03_SupportedFeatures.md
69
- - docs/04_Compiling.md
70
- - docs/05_DesignNotes.md
71
- - docs/06_Cheatsheet.md
72
- - docs/07_StepByStep.ja.md
73
- - docs/07_StepByStep.md
74
- - docs/08_LanguageReference.md
75
- - examples/README.md
76
- - examples/applications/alarm.rb
77
- - examples/applications/collatz.rb
78
- - examples/applications/cubic_spline.rb
79
- - examples/applications/dithering.rb
80
- - examples/applications/game_of_life.rb
81
- - examples/applications/group_stats.rb
82
- - examples/applications/heat_equation.rb
83
- - examples/applications/kepler.rb
84
- - examples/applications/lookup.rb
85
- - examples/applications/mandelbrot.rb
86
- - examples/applications/median_filter.rb
87
- - examples/applications/moving_average.rb
88
- - examples/applications/parcel_ascent.rb
89
- - examples/applications/partial_sums.rb
90
- - examples/applications/point_cloud.rb
91
- - examples/applications/point_in_polygon.rb
92
- - examples/applications/quicksort.rb
93
- - examples/applications/random_walk.rb
94
- - examples/applications/recursion.rb
95
- - examples/applications/relaxation.rb
96
- - examples/applications/sensor_gaps.rb
97
- - examples/applications/sieve.rb
98
- - examples/applications/sobel_edges.rb
99
- - examples/applications/van_der_pol.rb
100
- - examples/applications/wet_bulb.rb
101
- - examples/features/01_element_wise.rb
102
- - examples/features/02_stencil.rb
103
- - examples/features/03_recurrence.rb
104
- - examples/features/04_thomas.rb
105
- - examples/features/05_reduction.rb
106
- - examples/features/06_jit_contract.rb
107
- - examples/features/07_masks.rb
108
- - examples/features/08_views.rb
109
- - examples/features/09_inspecting.rb
110
- - examples/features/10_complex.rb
111
- - examples/features/11_c_functions.rb
112
- - examples/features/12_sweep.rb
113
- - examples/features/13_cscalar.rb
114
- - examples/features/14_stencil_window.rb
115
- - examples/features/15_loops.rb
116
- - examples/features/16_raising.rb
117
- - lib/carray/jit.rb
118
- - lib/carray/jit/access.rb
119
- - lib/carray/jit/analyzer.rb
120
- - lib/carray/jit/block_reader.rb
121
- - lib/carray/jit/c_function.rb
122
- - lib/carray/jit/c_generator.rb
123
- - lib/carray/jit/call.rb
124
- - lib/carray/jit/compiler.rb
125
- - lib/carray/jit/errors.rb
126
- - lib/carray/jit/expression.rb
127
- - lib/carray/jit/kernel.rb
128
- - lib/carray/jit/node.rb
129
- - lib/carray/jit/sorting_networks.rb
130
- - lib/carray/jit/sweep.rb
131
- - lib/carray/jit/type_assignment.rb
132
- - lib/carray/jit/version.rb
133
- homepage: https://github.com/himotoyoshi/carray-jit
81
+ - .yardopts
82
+ - CHANGELOG.md
83
+ - LICENSE
84
+ - README.md
85
+ - bin/carray-jit
86
+ - carray-jit.gemspec
87
+ - docs/00_Introduction.md
88
+ - docs/01_GettingStarted.md
89
+ - docs/02_KernelShapes.md
90
+ - docs/03_SupportedFeatures.md
91
+ - docs/04_Compiling.md
92
+ - docs/05_DesignNotes.md
93
+ - docs/06_Cheatsheet.md
94
+ - docs/07_StepByStep.ja.md
95
+ - docs/07_StepByStep.md
96
+ - docs/08_LanguageReference.md
97
+ - examples/README.md
98
+ - examples/applications/alarm.rb
99
+ - examples/applications/collatz.rb
100
+ - examples/applications/cubic_spline.rb
101
+ - examples/applications/dithering.rb
102
+ - examples/applications/game_of_life.rb
103
+ - examples/applications/group_stats.rb
104
+ - examples/applications/heat_equation.rb
105
+ - examples/applications/kepler.rb
106
+ - examples/applications/lookup.rb
107
+ - examples/applications/mandelbrot.rb
108
+ - examples/applications/median_filter.rb
109
+ - examples/applications/moving_average.rb
110
+ - examples/applications/parcel_ascent.rb
111
+ - examples/applications/partial_sums.rb
112
+ - examples/applications/point_cloud.rb
113
+ - examples/applications/point_in_polygon.rb
114
+ - examples/applications/quicksort.rb
115
+ - examples/applications/random_walk.rb
116
+ - examples/applications/recursion.rb
117
+ - examples/applications/relaxation.rb
118
+ - examples/applications/sensor_gaps.rb
119
+ - examples/applications/sieve.rb
120
+ - examples/applications/sobel_edges.rb
121
+ - examples/applications/van_der_pol.rb
122
+ - examples/applications/wet_bulb.rb
123
+ - examples/features/01_element_wise.rb
124
+ - examples/features/02_stencil.rb
125
+ - examples/features/03_recurrence.rb
126
+ - examples/features/04_thomas.rb
127
+ - examples/features/05_reduction.rb
128
+ - examples/features/06_jit_contract.rb
129
+ - examples/features/07_masks.rb
130
+ - examples/features/08_views.rb
131
+ - examples/features/09_inspecting.rb
132
+ - examples/features/10_complex.rb
133
+ - examples/features/11_c_functions.rb
134
+ - examples/features/12_sweep.rb
135
+ - examples/features/13_cscalar.rb
136
+ - examples/features/14_stencil_window.rb
137
+ - examples/features/15_loops.rb
138
+ - examples/features/16_raising.rb
139
+ - lib/carray/jit.rb
140
+ - lib/carray/jit/access.rb
141
+ - lib/carray/jit/analyzer.rb
142
+ - lib/carray/jit/block_reader.rb
143
+ - lib/carray/jit/c_function.rb
144
+ - lib/carray/jit/c_generator.rb
145
+ - lib/carray/jit/call.rb
146
+ - lib/carray/jit/compiler.rb
147
+ - lib/carray/jit/errors.rb
148
+ - lib/carray/jit/expression.rb
149
+ - lib/carray/jit/kernel.rb
150
+ - lib/carray/jit/native.rb
151
+ - lib/carray/jit/node.rb
152
+ - lib/carray/jit/sorting_networks.rb
153
+ - lib/carray/jit/sweep.rb
154
+ - lib/carray/jit/type_assignment.rb
155
+ - lib/carray/jit/vector_math.rb
156
+ - lib/carray/jit/version.rb
157
+ homepage: "https://github.com/himotoyoshi/carray-jit"
134
158
  licenses:
135
- - MIT
159
+ - MIT
136
160
  metadata: {}
137
161
  rdoc_options: []
138
162
  require_paths:
139
- - lib
163
+ - lib
140
164
  required_ruby_version: !ruby/object:Gem::Requirement
141
165
  requirements:
142
- - - ">="
143
- - !ruby/object:Gem::Version
144
- version: 3.2.0
166
+ -
167
+ - ">="
168
+ - !ruby/object:Gem::Version
169
+ version: 3.2.0
145
170
  required_rubygems_version: !ruby/object:Gem::Requirement
146
171
  requirements:
147
- - - ">="
148
- - !ruby/object:Gem::Version
149
- version: '0'
172
+ -
173
+ - ">="
174
+ - !ruby/object:Gem::Version
175
+ version: "0"
150
176
  requirements: []
151
- rubygems_version: 4.0.17
177
+ rubygems_version: 4.1.1
152
178
  specification_version: 4
153
179
  summary: JIT compilation of CArray kernels written in Ruby
154
180
  test_files: []