carray-jit 0.1.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 (60) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +10 -0
  3. data/CHANGELOG.md +84 -0
  4. data/LICENSE +21 -0
  5. data/README.md +88 -0
  6. data/bin/carray-jit +194 -0
  7. data/carray-jit.gemspec +41 -0
  8. data/docs/00_Introduction.md +40 -0
  9. data/docs/01_GettingStarted.md +80 -0
  10. data/docs/02_KernelShapes.md +397 -0
  11. data/docs/03_SupportedFeatures.md +595 -0
  12. data/docs/04_Compiling.md +234 -0
  13. data/docs/05_DesignNotes.md +136 -0
  14. data/docs/06_Cheatsheet.md +177 -0
  15. data/examples/README.md +56 -0
  16. data/examples/applications/game_of_life.rb +161 -0
  17. data/examples/applications/heat_equation.rb +117 -0
  18. data/examples/applications/kepler.rb +178 -0
  19. data/examples/applications/mandelbrot.rb +151 -0
  20. data/examples/applications/moving_average.rb +124 -0
  21. data/examples/applications/partial_sums.rb +141 -0
  22. data/examples/applications/point_cloud.rb +110 -0
  23. data/examples/applications/quicksort.rb +118 -0
  24. data/examples/applications/recursion.rb +121 -0
  25. data/examples/applications/relaxation.rb +115 -0
  26. data/examples/applications/sensor_gaps.rb +118 -0
  27. data/examples/applications/sieve.rb +95 -0
  28. data/examples/applications/sobel_edges.rb +80 -0
  29. data/examples/features/01_element_wise.rb +69 -0
  30. data/examples/features/02_stencil.rb +40 -0
  31. data/examples/features/03_recurrence.rb +50 -0
  32. data/examples/features/04_thomas.rb +81 -0
  33. data/examples/features/05_reduction.rb +90 -0
  34. data/examples/features/06_jit_contract.rb +58 -0
  35. data/examples/features/07_masks.rb +55 -0
  36. data/examples/features/08_views.rb +46 -0
  37. data/examples/features/09_inspecting.rb +55 -0
  38. data/examples/features/10_complex.rb +107 -0
  39. data/examples/features/11_c_functions.rb +260 -0
  40. data/examples/features/12_sweep.rb +139 -0
  41. data/examples/features/13_cscalar.rb +80 -0
  42. data/examples/features/14_stencil_window.rb +106 -0
  43. data/examples/features/15_loops.rb +148 -0
  44. data/examples/features/16_raising.rb +69 -0
  45. data/ext/carray_jit_access/carray_jit_access.c +460 -0
  46. data/ext/carray_jit_access/extconf.rb +8 -0
  47. data/lib/carray/jit/analyzer.rb +1847 -0
  48. data/lib/carray/jit/block_reader.rb +139 -0
  49. data/lib/carray/jit/c_function.rb +777 -0
  50. data/lib/carray/jit/c_generator.rb +2305 -0
  51. data/lib/carray/jit/compiler.rb +468 -0
  52. data/lib/carray/jit/errors.rb +37 -0
  53. data/lib/carray/jit/expression.rb +202 -0
  54. data/lib/carray/jit/kernel.rb +509 -0
  55. data/lib/carray/jit/node.rb +573 -0
  56. data/lib/carray/jit/sweep.rb +97 -0
  57. data/lib/carray/jit/type_assignment.rb +811 -0
  58. data/lib/carray/jit/version.rb +5 -0
  59. data/lib/carray/jit.rb +1210 -0
  60. metadata +139 -0
metadata ADDED
@@ -0,0 +1,139 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: carray-jit
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - himotoyoshi
8
+ bindir: bin
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
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.1
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.1
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'
46
+ description: |
47
+ Write the loop in Ruby, and it runs at the speed of C -- one to two orders
48
+ of magnitude faster than interpreted. It is for what a CArray expression
49
+ cannot say: a cell that reaches its neighbours, a recurrence, a loop
50
+ written out. What may be in a block is a subset of Ruby, and a C compiler
51
+ has to be present at run time.
52
+ email:
53
+ - himotoyoshi@users.noreply.github.com
54
+ executables:
55
+ - carray-jit
56
+ extensions:
57
+ - ext/carray_jit_access/extconf.rb
58
+ extra_rdoc_files: []
59
+ files:
60
+ - ".yardopts"
61
+ - CHANGELOG.md
62
+ - LICENSE
63
+ - README.md
64
+ - bin/carray-jit
65
+ - carray-jit.gemspec
66
+ - docs/00_Introduction.md
67
+ - docs/01_GettingStarted.md
68
+ - docs/02_KernelShapes.md
69
+ - docs/03_SupportedFeatures.md
70
+ - docs/04_Compiling.md
71
+ - docs/05_DesignNotes.md
72
+ - docs/06_Cheatsheet.md
73
+ - examples/README.md
74
+ - examples/applications/game_of_life.rb
75
+ - examples/applications/heat_equation.rb
76
+ - examples/applications/kepler.rb
77
+ - examples/applications/mandelbrot.rb
78
+ - examples/applications/moving_average.rb
79
+ - examples/applications/partial_sums.rb
80
+ - examples/applications/point_cloud.rb
81
+ - examples/applications/quicksort.rb
82
+ - examples/applications/recursion.rb
83
+ - examples/applications/relaxation.rb
84
+ - examples/applications/sensor_gaps.rb
85
+ - examples/applications/sieve.rb
86
+ - examples/applications/sobel_edges.rb
87
+ - examples/features/01_element_wise.rb
88
+ - examples/features/02_stencil.rb
89
+ - examples/features/03_recurrence.rb
90
+ - examples/features/04_thomas.rb
91
+ - examples/features/05_reduction.rb
92
+ - examples/features/06_jit_contract.rb
93
+ - examples/features/07_masks.rb
94
+ - examples/features/08_views.rb
95
+ - examples/features/09_inspecting.rb
96
+ - examples/features/10_complex.rb
97
+ - examples/features/11_c_functions.rb
98
+ - examples/features/12_sweep.rb
99
+ - examples/features/13_cscalar.rb
100
+ - examples/features/14_stencil_window.rb
101
+ - examples/features/15_loops.rb
102
+ - examples/features/16_raising.rb
103
+ - ext/carray_jit_access/carray_jit_access.c
104
+ - ext/carray_jit_access/extconf.rb
105
+ - lib/carray/jit.rb
106
+ - lib/carray/jit/analyzer.rb
107
+ - lib/carray/jit/block_reader.rb
108
+ - lib/carray/jit/c_function.rb
109
+ - lib/carray/jit/c_generator.rb
110
+ - lib/carray/jit/compiler.rb
111
+ - lib/carray/jit/errors.rb
112
+ - lib/carray/jit/expression.rb
113
+ - lib/carray/jit/kernel.rb
114
+ - lib/carray/jit/node.rb
115
+ - lib/carray/jit/sweep.rb
116
+ - lib/carray/jit/type_assignment.rb
117
+ - lib/carray/jit/version.rb
118
+ homepage: https://github.com/himotoyoshi/carray-jit
119
+ licenses:
120
+ - MIT
121
+ metadata: {}
122
+ rdoc_options: []
123
+ require_paths:
124
+ - lib
125
+ required_ruby_version: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - ">="
128
+ - !ruby/object:Gem::Version
129
+ version: 3.2.0
130
+ required_rubygems_version: !ruby/object:Gem::Requirement
131
+ requirements:
132
+ - - ">="
133
+ - !ruby/object:Gem::Version
134
+ version: '0'
135
+ requirements: []
136
+ rubygems_version: 4.0.17
137
+ specification_version: 4
138
+ summary: JIT compilation of CArray kernels written in Ruby
139
+ test_files: []