forked from masa16/narray
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
44 lines (29 loc) · 1.27 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
* What is NumRu-NArray
+ NumRu-NArray is a fork of NArray with big memory support (old name NArray-Bigmem)
* Difference from NArray
+ Big memory (over 2GB) support
+ new class NArray::LINT (64bit integer)
+ OpenMP support
+ Internal memory struct of NArray object (recompile is necessary for exteded library)
* Installation
+ Install NumRu NArray
% gem install numru-narray
+ Compile (if you do not want to via gem)
% bundle install
% bundle exec rake compile
+ For OpenMP support
OpenMP is enable for gcc compiler by default.
However it is disabled for other compiler.
"--openmp=" option for extconf.rb is available to enable and disable OpenMP support.
If you want enable it for other compiler, execute extconf.rb with --openmp option.
ruby extconf.rb --openmp=openmp_option
If you want disable it for gcc compiler, --openmp option without any argument can be used.
ruby extconf.rb --openmp=
* Run
+ load library
require 'numru/narray'
+ enable OpenMP
OpenMP is disabled by default at runtime.
Set number of threads to "OMP_NUM_THREADS" environmental variable if you want enable it.
If you want set the number in Ruby script, just insert the following code:
ENV["OMP_NUM_THREADS"] = num_threads