http://www.math.univ-paris13.fr/~cuvelier/software/codes/Python/fc-linalg3D/pyfc-linalg3D_400.png

The fc_linalg3D Python package is an experimental package which contains all the code used in the report

Efficient algorithms to perform linear algebra operations on 3D arrays in vector languages, April 2018, F. Cuvelier.

Introduction:

More documentation is available on fc_linalg3D Python package dedicated web page with an User's Guide (pdf).

This package was tested under:

Installation:

The fc_linalg3D Python package is not available from the Python Package Index. One has to get/download the fc_linalg3D Python package archive and install it by using pip command:

pip install -U --user fc_linalg3D-0.0.2rc0.tar.gz

Testing :

There are benchmarking functions in the fc_linalg3D.benchs module named bench_*. For example, run the following code under Python:

from fc_linalg3D import benchs
benchs.bench_mtimes(dl=[3,3],dr=[3,4],slow=False)

The output of this code is:

#---------------------------------------------------------------------------
#    computer: hercule
#      system: Ubuntu 18.04 LTS (x86_64)
#   processor: Intel(R) Core(TM) i7-4800MQ CPU @ 2.70GHz
#              (1 procs/4 cores by proc/2 threads by core)
#         RAM: 15.6 Go
#    software: Python
#     release: 3.6.5
#---------------------------------------------------------------------------
# Left input is:
# -> 3D-array with (N,m,n)=(400000,3,3),  shape=(400000, 3, 3)
# Right input is:
# -> 3D-array with (N,m,n)=(400000,3,4),  shape=(400000, 3, 4)
#---------------------------------------------------------------------------
#date:2018/05/31 17:42:58
#nbruns:5
#numpy:         i4               f4                  f4           f4               f4           f4
#format:      {:8}         {:15.3f}            {:18.3f}     {:11.3e}         {:15.3f}     {:11.3e}
#labels:         N    mtimes_Vec(s)    mtimes_VecOpt(s)    cmpErr[1]    mtimes_Nat(s)    cmpErr[2]
            200000            0.112               0.110    0.000e+00            0.099    0.000e+00
            400000            0.220               0.222    0.000e+00            0.200    0.000e+00
            600000            0.332               0.337    0.000e+00            0.309    0.000e+00
            800000            0.450               0.444    0.000e+00            0.410    0.000e+00
          1000000            0.560               0.562    0.000e+00            0.517    0.000e+00