tomoto 0.3.0-x86_64-linux

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +45 -0
  3. data/LICENSE.txt +22 -0
  4. data/README.md +162 -0
  5. data/ext/tomoto/ct.cpp +58 -0
  6. data/ext/tomoto/dmr.cpp +69 -0
  7. data/ext/tomoto/dt.cpp +91 -0
  8. data/ext/tomoto/extconf.rb +34 -0
  9. data/ext/tomoto/gdmr.cpp +42 -0
  10. data/ext/tomoto/hdp.cpp +47 -0
  11. data/ext/tomoto/hlda.cpp +71 -0
  12. data/ext/tomoto/hpa.cpp +32 -0
  13. data/ext/tomoto/lda.cpp +281 -0
  14. data/ext/tomoto/llda.cpp +33 -0
  15. data/ext/tomoto/mglda.cpp +81 -0
  16. data/ext/tomoto/pa.cpp +32 -0
  17. data/ext/tomoto/plda.cpp +33 -0
  18. data/ext/tomoto/slda.cpp +48 -0
  19. data/ext/tomoto/tomoto.cpp +48 -0
  20. data/ext/tomoto/utils.h +30 -0
  21. data/lib/tomoto/2.7/tomoto.so +0 -0
  22. data/lib/tomoto/3.0/tomoto.so +0 -0
  23. data/lib/tomoto/3.1/tomoto.so +0 -0
  24. data/lib/tomoto/ct.rb +24 -0
  25. data/lib/tomoto/dmr.rb +27 -0
  26. data/lib/tomoto/dt.rb +15 -0
  27. data/lib/tomoto/gdmr.rb +15 -0
  28. data/lib/tomoto/hdp.rb +11 -0
  29. data/lib/tomoto/hlda.rb +56 -0
  30. data/lib/tomoto/hpa.rb +11 -0
  31. data/lib/tomoto/lda.rb +181 -0
  32. data/lib/tomoto/llda.rb +15 -0
  33. data/lib/tomoto/mglda.rb +15 -0
  34. data/lib/tomoto/pa.rb +11 -0
  35. data/lib/tomoto/plda.rb +15 -0
  36. data/lib/tomoto/slda.rb +37 -0
  37. data/lib/tomoto/version.rb +3 -0
  38. data/lib/tomoto.rb +27 -0
  39. data/vendor/EigenRand/EigenRand/EigenRand +24 -0
  40. data/vendor/EigenRand/LICENSE +21 -0
  41. data/vendor/EigenRand/README.md +426 -0
  42. data/vendor/eigen/COPYING.APACHE +203 -0
  43. data/vendor/eigen/COPYING.BSD +26 -0
  44. data/vendor/eigen/COPYING.GPL +674 -0
  45. data/vendor/eigen/COPYING.LGPL +502 -0
  46. data/vendor/eigen/COPYING.MINPACK +51 -0
  47. data/vendor/eigen/COPYING.MPL2 +373 -0
  48. data/vendor/eigen/COPYING.README +18 -0
  49. data/vendor/eigen/Eigen/Cholesky +45 -0
  50. data/vendor/eigen/Eigen/CholmodSupport +48 -0
  51. data/vendor/eigen/Eigen/Core +384 -0
  52. data/vendor/eigen/Eigen/Dense +7 -0
  53. data/vendor/eigen/Eigen/Eigen +2 -0
  54. data/vendor/eigen/Eigen/Eigenvalues +60 -0
  55. data/vendor/eigen/Eigen/Geometry +59 -0
  56. data/vendor/eigen/Eigen/Householder +29 -0
  57. data/vendor/eigen/Eigen/IterativeLinearSolvers +48 -0
  58. data/vendor/eigen/Eigen/Jacobi +32 -0
  59. data/vendor/eigen/Eigen/KLUSupport +41 -0
  60. data/vendor/eigen/Eigen/LU +47 -0
  61. data/vendor/eigen/Eigen/MetisSupport +35 -0
  62. data/vendor/eigen/Eigen/OrderingMethods +70 -0
  63. data/vendor/eigen/Eigen/PaStiXSupport +49 -0
  64. data/vendor/eigen/Eigen/PardisoSupport +35 -0
  65. data/vendor/eigen/Eigen/QR +50 -0
  66. data/vendor/eigen/Eigen/QtAlignedMalloc +39 -0
  67. data/vendor/eigen/Eigen/SPQRSupport +34 -0
  68. data/vendor/eigen/Eigen/SVD +50 -0
  69. data/vendor/eigen/Eigen/Sparse +34 -0
  70. data/vendor/eigen/Eigen/SparseCholesky +37 -0
  71. data/vendor/eigen/Eigen/SparseCore +69 -0
  72. data/vendor/eigen/Eigen/SparseLU +50 -0
  73. data/vendor/eigen/Eigen/SparseQR +36 -0
  74. data/vendor/eigen/Eigen/StdDeque +27 -0
  75. data/vendor/eigen/Eigen/StdList +26 -0
  76. data/vendor/eigen/Eigen/StdVector +27 -0
  77. data/vendor/eigen/Eigen/SuperLUSupport +64 -0
  78. data/vendor/eigen/Eigen/UmfPackSupport +40 -0
  79. data/vendor/eigen/README.md +5 -0
  80. data/vendor/eigen/bench/README.txt +55 -0
  81. data/vendor/eigen/bench/btl/COPYING +340 -0
  82. data/vendor/eigen/bench/btl/README +154 -0
  83. data/vendor/eigen/bench/tensors/README +20 -0
  84. data/vendor/eigen/blas/README.txt +6 -0
  85. data/vendor/eigen/ci/README.md +56 -0
  86. data/vendor/eigen/demos/mandelbrot/README +10 -0
  87. data/vendor/eigen/demos/mix_eigen_and_c/README +9 -0
  88. data/vendor/eigen/demos/opengl/README +13 -0
  89. data/vendor/eigen/unsupported/Eigen/CXX11/src/Tensor/README.md +1815 -0
  90. data/vendor/eigen/unsupported/README.txt +50 -0
  91. data/vendor/tomotopy/LICENSE +21 -0
  92. data/vendor/tomotopy/README.kr.rst +512 -0
  93. data/vendor/tomotopy/README.rst +516 -0
  94. data/vendor/variant/LICENSE +25 -0
  95. data/vendor/variant/LICENSE_1_0.txt +23 -0
  96. data/vendor/variant/README.md +102 -0
  97. metadata +140 -0
@@ -0,0 +1,154 @@
1
+ Bench Template Library
2
+
3
+ ****************************************
4
+ Introduction :
5
+
6
+ The aim of this project is to compare the performance
7
+ of available numerical libraries. The code is designed
8
+ as generic and modular as possible. Thus, adding new
9
+ numerical libraries or new numerical tests should
10
+ require minimal effort.
11
+
12
+
13
+ *****************************************
14
+
15
+ Installation :
16
+
17
+ BTL uses cmake / ctest:
18
+
19
+ 1 - create a build directory:
20
+
21
+ $ mkdir build
22
+ $ cd build
23
+
24
+ 2 - configure:
25
+
26
+ $ ccmake ..
27
+
28
+ 3 - run the bench using ctest:
29
+
30
+ $ ctest -V
31
+
32
+ You can run the benchmarks only on libraries matching a given regular expression:
33
+ ctest -V -R <regexp>
34
+ For instance:
35
+ ctest -V -R eigen2
36
+
37
+ You can also select a given set of actions defining the environment variable BTL_CONFIG this way:
38
+ BTL_CONFIG="-a action1{:action2}*" ctest -V
39
+ An example:
40
+ BTL_CONFIG="-a axpy:vector_matrix:trisolve:ata" ctest -V -R eigen2
41
+
42
+ Finally, if bench results already exist (the bench*.dat files) then they merges by keeping the best for each matrix size. If you want to overwrite the previous ones you can simply add the "--overwrite" option:
43
+ BTL_CONFIG="-a axpy:vector_matrix:trisolve:ata --overwrite" ctest -V -R eigen2
44
+
45
+ 4 : Analyze the result. different data files (.dat) are produced in each libs directories.
46
+ If gnuplot is available, choose a directory name in the data directory to store the results and type:
47
+ $ cd data
48
+ $ mkdir my_directory
49
+ $ cp ../libs/*/*.dat my_directory
50
+ Build the data utilities in this (data) directory
51
+ make
52
+ Then you can look the raw data,
53
+ go_mean my_directory
54
+ or smooth the data first :
55
+ smooth_all.sh my_directory
56
+ go_mean my_directory_smooth
57
+
58
+
59
+ *************************************************
60
+
61
+ Files and directories :
62
+
63
+ generic_bench : all the bench sources common to all libraries
64
+
65
+ actions : sources for different action wrappers (axpy, matrix-matrix product) to be tested.
66
+
67
+ libs/* : bench sources specific to each tested libraries.
68
+
69
+ machine_dep : directory used to store machine specific Makefile.in
70
+
71
+ data : directory used to store gnuplot scripts and data analysis utilities
72
+
73
+ **************************************************
74
+
75
+ Principles : the code modularity is achieved by defining two concepts :
76
+
77
+ ****** Action concept : This is a class defining which kind
78
+ of test must be performed (e.g. a matrix_vector_product).
79
+ An Action should define the following methods :
80
+
81
+ *** Ctor using the size of the problem (matrix or vector size) as an argument
82
+ Action action(size);
83
+ *** initialize : this method initialize the calculation (e.g. initialize the matrices and vectors arguments)
84
+ action.initialize();
85
+ *** calculate : this method actually launch the calculation to be benchmarked
86
+ action.calculate;
87
+ *** nb_op_base() : this method returns the complexity of the calculate method (allowing the mflops evaluation)
88
+ *** name() : this method returns the name of the action (std::string)
89
+
90
+ ****** Interface concept : This is a class or namespace defining how to use a given library and
91
+ its specific containers (matrix and vector). Up to now an interface should following types
92
+
93
+ *** real_type : kind of float to be used (float or double)
94
+ *** stl_vector : must correspond to std::vector<real_type>
95
+ *** stl_matrix : must correspond to std::vector<stl_vector>
96
+ *** gene_vector : the vector type for this interface --> e.g. (real_type *) for the C_interface
97
+ *** gene_matrix : the matrix type for this interface --> e.g. (gene_vector *) for the C_interface
98
+
99
+ + the following common methods
100
+
101
+ *** free_matrix(gene_matrix & A, int N) dealocation of a N sized gene_matrix A
102
+ *** free_vector(gene_vector & B) dealocation of a N sized gene_vector B
103
+ *** matrix_from_stl(gene_matrix & A, stl_matrix & A_stl) copy the content of an stl_matrix A_stl into a gene_matrix A.
104
+ The allocation of A is done in this function.
105
+ *** vector_to_stl(gene_vector & B, stl_vector & B_stl) copy the content of an stl_vector B_stl into a gene_vector B.
106
+ The allocation of B is done in this function.
107
+ *** matrix_to_stl(gene_matrix & A, stl_matrix & A_stl) copy the content of an gene_matrix A into an stl_matrix A_stl.
108
+ The size of A_STL must corresponds to the size of A.
109
+ *** vector_to_stl(gene_vector & A, stl_vector & A_stl) copy the content of an gene_vector A into an stl_vector A_stl.
110
+ The size of B_STL must corresponds to the size of B.
111
+ *** copy_matrix(gene_matrix & source, gene_matrix & cible, int N) : copy the content of source in cible. Both source
112
+ and cible must be sized NxN.
113
+ *** copy_vector(gene_vector & source, gene_vector & cible, int N) : copy the content of source in cible. Both source
114
+ and cible must be sized N.
115
+
116
+ and the following method corresponding to the action one wants to be benchmarked :
117
+
118
+ *** matrix_vector_product(const gene_matrix & A, const gene_vector & B, gene_vector & X, int N)
119
+ *** matrix_matrix_product(const gene_matrix & A, const gene_matrix & B, gene_matrix & X, int N)
120
+ *** ata_product(const gene_matrix & A, gene_matrix & X, int N)
121
+ *** aat_product(const gene_matrix & A, gene_matrix & X, int N)
122
+ *** axpy(real coef, const gene_vector & X, gene_vector & Y, int N)
123
+
124
+ The bench algorithm (generic_bench/bench.hh) is templated with an action itself templated with
125
+ an interface. A typical main.cpp source stored in a given library directory libs/A_LIB
126
+ looks like :
127
+
128
+ bench< AN_ACTION < AN_INTERFACE > >( 10 , 1000 , 50 ) ;
129
+
130
+ this function will produce XY data file containing measured mflops as a function of the size for 50
131
+ sizes between 10 and 10000.
132
+
133
+ This algorithm can be adapted by providing a given Perf_Analyzer object which determines how the time
134
+ measurements must be done. For example, the X86_Perf_Analyzer use the asm rdtsc function and provides
135
+ a very fast and accurate (but less portable) timing method. The default is the Portable_Perf_Analyzer
136
+ so
137
+
138
+ bench< AN_ACTION < AN_INTERFACE > >( 10 , 1000 , 50 ) ;
139
+
140
+ is equivalent to
141
+
142
+ bench< Portable_Perf_Analyzer,AN_ACTION < AN_INTERFACE > >( 10 , 1000 , 50 ) ;
143
+
144
+ If your system supports it we suggest to use a mixed implementation (X86_perf_Analyzer+Portable_Perf_Analyzer).
145
+ replace
146
+ bench<Portable_Perf_Analyzer,Action>(size_min,size_max,nb_point);
147
+ with
148
+ bench<Mixed_Perf_Analyzer,Action>(size_min,size_max,nb_point);
149
+ in generic/bench.hh
150
+
151
+ .
152
+
153
+
154
+
@@ -0,0 +1,20 @@
1
+ The tensor benchmark suite is made of several parts.
2
+
3
+ The first part is a generic suite, in which each benchmark comes in 2 flavors: one that runs on CPU, and one that runs on GPU.
4
+
5
+ To compile the floating point CPU benchmarks, simply call:
6
+ g++ tensor_benchmarks_cpu.cc benchmark_main.cc -I ../../ -std=c++11 -O3 -DNDEBUG -pthread -mavx -o benchmarks_cpu
7
+
8
+ To compile the floating point GPU benchmarks, simply call:
9
+ nvcc tensor_benchmarks_gpu.cu benchmark_main.cc -I ../../ -std=c++11 -O2 -DNDEBUG -use_fast_math -ftz=true -arch compute_35 -o benchmarks_gpu
10
+
11
+ We also provide a version of the generic GPU tensor benchmarks that uses half floats (aka fp16) instead of regular floats. To compile these benchmarks, simply call the command line below. You'll need a recent GPU that supports compute capability 5.3 or higher to run them and nvcc 7.5 or higher to compile the code.
12
+ nvcc tensor_benchmarks_fp16_gpu.cu benchmark_main.cc -I ../../ -std=c++11 -O2 -DNDEBUG -use_fast_math -ftz=true -arch compute_53 -o benchmarks_fp16_gpu
13
+
14
+ To compile and run the benchmark for SYCL, using ComputeCpp, simply run the
15
+ following commands:
16
+ 1. export COMPUTECPP_PACKAGE_ROOT_DIR={PATH TO COMPUTECPP ROOT DIRECTORY}
17
+ 2. bash eigen_sycl_bench.sh
18
+
19
+ Last but not least, we also provide a suite of benchmarks to measure the scalability of the contraction code on CPU. To compile these benchmarks, call
20
+ g++ contraction_benchmarks_cpu.cc benchmark_main.cc -I ../../ -std=c++11 -O3 -DNDEBUG -pthread -mavx -o benchmarks_cpu
@@ -0,0 +1,6 @@
1
+
2
+ This directory contains a BLAS library built on top of Eigen.
3
+
4
+ This module is not built by default. In order to compile it, you need to
5
+ type 'make blas' from within your build dir.
6
+
@@ -0,0 +1,56 @@
1
+ ## Eigen CI infrastructure
2
+
3
+ Eigen's CI infrastructure uses two stages: A `build` stage to build the unit-test
4
+ suite and a `test` stage to run the unit-tests.
5
+
6
+ ### Build Stage
7
+
8
+ The build stage consists of the following jobs:
9
+
10
+ | Job Name | Arch | OS | Compiler | C++11 |
11
+ |------------------------------------------|-----------|----------------|------------|---------|
12
+ | `build:x86-64:linux:gcc-4.8:cxx11-off` | `x86-64` | `Ubuntu 18.04` | `GCC-4.8` | `Off` |
13
+ | `build:x86-64:linux:gcc-4.8:cxx11-on` | `x86-64` | `Ubuntu 18.04` | `GCC-4.8` | `On` |
14
+ | `build:x86-64:linux:gcc-9:cxx11-off` | `x86-64` | `Ubuntu 18.04` | `GCC-9` | `Off` |
15
+ | `build:x86-64:linux:gcc-9:cxx11-on` | `x86-64` | `Ubuntu 18.04` | `GCC-9` | `On` |
16
+ | `build:x86-64:linux:gcc-10:cxx11-off` | `x86-64` | `Ubuntu 18.04` | `GCC-10` | `Off` |
17
+ | `build:x86-64:linux:gcc-10:cxx11-on` | `x86-64` | `Ubuntu 18.04` | `GCC-10` | `On` |
18
+ | `build:x86-64:linux:clang-10:cxx11-off` | `x86-64` | `Ubuntu 18.04` | `Clang-10` | `Off` |
19
+ | `build:x86-64:linux:clang-10:cxx11-on` | `x86-64` | `Ubuntu 18.04` | `Clang-10` | `On` |
20
+ | `build:aarch64:linux:gcc-10:cxx11-off` | `AArch64` | `Ubuntu 18.04` | `GCC-10` | `Off` |
21
+ | `build:aarch64:linux:gcc-10:cxx11-on` | `AArch64` | `Ubuntu 18.04` | `GCC-10` | `On` |
22
+ | `build:aarch64:linux:clang-10:cxx11-off` | `AArch64` | `Ubuntu 18.04` | `Clang-10` | `Off` |
23
+ | `build:aarch64:linux:clang-10:cxx11-on` | `AArch64` | `Ubuntu 18.04` | `Clang-10` | `On` |
24
+
25
+ ### Test stage
26
+
27
+ In principle every build-job has a corresponding test-job, however testing supported and unsupported modules is divided into separate jobs. The test jobs in detail:
28
+
29
+ ### Job dependecies
30
+
31
+ | Job Name | Arch | OS | Compiler | C++11 | Module
32
+ |-----------------------------------------------------|-----------|----------------|------------|---------|--------
33
+ | `test:x86-64:linux:gcc-4.8:cxx11-off:official` | `x86-64` | `Ubuntu 18.04` | `GCC-4.8` | `Off` | `Official`
34
+ | `test:x86-64:linux:gcc-4.8:cxx11-off:unsupported` | `x86-64` | `Ubuntu 18.04` | `GCC-4.8` | `Off` | `Unsupported`
35
+ | `test:x86-64:linux:gcc-4.8:cxx11-on:official` | `x86-64` | `Ubuntu 18.04` | `GCC-4.8` | `On` | `Official`
36
+ | `test:x86-64:linux:gcc-4.8:cxx11-on:unsupported` | `x86-64` | `Ubuntu 18.04` | `GCC-4.8` | `On` | `Unsupported`
37
+ | `test:x86-64:linux:gcc-9:cxx11-off:official` | `x86-64` | `Ubuntu 18.04` | `GCC-9` | `Off` | `Official`
38
+ | `test:x86-64:linux:gcc-9:cxx11-off:unsupported` | `x86-64` | `Ubuntu 18.04` | `GCC-9` | `Off` | `Unsupported`
39
+ | `test:x86-64:linux:gcc-9:cxx11-on:official` | `x86-64` | `Ubuntu 18.04` | `GCC-9` | `On` | `Official`
40
+ | `test:x86-64:linux:gcc-9:cxx11-on:unsupported` | `x86-64` | `Ubuntu 18.04` | `GCC-9` | `On` | `Unsupported`
41
+ | `test:x86-64:linux:gcc-10:cxx11-off:official` | `x86-64` | `Ubuntu 18.04` | `GCC-10` | `Off` | `Official`
42
+ | `test:x86-64:linux:gcc-10:cxx11-off:unsupported` | `x86-64` | `Ubuntu 18.04` | `GCC-10` | `Off` | `Unsupported`
43
+ | `test:x86-64:linux:gcc-10:cxx11-on:official` | `x86-64` | `Ubuntu 18.04` | `GCC-10` | `On` | `Official`
44
+ | `test:x86-64:linux:gcc-10:cxx11-on:unsupported` | `x86-64` | `Ubuntu 18.04` | `GCC-10` | `On` | `Unsupported`
45
+ | `test:x86-64:linux:clang-10:cxx11-off:official` | `x86-64` | `Ubuntu 18.04` | `Clang-10` | `Off` | `Official`
46
+ | `test:x86-64:linux:clang-10:cxx11-off:unsupported` | `x86-64` | `Ubuntu 18.04` | `Clang-10` | `Off` | `Unsupported`
47
+ | `test:x86-64:linux:clang-10:cxx11-on:official` | `x86-64` | `Ubuntu 18.04` | `Clang-10` | `On` | `Official`
48
+ | `test:x86-64:linux:clang-10:cxx11-on:unsupported` | `x86-64` | `Ubuntu 18.04` | `Clang-10` | `On` | `Unsupported`
49
+ | `test:aarch64:linux:gcc-10:cxx11-off:official` | `AArch64` | `Ubuntu 18.04` | `GCC-10` | `Off` | `Official`
50
+ | `test:aarch64:linux:gcc-10:cxx11-off:unsupported` | `AArch64` | `Ubuntu 18.04` | `GCC-10` | `Off` | `Unsupported`
51
+ | `test:aarch64:linux:gcc-10:cxx11-on:official` | `AArch64` | `Ubuntu 18.04` | `GCC-10` | `On` | `Official`
52
+ | `test:aarch64:linux:gcc-10:cxx11-on:unsupported` | `AArch64` | `Ubuntu 18.04` | `GCC-10` | `On` | `Unsupported`
53
+ | `test:aarch64:linux:clang-10:cxx11-off:official` | `AArch64` | `Ubuntu 18.04` | `Clang-10` | `Off` | `Official`
54
+ | `test:aarch64:linux:clang-10:cxx11-off:unsupported` | `AArch64` | `Ubuntu 18.04` | `Clang-10` | `Off` | `Unsupported`
55
+ | `test:aarch64:linux:clang-10:cxx11-on:official` | `AArch64` | `Ubuntu 18.04` | `Clang-10` | `On` | `Official`
56
+ | `test:aarch64:linux:clang-10:cxx11-on:unsupported` | `AArch64` | `Ubuntu 18.04` | `Clang-10` | `On` | `Unsupported`
@@ -0,0 +1,10 @@
1
+ *** Mandelbrot demo ***
2
+
3
+ Controls:
4
+ * Left mouse button to center view at a point.
5
+ * Drag vertically with left mouse button to zoom in and out.
6
+
7
+ Be sure to enable SSE2 or AltiVec to improve performance.
8
+
9
+ The number of iterations, and the choice between single and double precision, are
10
+ determined at runtime depending on the zoom level.
@@ -0,0 +1,9 @@
1
+ This is an example of how one can wrap some of Eigen into a C library.
2
+
3
+ To try this with GCC, do:
4
+
5
+ g++ -c binary_library.cpp -O2 -msse2 -I ../..
6
+ gcc example.c binary_library.o -o example -lstdc++
7
+ ./example
8
+
9
+ TODO: add CMakeLists, add more explanations here
@@ -0,0 +1,13 @@
1
+
2
+ Navigation:
3
+ left button: rotate around the target
4
+ middle button: zoom
5
+ left button + ctrl quake rotate (rotate around camera position)
6
+ middle button + ctrl walk (progress along camera's z direction)
7
+ left button: pan (translate in the XY camera's plane)
8
+
9
+ R : move the camera to initial position
10
+ A : start/stop animation
11
+ C : clear the animation
12
+ G : add a key frame
13
+