├── .coveragerc
├── .flake8
├── .gitignore
├── LICENSE
├── LICENSE_DETAIL
└── LICENSE_DETAIL
├── Makefile
├── README.md
├── banner
└── NLCPy_banner.png
├── bench
├── Haversine
│ ├── clean.sh
│ ├── data
│ ├── eval.py
│ ├── gen_graph.py
│ ├── prev
│ │ └── v2.2.0_ve1
│ │ │ ├── size.dat
│ │ │ └── time_nlcpy.dat
│ └── run_bench.sh
├── basic_comp
│ ├── bench_core.py
│ ├── bench_op.py
│ ├── clean.sh
│ ├── eval.py
│ ├── gen_graph.py
│ └── run_bench.sh
├── check_ufunc
│ ├── bench_core.py
│ ├── bench_ufunc.py
│ ├── clean.sh
│ ├── eval.py
│ ├── extract_bad_op.py
│ └── run_bench.sh
├── clean_all.sh
├── fft_bench
│ ├── bench_core.py
│ ├── bench_fft.py
│ ├── clean.sh
│ ├── eval.py
│ ├── gen_graph.py
│ └── run_bench.sh
└── stencil_bench
│ ├── clean.sh
│ ├── compute_cupy_fusion.py
│ ├── compute_nlcpy_sca.py
│ ├── compute_numba_cpu.py
│ ├── compute_numba_cuda.py
│ ├── compute_pystencils.py
│ ├── gen_graph.py
│ ├── params.py
│ └── run.py
├── build_inplace.sh
├── config
├── MANIFEST.in.sdist
├── MANIFEST.in.wheel.ve1
├── MANIFEST.in.wheel.ve3
├── MANIFEST.in.wheel.vh
├── setup_ve1.cfg
├── setup_ve3.cfg
└── setup_vh.cfg
├── doc
├── .gitignore
├── Makefile
├── html_reform.sh
├── image
│ ├── NLCPy_banner.png
│ ├── averaging_filter.png
│ ├── cfd.gif
│ ├── clustering.gif
│ ├── lazy_evaluation.png
│ ├── nec-logo.png
│ ├── nlcpy_image1.png
│ ├── spectrum.png
│ ├── thermal_simulation.gif
│ └── wave_simulation.gif
├── make.bat
├── nlcpydoc
│ ├── __init__.py
│ ├── __main__.py
│ ├── docscrape.py
│ ├── docscrape_sphinx.py
│ ├── nlcpydoc.py
│ ├── templates
│ │ └── nlcpydoc_docstring.rst
│ ├── validate.py
│ └── xref.py
└── source
│ ├── .gitignore
│ ├── _comparison_generator.py
│ ├── _static
│ └── css
│ │ └── custom.css
│ ├── _templates
│ ├── autosummary
│ │ └── class.rst
│ ├── breadcrumbs.html
│ └── layout.html
│ ├── building_docs.rst
│ ├── conf.py
│ ├── copyrights.rst
│ ├── example
│ ├── averaging.rst
│ ├── cfd.rst
│ ├── clustering.rst
│ ├── index.rst
│ ├── spectrum.rst
│ ├── thermal.rst
│ ├── thermal_naive.rst
│ ├── thermal_sca.rst
│ └── wave.rst
│ ├── functions.rst
│ ├── index.rst
│ ├── installation.rst
│ ├── lazy.rst
│ ├── locale
│ └── ja
│ │ └── LC_MESSAGES
│ │ ├── building_docs.po
│ │ ├── copyrights.po
│ │ ├── example
│ │ ├── averaging.po
│ │ ├── cfd.po
│ │ ├── clustering.po
│ │ ├── index.po
│ │ ├── spectrum.po
│ │ ├── thermal.po
│ │ ├── thermal_naive.po
│ │ ├── thermal_sca.po
│ │ └── wave.po
│ │ ├── functions.po
│ │ ├── index.po
│ │ ├── installation.po
│ │ ├── lazy.po
│ │ ├── notices.po
│ │ ├── reference
│ │ ├── constants.po
│ │ ├── creation.po
│ │ ├── envs.po
│ │ ├── error_handling.po
│ │ ├── fft.po
│ │ ├── index.po
│ │ ├── indexing.po
│ │ ├── io.po
│ │ ├── jit
│ │ │ ├── advanced.po
│ │ │ ├── basic_usage.po
│ │ │ ├── index.po
│ │ │ └── notices.po
│ │ ├── linalg.po
│ │ ├── logging.po
│ │ ├── logic.po
│ │ ├── ma.po
│ │ ├── manipulation.po
│ │ ├── mathematical.po
│ │ ├── miscellaneous.po
│ │ ├── ndarray.po
│ │ ├── profiling.po
│ │ ├── random.po
│ │ ├── request.po
│ │ ├── sca.po
│ │ ├── sca_chapter_1.po
│ │ ├── sca_chapter_2.po
│ │ ├── sca_chapter_3.po
│ │ ├── sca_chapter_4.po
│ │ ├── sca_chapter_5.po
│ │ ├── sorting.po
│ │ ├── statistics.po
│ │ ├── ufunc.po
│ │ └── venode.po
│ │ ├── release_notes
│ │ ├── index.po
│ │ ├── v1.0.0.po
│ │ ├── v1.0.0b2.po
│ │ ├── v1.0.1.po
│ │ ├── v2.0.0.po
│ │ ├── v2.1.0.po
│ │ ├── v2.1.1.po
│ │ ├── v2.2.0.po
│ │ ├── v3.0.0.po
│ │ └── v3.0.1.po
│ │ ├── sphinx.po
│ │ ├── usage
│ │ ├── basic.po
│ │ ├── execution.po
│ │ ├── index.po
│ │ └── interoperability.po
│ │ └── userguide.po
│ ├── notices.rst
│ ├── reference
│ ├── constants.rst
│ ├── creation.rst
│ ├── envs.rst
│ ├── error_handling.rst
│ ├── fft.rst
│ ├── index.rst
│ ├── indexing.rst
│ ├── io.rst
│ ├── jit
│ │ ├── advanced.rst
│ │ ├── basic_usage.rst
│ │ ├── index.rst
│ │ └── notices.rst
│ ├── linalg.rst
│ ├── logging.rst
│ ├── logic.rst
│ ├── ma.rst
│ ├── manipulation.rst
│ ├── mathematical.rst
│ ├── miscellaneous.rst
│ ├── ndarray.rst
│ ├── profiling.rst
│ ├── random.rst
│ ├── request.rst
│ ├── sca.rst
│ ├── sca_chapter_1.rst
│ ├── sca_chapter_2.rst
│ ├── sca_chapter_3.rst
│ ├── sca_chapter_4.rst
│ ├── sca_chapter_5.rst
│ ├── sorting.rst
│ ├── statistics.rst
│ ├── ufunc.rst
│ └── venode.rst
│ ├── release_notes
│ ├── index.rst
│ ├── v1.0.0.rst
│ ├── v1.0.0b2.rst
│ ├── v1.0.1.rst
│ ├── v2.0.0.rst
│ ├── v2.1.0.rst
│ ├── v2.1.1.rst
│ ├── v2.2.0.rst
│ ├── v3.0.0.rst
│ └── v3.0.1.rst
│ ├── usage
│ ├── basic.rst
│ ├── execution.rst
│ ├── index.rst
│ └── interoperability.rst
│ └── userguide.rst
├── make.inc
├── make_wheel.sh
├── nlcpy
├── .gitignore
├── __config__.py
├── __init__.py
├── _environment.py
├── _path.py
├── _version.py
├── core
│ ├── __init__.py
│ ├── broadcast.pxd
│ ├── broadcast.pyx
│ ├── core.pxd
│ ├── core.pyx
│ ├── dtype.pxd
│ ├── dtype.pyx
│ ├── error.py
│ ├── flags.py
│ ├── indexing.pxd
│ ├── indexing.pyx
│ ├── internal.pxd
│ ├── internal.pyx
│ ├── macros.m4
│ ├── manipulation.pxd
│ ├── manipulation.pyx
│ ├── math.pxd
│ ├── math.pyx
│ ├── scalar.pxd
│ ├── scalar.pyx
│ ├── searching.pxd
│ ├── searching.pyx
│ ├── sorting.pxd
│ ├── sorting.pyx
│ ├── vememory.pxd
│ └── vememory.pyx
├── creation
│ ├── __init__.py
│ ├── basic.py
│ ├── from_data.py
│ ├── matrices.py
│ └── ranges.py
├── datatype
│ ├── __init__.py
│ └── getlimits.py
├── error_handler
│ ├── __init__.py
│ └── error_handler.py
├── fft
│ ├── __init__.py
│ ├── _fft.pyx
│ ├── fft.py
│ └── libfft.pxd
├── include
│ ├── __init__.py
│ ├── array_utility.h
│ ├── fpe_flags.h
│ ├── macros.m4
│ ├── nlcpy.h
│ ├── param.pxi
│ ├── ve_array.h
│ ├── ve_dtype.h
│ ├── ve_error.h
│ ├── ve_funclist.h
│ ├── ve_funcnum.h
│ ├── ve_functype.h
│ ├── ve_request.h
│ └── ve_selector.h
├── indexing
│ ├── __init__.py
│ ├── generate.py
│ ├── indexing.py
│ └── inserting.py
├── io
│ ├── __init__.py
│ ├── npz.py
│ └── text.py
├── jit
│ ├── __init__.py
│ ├── kernel.py
│ └── module.py
├── kernel_register
│ ├── asluni_kernel_list.pxi
│ ├── basic_kernel_list.pxi
│ ├── cblas_kernel_list.pxi
│ ├── creation_kernel_list.pxi
│ ├── fft_kernel_list.pxi
│ ├── indexing_kernel_list.pxi
│ ├── linalg_kernel_list.pxi
│ ├── macros.m4
│ ├── manipulation_kernel_list.pxi
│ ├── math_kernel_list.pxi
│ ├── math_kernel_list.pxi.m4
│ ├── profiling_kernel_list.pxi
│ ├── random_kernel_list.pxi
│ ├── reduceat_kernel_list.pxi
│ ├── reduceat_kernel_list.pxi.m4
│ ├── sca_kernel_list.pxi
│ ├── searching_kernel_list.pxi
│ └── ve_kernel_register.pyx
├── linalg
│ ├── __init__.py
│ ├── cblas_wrapper.pxd
│ ├── cblas_wrapper.pyx
│ ├── decomposition.py
│ ├── eig.py
│ ├── norm.py
│ ├── products.py
│ ├── solve.py
│ └── util.py
├── logging
│ ├── __init__.py
│ └── _vp_logging.py
├── logic
│ ├── __init__.py
│ └── testing.py
├── ma
│ ├── __init__.py
│ └── core.py
├── manipulation
│ ├── __init__.py
│ ├── add_remove.py
│ ├── basic.py
│ ├── dims.py
│ ├── join.py
│ ├── rearranging.py
│ ├── shape.py
│ ├── split.py
│ ├── tiling.py
│ └── trans.py
├── math
│ ├── __init__.py
│ └── math.pyx
├── mempool
│ ├── __init__.py
│ ├── mempool.pxd
│ ├── mempool.pyx
│ ├── nlcpy_mempool.c
│ └── nlcpy_mempool.h
├── prof
│ ├── __init__.py
│ └── prof.py
├── random
│ ├── __init__.py
│ ├── _generator.pyx
│ ├── distributions.py
│ ├── generator.pyx
│ ├── libgenerator.pxd
│ ├── permutations.py
│ └── sample.py
├── request
│ ├── __init__.py
│ ├── request.pxd
│ ├── request.pyx
│ ├── ve_kernel.pxd
│ └── ve_kernel.pyx
├── sca
│ ├── __init__.py
│ ├── description.pxd
│ ├── description.pyx
│ ├── descriptor.pxd
│ ├── descriptor.pyx
│ ├── handle.pxd
│ ├── handle.pyx
│ ├── internal.pxd
│ ├── internal.pyx
│ ├── kernel.pxd
│ ├── kernel.pyx
│ ├── utility.pxd
│ └── utility.pyx
├── sorting
│ ├── __init__.py
│ ├── count.py
│ ├── search.py
│ └── sort.py
├── statistics
│ ├── __init__.py
│ ├── average.pyx
│ ├── correlating.pyx
│ ├── function_base.pyx
│ ├── histograms.pyx
│ └── order.py
├── testing
│ ├── __init__.py
│ ├── array.py
│ ├── binary.py
│ ├── condition.py
│ ├── device.py
│ ├── helper.py
│ ├── hypothesis.py
│ ├── parameterized.py
│ ├── random.py
│ ├── types.py
│ ├── ufunc.py
│ └── unary.py
├── ufuncs
│ ├── __init__.py
│ ├── accumulate.pxd
│ ├── accumulate.pyx
│ ├── casting.py
│ ├── err.py
│ ├── macros.m4
│ ├── operations.py
│ ├── operations.py.m4
│ ├── outer.pxd
│ ├── outer.pyx
│ ├── param.pxi
│ ├── reduce.pxd
│ ├── reduce.pyx
│ ├── reduceat.pxd
│ ├── reduceat.pyx
│ ├── ufunc_docs.py
│ ├── ufuncs.pxd
│ └── ufuncs.pyx
├── ve_kernel
│ ├── Makefile
│ ├── accumulate.c.master
│ ├── accumulate.c.master2
│ ├── accumulate.c.master2.m4
│ ├── argfunc.c.master
│ ├── array_utility.c
│ ├── binary_operator.c.master
│ ├── binary_operator.c.master2
│ ├── binary_operator.c.master2.m4
│ ├── cast.c.master
│ ├── cast.c.master.m4
│ ├── cblas_wrapper.c
│ ├── cblas_wrapper.c.m4
│ ├── copy.c.master
│ ├── copy.c.master.m4
│ ├── copy_masked.c.master
│ ├── copy_masked.c.master.m4
│ ├── macros.m4
│ ├── matmul_operator.c.master
│ ├── matmul_operator.c.master.m4
│ ├── nlcpy_arange.c.master
│ ├── nlcpy_argsort.c
│ ├── nlcpy_argsort.c.m4
│ ├── nlcpy_argwhere.c.master
│ ├── nlcpy_asluni.c
│ ├── nlcpy_block.c.master
│ ├── nlcpy_boolean_mask.c.master
│ ├── nlcpy_cholesky.c
│ ├── nlcpy_cholesky.c.m4
│ ├── nlcpy_clip.c
│ ├── nlcpy_clip.c.m4
│ ├── nlcpy_delete.c.master
│ ├── nlcpy_diff.c.master
│ ├── nlcpy_diff.c.master.m4
│ ├── nlcpy_domain_mask.c.master
│ ├── nlcpy_domain_mask.c.master.m4
│ ├── nlcpy_dot.c.master
│ ├── nlcpy_dot.c.master.m4
│ ├── nlcpy_eig.c
│ ├── nlcpy_eig.c.m4
│ ├── nlcpy_eigh.c
│ ├── nlcpy_eigh.c.m4
│ ├── nlcpy_eye.c.master
│ ├── nlcpy_fft.c
│ ├── nlcpy_fft.c.m4
│ ├── nlcpy_fill_diagonal.c.master
│ ├── nlcpy_fnorm.c
│ ├── nlcpy_fnorm.c.m4
│ ├── nlcpy_insert.c.master
│ ├── nlcpy_inv.c
│ ├── nlcpy_inv.c.m4
│ ├── nlcpy_linspace.c.master
│ ├── nlcpy_lstsq.c
│ ├── nlcpy_lstsq.c.m4
│ ├── nlcpy_nonzero.c.master
│ ├── nlcpy_norm.c
│ ├── nlcpy_norm.c.m4
│ ├── nlcpy_prepare_indexing.c.master
│ ├── nlcpy_profiling.c
│ ├── nlcpy_qr.c
│ ├── nlcpy_qr.c.m4
│ ├── nlcpy_random.c
│ ├── nlcpy_random_shuffle.c
│ ├── nlcpy_random_shuffle.c.m4
│ ├── nlcpy_repeat.c.master
│ ├── nlcpy_roll.c.master
│ ├── nlcpy_sca.c
│ ├── nlcpy_sca.c.m4
│ ├── nlcpy_scatter.c.master
│ ├── nlcpy_simple_fnorm.c
│ ├── nlcpy_simple_fnorm.c.m4
│ ├── nlcpy_solve.c
│ ├── nlcpy_solve.c.m4
│ ├── nlcpy_sort.c
│ ├── nlcpy_sort.c.m4
│ ├── nlcpy_sort_multi.c
│ ├── nlcpy_sort_multi.c.m4
│ ├── nlcpy_svd.c
│ ├── nlcpy_svd.c.m4
│ ├── nlcpy_take.c.master
│ ├── nlcpy_take.c.master.m4
│ ├── nlcpy_tile.c.master
│ ├── nlcpy_tri.c.master
│ ├── nlcpy_where.c.master
│ ├── outer.c.master
│ ├── outer.c.master.m4
│ ├── reduce.c.master
│ ├── reduce.c.master.m4
│ ├── reduce.c.master2
│ ├── reduce.c.master2.m4
│ ├── reduceat.c.master
│ ├── reduceat.c.master2
│ ├── reduceat.c.master2.m4
│ ├── unary_operator.c.master
│ ├── unary_operator.c.master2
│ ├── unary_operator.c.master2.m4
│ ├── ve_controller.c
│ ├── ve_selector.c
│ └── xerbla.c
├── ve_types
│ ├── __init__.py
│ └── ve_types.py
├── venode
│ ├── __init__.py
│ ├── _venode.pxd
│ └── _venode.pyx
├── veo
│ ├── __init__.py
│ ├── _veo.pxd
│ ├── _veo.pyx
│ ├── conv_i64.pxi
│ ├── libveo.pxd
│ ├── sysvshm.pyx
│ └── vebuild.py
├── veosinfo
│ ├── __init__.py
│ ├── _veosinfo.pyx
│ └── libveosinfo.pxd
└── wrapper
│ ├── __init__.py
│ └── numpy_wrap.py
├── nlcpy_ve1_kernel
└── __init__.py
├── nlcpy_ve3_kernel
└── __init__.py
├── requirements
├── requirements_build.txt
├── requirements_doc.txt
└── requirements_run.txt
├── rpm
├── Makefile
└── SPECS
│ └── nec-python3-nlcpy-ve
├── run_pytest.sh
├── scripts
├── clean.sh
├── cppnlcpy.pl
├── m4_conv.sh
└── make_dep.sh
├── setup.py
├── tests
└── pytest
│ ├── conftest.py
│ ├── core_tests
│ ├── __init__.py
│ ├── test_array_function.py
│ ├── test_coverage.py
│ ├── test_dtype.py
│ ├── test_flags.py
│ ├── test_iter.py
│ ├── test_ndarray_adv_indexing.py
│ ├── test_ndarray_contiguity.py
│ ├── test_ndarray_copy_and_view.py
│ ├── test_ndarray_elementwise_op.py
│ ├── test_ndarray_etc.py
│ ├── test_ndarray_get.py
│ ├── test_ndarray_indexing.py
│ ├── test_ndarray_maxndim.py
│ ├── test_ndarray_owndata.py
│ ├── test_ndarray_reduction.py
│ ├── test_ndarray_set.py
│ ├── test_ndarray_ufunc.py
│ └── test_ndarray_unary_op.py
│ ├── creation_tests
│ ├── __init__.py
│ ├── test_basic.py
│ ├── test_from_data.py
│ ├── test_matrices.py
│ └── test_ranges.py
│ ├── err_handler_tests
│ ├── __init__.py
│ └── test_errstate.py
│ ├── fft_tests
│ ├── __init__.py
│ ├── test_fft.py
│ ├── test_fft2_fftn.py
│ ├── test_fft_coverage.py
│ ├── test_fft_input.py
│ ├── test_fft_moveaxis.py
│ ├── test_fft_numpy1_18_1.py
│ ├── test_helper.py
│ ├── test_hfft.py
│ ├── test_rfft.py
│ └── test_rfft_moveaxis.py
│ ├── indexing_tests
│ ├── __init__.py
│ ├── test_indexing.py
│ └── test_inserting.py
│ ├── io_tests
│ ├── __init__.py
│ ├── test_npz.py
│ └── test_text.py
│ ├── jit_tests
│ ├── test_asl_fft.py
│ ├── test_asl_fftw.py
│ ├── test_asl_native.py
│ ├── test_asl_random.py
│ ├── test_asl_sort.py
│ ├── test_blas.py
│ ├── test_custom.py
│ ├── test_flags.py
│ ├── test_heterosolver.py
│ ├── test_lapack.py
│ ├── test_sblas.py
│ └── test_sca.py
│ ├── linalg_tests
│ ├── __init__.py
│ ├── test_decomposition.py
│ ├── test_eig.py
│ ├── test_norm.py
│ ├── test_products.py
│ └── test_solve.py
│ ├── logging_tests
│ └── test_logging.py
│ ├── logic_tests
│ ├── __init__.py
│ └── test_truth.py
│ ├── ma_tests
│ ├── __init__.py
│ ├── test_ma_basic.py
│ ├── test_ma_contiguity.py
│ ├── test_ma_copy_and_view.py
│ ├── test_ma_elementwise_op.py
│ ├── test_ma_get.py
│ ├── test_ma_indexing.py
│ ├── test_ma_manipulation.py
│ └── test_ma_owndata.py
│ ├── manipulation_tests
│ ├── __init__.py
│ ├── test_add_remove.py
│ ├── test_copy.py
│ ├── test_dims.py
│ ├── test_join.py
│ ├── test_rearranging.py
│ ├── test_shape.py
│ ├── test_split.py
│ ├── test_tiling.py
│ └── test_transpose.py
│ ├── math_tests
│ ├── __init__.py
│ ├── test_arithmetic.py
│ ├── test_explog.py
│ ├── test_floating.py
│ ├── test_hyperbolic.py
│ ├── test_matmul.py
│ ├── test_misc.py
│ ├── test_rounding.py
│ ├── test_sumprod.py
│ └── test_trigonometric.py
│ ├── miscellaneous_tests
│ └── test_miscellaneous.py
│ ├── pytest.ini
│ ├── random_tests
│ ├── __init__.py
│ ├── test_generator.py
│ └── test_random.py
│ ├── request_tests
│ ├── test_not_connected.py
│ ├── test_request.py
│ └── test_ve_kernel_err_chk.py
│ ├── sca_tests
│ ├── conftest.py
│ ├── pytest.ini
│ ├── test_1d_axial.py
│ ├── test_2d_axial.py
│ ├── test_2d_diagonal.py
│ ├── test_2d_planar.py
│ ├── test_3d_axial.py
│ ├── test_3d_volumetric.py
│ ├── test_4d_axial.py
│ ├── test_4d_hypervolumetric.py
│ ├── test_abnormal.py
│ ├── test_autogen_out.py
│ ├── test_coverage.py
│ ├── test_destroy.py
│ ├── test_div_sub.py
│ └── test_multi_ndarray.py
│ ├── sorting_tests
│ ├── __init__.py
│ ├── test_count.py
│ ├── test_search.py
│ └── test_sort.py
│ ├── statistics_tests
│ ├── __init__.py
│ ├── test_array_mean_legacy.py
│ ├── test_array_ptp_legacy.py
│ ├── test_array_std_legacy.py
│ ├── test_array_var_legacy.py
│ ├── test_average.py
│ ├── test_average_legacy.py
│ ├── test_bincount_legacy.py
│ ├── test_corrcoef_legacy.py
│ ├── test_correlate_legacy.py
│ ├── test_cov_legacy.py
│ ├── test_digitize_legacy.py
│ ├── test_histogram2d_legacy.py
│ ├── test_histogram_bin_edges_legacy.py
│ ├── test_histogram_legacy.py
│ ├── test_histogramdd_legacy.py
│ ├── test_mean_legacy.py
│ ├── test_median_legacy.py
│ ├── test_nanmean_legacy.py
│ ├── test_nanmedian_legacy.py
│ ├── test_nanpercentile_legacy.py
│ ├── test_nanquantile_legacy.py
│ ├── test_nanstd_legacy.py
│ ├── test_nanvar_legacy.py
│ ├── test_percentile_legacy.py
│ ├── test_ptp_legacy.py
│ ├── test_quantile_legacy.py
│ ├── test_std_legacy.py
│ └── test_var_legacy.py
│ ├── ufunc_tests
│ ├── __init__.py
│ ├── conftest.py
│ ├── pytest.ini
│ ├── test_accumulate.py
│ ├── test_accumulate_coverage.py
│ ├── test_accumulate_fast_math.py
│ ├── test_accumulate_full.py
│ ├── test_binary_fast_math.py
│ ├── test_binary_full.py
│ ├── test_outer.py
│ ├── test_outer_coverage.py
│ ├── test_outer_fast_math.py
│ ├── test_outer_full.py
│ ├── test_reduce.py
│ ├── test_reduce_coverage.py
│ ├── test_reduce_fast_math.py
│ ├── test_reduce_full.py
│ ├── test_reduceat.py
│ ├── test_reduceat_coverage.py
│ ├── test_reduceat_fast_math.py
│ ├── test_reduceat_full.py
│ ├── test_unary_fast_math.py
│ └── test_unary_full.py
│ ├── venode_tests
│ ├── __init__.py
│ ├── test_apply.py
│ ├── test_creation_ves.py
│ ├── test_device.py
│ ├── test_enter.py
│ ├── test_fft_ves.py
│ ├── test_ftrace_ves.py
│ ├── test_indexing_ves.py
│ ├── test_io_ves.py
│ ├── test_jit_ves.py
│ ├── test_linalg_ves.py
│ ├── test_ma_ves.py
│ ├── test_manipulation_ves.py
│ ├── test_ndarray_ves.py
│ ├── test_runtime_error_at_import.py
│ ├── test_sca_ves.py
│ ├── test_sorting_ves.py
│ ├── test_statistics_ves.py
│ ├── test_status.py
│ ├── test_ufunc_ves.py
│ ├── test_use.py
│ └── test_value_error_at_import.py
│ ├── veo_tests
│ ├── test_close.py
│ ├── test_conv_i64.py
│ └── test_veo.py
│ └── wrap_tests
│ ├── __init__.py
│ └── test_numpy_wrap.py
└── tox.ini
/.coveragerc:
--------------------------------------------------------------------------------
1 | [run]
2 | plugins = Cython.Coverage
3 |
4 | [report]
5 | exclude_lines =
6 | pragma: no cover
7 | def __repr__
8 | raise NotImplementedError
9 | return NotImplemented
10 | @staticmethod
11 | omit =
12 | */testing/*
13 | */veo/vebuild.py
14 | */prof/prof.py
15 |
--------------------------------------------------------------------------------
/.flake8:
--------------------------------------------------------------------------------
1 | [flake8]
2 | max-line-length = 89
3 | filename = *.py,*.pyx,*.px*
4 | exclude =
5 | build,dist,,bench,.git,*.m4,doc,.tox
6 | ignore = W503,W504,W605,E262,E116
7 | per-file-ignores =
8 | *.pyx,*.px*: E211,E225,E226,E227,E275,E999
9 | force-check = True
10 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.o
2 | *.so
3 | *.log
4 | *_log\.*
5 | *.npy
6 | *.npz
7 | *.png
8 | *.pickle
9 | *.egg-info
10 | ftrace.out*
11 | /build/
12 | /dist/
13 | /obj/
14 | /obj_ve1/
15 | /obj_ve3/
16 | /.tox/
17 | /doc/build/
18 | generated
19 | MANIFEST.in
20 | setup.cfg
21 | __pycache__
22 | htmlcov
23 | .coverage
24 | build_info.py
25 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | BSD 3-Clause License
2 |
3 | Copyright (c) 2020, NEC Corporation
4 | All rights reserved.
5 |
6 | Redistribution and use in source and binary forms, with or without
7 | modification, are permitted provided that the following conditions are met:
8 |
9 | 1. Redistributions of source code must retain the above copyright notice, this
10 | list of conditions and the following disclaimer.
11 |
12 | 2. Redistributions in binary form must reproduce the above copyright notice,
13 | this list of conditions and the following disclaimer in the documentation
14 | and/or other materials provided with the distribution.
15 |
16 | 3. Neither the name of the copyright holder nor the names of its
17 | contributors may be used to endorse or promote products derived from
18 | this software without specific prior written permission.
19 |
20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 |
--------------------------------------------------------------------------------
/banner/NLCPy_banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SX-Aurora/nlcpy/78534eb1695863dfe6e731b8f1e8156061c8a988/banner/NLCPy_banner.png
--------------------------------------------------------------------------------
/bench/Haversine/clean.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | rm -rf result/*
4 |
--------------------------------------------------------------------------------
/bench/Haversine/data:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SX-Aurora/nlcpy/78534eb1695863dfe6e731b8f1e8156061c8a988/bench/Haversine/data
--------------------------------------------------------------------------------
/bench/Haversine/prev/v2.2.0_ve1/size.dat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SX-Aurora/nlcpy/78534eb1695863dfe6e731b8f1e8156061c8a988/bench/Haversine/prev/v2.2.0_ve1/size.dat
--------------------------------------------------------------------------------
/bench/Haversine/prev/v2.2.0_ve1/time_nlcpy.dat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SX-Aurora/nlcpy/78534eb1695863dfe6e731b8f1e8156061c8a988/bench/Haversine/prev/v2.2.0_ve1/time_nlcpy.dat
--------------------------------------------------------------------------------
/bench/basic_comp/bench_core.py:
--------------------------------------------------------------------------------
1 | import importlib
2 | import time
3 |
4 |
5 | def run_flush(m, func, *args):
6 | res = func(*args)
7 | if m.__name__ == 'nlcpy':
8 | m.request.flush()
9 | elif m.__name__ == 'cupy':
10 | m.cuda.Stream().null.synchronize()
11 | return res
12 |
13 | def gen_data(m, data_func, shape):
14 | m.random.seed(0)
15 | data = run_flush(m, data_func, shape)
16 | return data
17 |
18 | def warmup(m, compute_func, data):
19 | if type(data) is tuple and len(data) > 1:
20 | run_flush(m, compute_func, *data)
21 | else:
22 | run_flush(m, compute_func, data)
23 |
24 | def run_benchmark(m, compute_func, data, rounds=5):
25 | warmup(m, compute_func, data)
26 | s = time.time()
27 | for i in range(rounds):
28 | if type(data) is tuple and len(data) > 1:
29 | res = run_flush(m, compute_func, *data)
30 | else:
31 | res = run_flush(m, compute_func, data)
32 | e = time.time() - s
33 | return res, e
34 |
35 |
--------------------------------------------------------------------------------
/bench/basic_comp/clean.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | rm -rf result/*
4 | rm -rf __pycache__
5 |
--------------------------------------------------------------------------------
/bench/basic_comp/eval.py:
--------------------------------------------------------------------------------
1 | from bench_op import *
2 |
3 | bench_sum()
4 | bench_std()
5 | bench_add()
6 | bench_copy()
7 | bench_fft()
8 | bench_matmul()
9 | bench_solve()
10 | write_runtime()
11 |
--------------------------------------------------------------------------------
/bench/basic_comp/gen_graph.py:
--------------------------------------------------------------------------------
1 | import numpy as np
2 | import pandas as pd
3 | import seaborn as sns
4 | import pickle
5 | import matplotlib
6 | from matplotlib import pyplot as plt
7 | from bench_op import modules
8 |
9 | def set_additional_info(datasets):
10 | refs = datasets['numpy']['runtime']
11 | n = len(datasets['numpy']['runtime'])
12 | for m in modules:
13 | datasets[m]['speedup'] = [refs[i] / datasets[m]['runtime'][i] for i in range(n)]
14 | datasets[m]['module'] = [m for _ in range(n)]
15 |
16 | # load picle data
17 | path = 'result/{}_result.pickle'
18 | datasets = {}
19 | for m in modules:
20 | filepath = path.format(m)
21 | with open(filepath, mode='rb') as fi:
22 | datasets[m] = pickle.load(fi)
23 | set_additional_info(datasets)
24 |
25 | # create dataframe
26 | dfs = []
27 | for m in modules:
28 | dfs.append(pd.DataFrame(datasets[m]))
29 | df = pd.concat(dfs)
30 | df = df[df.module != 'numpy']
31 | # df = df[df.array_size == '800MB']
32 |
33 | print("df:\n", df)
34 |
35 | sns.set(style='darkgrid', font_scale=1.2)
36 |
37 | ax = sns.barplot(
38 | x='operations',
39 | y='speedup',
40 | hue='module',
41 | data=df,
42 | palette='Set1',
43 | ci=None
44 | )
45 | ax.set_xlabel('opetations', fontsize=12)
46 | ax.set_ylabel('speedup', fontsize=14)
47 | ax.set_title('Speedup ratio (NumPy=1), datasize=800MB, double precision', fontsize=18)
48 | # ax.set_yscale('log')
49 | ax.get_yaxis().set_major_formatter(matplotlib.ticker.ScalarFormatter())
50 | ax.grid(which='minor', axis='y')
51 | for p in ax.patches:
52 | ax.annotate(
53 | format(p.get_height(), '.2f'),
54 | (p.get_x() + p.get_width() / 2., p.get_height()),
55 | ha = 'center',
56 | va = 'top',
57 | xytext = (0, 10),
58 | textcoords = 'offset points',
59 | fontsize=10
60 | )
61 |
62 | plt.xticks(rotation=60)
63 | plt.legend(bbox_to_anchor=(1.05, 1), loc='upper left', borderaxespad=0)
64 | plt.savefig('result/basic_comp.png', dpi=600, bbox_inches='tight')
65 |
--------------------------------------------------------------------------------
/bench/basic_comp/run_bench.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | python eval.py
4 | python gen_graph.py
5 |
--------------------------------------------------------------------------------
/bench/check_ufunc/bench_core.py:
--------------------------------------------------------------------------------
1 | import importlib
2 | import time
3 |
4 |
5 | def run_flush(m, func, *args):
6 | res = func(*args)
7 | if m.__name__ == 'nlcpy':
8 | m.request.flush()
9 | return res
10 |
11 | def gen_data(m, data_func, shape):
12 | m.random.seed(0)
13 | data = run_flush(m, data_func, shape)
14 | return data
15 |
16 | def warmup(m, compute_func, data):
17 | run_flush(m, compute_func, data, data)
18 |
19 | def run_benchmark(m, compute_func, data, is_binary=True, rounds=5):
20 | warmup(m, compute_func, data)
21 | s = time.time()
22 | for i in range(rounds):
23 | if is_binary:
24 | res = run_flush(m, compute_func, data, data)
25 | else:
26 | res = run_flush(m, compute_func, data)
27 | e = time.time() - s
28 | return res, e
29 |
30 |
--------------------------------------------------------------------------------
/bench/check_ufunc/clean.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | rm -rf result/*
4 | rm -rf __pycache__
5 |
6 |
--------------------------------------------------------------------------------
/bench/check_ufunc/eval.py:
--------------------------------------------------------------------------------
1 | from bench_ufunc import *
2 |
3 | bench_binary()
4 | bench_unary()
5 |
6 | write_runtime()
7 |
8 |
--------------------------------------------------------------------------------
/bench/check_ufunc/extract_bad_op.py:
--------------------------------------------------------------------------------
1 | import numpy as np
2 | import pandas as pd
3 | import seaborn as sns
4 | import pickle
5 | import matplotlib
6 | from matplotlib import pyplot as plt
7 |
8 | with open('result/ufunc_result.pickle', mode='rb') as fi:
9 | data = pickle.load(fi)
10 |
11 | df = pd.DataFrame(data)
12 |
13 | df_vp = df[df.module != 'numpy']
14 | df_vp_bad = df_vp[df_vp['speedup'] < 1.0]
15 |
16 | print("\n*** Bad Performance Operations Compared to NumPy\n")
17 | print(df_vp_bad)
18 |
--------------------------------------------------------------------------------
/bench/check_ufunc/run_bench.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | if [ ! -d result ]; then
4 | mkdir result
5 | fi
6 |
7 | python eval.py
8 |
9 | python extract_bad_op.py
10 |
11 |
12 |
--------------------------------------------------------------------------------
/bench/clean_all.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | DIRS=`find . -name "clean.sh" | xargs -I {} dirname {}`
4 | echo $FILES
5 |
6 | for d in $DIRS; do
7 | (cd $d; sh clean.sh)
8 | done
9 |
--------------------------------------------------------------------------------
/bench/fft_bench/bench_core.py:
--------------------------------------------------------------------------------
1 | import importlib
2 | import time
3 |
4 | def run_flush(m, func, *args):
5 | res = func(*args)
6 | if m.__name__ == 'nlcpy':
7 | m.request.flush()
8 | return res
9 |
10 | def gen_data(m, data_func, shape):
11 | m.random.seed(0)
12 | data = run_flush(m, data_func, shape)
13 | return data
14 |
15 | def warmup(m, compute_func, data):
16 | run_flush(m, compute_func, data)
17 |
18 | def run_benchmark(m, compute_func, data, rounds=5):
19 | warmup(m, compute_func, data)
20 | s = time.time()
21 | for i in range(rounds):
22 | res = run_flush(m, compute_func, data)
23 | e = time.time() - s
24 | return res, e
25 |
--------------------------------------------------------------------------------
/bench/fft_bench/clean.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | rm -rf result/*
4 | rm -rf __pycache__
5 |
6 |
--------------------------------------------------------------------------------
/bench/fft_bench/eval.py:
--------------------------------------------------------------------------------
1 | from bench_fft import *
2 | from gen_graph import *
3 |
4 | bench_fft()
5 | bench_ifft()
6 | bench_fft2()
7 | bench_ifft2()
8 | bench_fftn()
9 | bench_ifftn()
10 | bench_rfft()
11 | bench_irfft()
12 | bench_rfft2()
13 | bench_irfft2()
14 | bench_rfftn()
15 | bench_irfftn()
16 | bench_hfft()
17 | bench_ihfft()
18 | make_graph_all()
19 |
20 |
--------------------------------------------------------------------------------
/bench/fft_bench/gen_graph.py:
--------------------------------------------------------------------------------
1 | import numpy as np
2 | import pandas as pd
3 | import seaborn as sns
4 | import pickle
5 | import matplotlib
6 | import glob
7 | import re
8 | import pickle
9 | from matplotlib import pyplot as plt
10 |
11 | def make_graph_all():
12 | gb = glob.glob('result/*.pickle')
13 | for ax in gb:
14 | m = re.match('result/(\w+)-([0-9])D\.pickle', ax)
15 | name = m.group(1)
16 | num = m.group(2)
17 | dw_graph(name,num)
18 |
19 | def dw_graph(name, num):
20 | with open('result/{}-{}D.pickle'.format(name, num), mode='rb') as fi:
21 | data = pickle.load(fi)
22 |
23 | df = pd.DataFrame(data)
24 | sns.set(style='darkgrid', font_scale=0.5)
25 |
26 | ax = sns.barplot(
27 | x='size',
28 | y='speedup',
29 | hue = 'module',
30 | data=df,
31 | )
32 |
33 | ax.set_xlabel('number of array elements', fontsize=10)
34 | ax.set_ylabel('speedup', fontsize=12)
35 | ax.set_title('Speedup ratio [' + name + ',' + num + 'D]', fontsize=14)
36 | ax.get_yaxis().set_major_formatter(matplotlib.ticker.ScalarFormatter())
37 | ax.grid(which='minor', axis='y')
38 | ax.legend(bbox_to_anchor=(1.05, 1), loc='upper left', fontsize=14)
39 |
40 | for p in ax.patches:
41 | ax.annotate(
42 | format(p.get_height(), '.4f'),
43 | (p.get_x() + p.get_width() / 2., p.get_height()),
44 | ha = 'center',
45 | va = 'top',
46 | xytext = (0, 10),
47 | textcoords = 'offset points',
48 | fontsize=6
49 | )
50 |
51 | plt.savefig('result/{}-{}D.png'.format(name, num), dpi=600, bbox_inches='tight')
52 | ax.clear()
53 |
--------------------------------------------------------------------------------
/bench/fft_bench/run_bench.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | if [ ! -d result ]; then
4 | mkdir result
5 | fi
6 |
7 | python eval.py
8 |
9 |
10 |
--------------------------------------------------------------------------------
/bench/stencil_bench/clean.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | rm -rf *.png *.csv __pycache__
4 |
--------------------------------------------------------------------------------
/bench/stencil_bench/compute_nlcpy_sca.py:
--------------------------------------------------------------------------------
1 | import nlcpy as vp
2 | import time
3 |
4 |
5 | ############
6 | # 2D #
7 | ############
8 |
9 | def nlcpy_2d_sca_impl(x, y, coef, N, I=1):
10 | kerns = []
11 | dx, dy = vp.sca.create_descriptor((x, y))
12 |
13 | def create_sca_kernel(dx, dy):
14 | loc_x = [(0, i) for i in range(-N, N+1)]
15 | loc_y = [(i, 0) for i in range(-N, N+1)]
16 | d = vp.sca.empty_description()
17 | for loc in set(loc_x + loc_y):
18 | d += dx[..., loc[0], loc[1]]
19 | d *= coef
20 | return vp.sca.create_kernel(d, dy[...])
21 |
22 | kerns.append(create_sca_kernel(dx, dy))
23 | kerns.append(create_sca_kernel(dy, dx))
24 |
25 | vp.request.flush()
26 | s = time.time()
27 | for i in range(I):
28 | res = kerns[i % 2].execute()
29 | vp.request.flush()
30 | e = time.time()
31 | return e - s, res.get()
32 |
33 |
34 | ############
35 | # 3D #
36 | ############
37 |
38 | def nlcpy_3d_sca_impl(x, y, coef, N, I=1):
39 | kerns = []
40 | dx, dy = vp.sca.create_descriptor((x, y))
41 |
42 | def create_sca_kernel(dx, dy):
43 | loc_x = [(0, 0, i) for i in range(-N, N+1)]
44 | loc_y = [(0, i, 0) for i in range(-N, N+1)]
45 | loc_z = [(i, 0, 0) for i in range(-N, N+1)]
46 | d = vp.sca.empty_description()
47 | for loc in set(loc_x + loc_y + loc_z):
48 | d += dx[..., loc[0], loc[1], loc[2]]
49 | d *= coef
50 | return vp.sca.create_kernel(d, dy[...])
51 |
52 | kerns.append(create_sca_kernel(dx, dy))
53 | kerns.append(create_sca_kernel(dy, dx))
54 |
55 | vp.request.flush()
56 | s = time.time()
57 | for i in range(I):
58 | res = kerns[i % 2].execute()
59 | vp.request.flush()
60 | e = time.time()
61 | return e - s, res
62 |
--------------------------------------------------------------------------------
/bench/stencil_bench/gen_graph.py:
--------------------------------------------------------------------------------
1 | import params
2 | import seaborn as sns
3 | import pandas as pd
4 | from numpy import testing
5 | from matplotlib import pyplot as plt
6 |
7 | def gen(dic, palettes, markers, name, save_csv=True):
8 | plt.clf()
9 | sns.set(style='darkgrid', font_scale=1.)
10 | df = pd.DataFrame(dic)
11 | if save_csv:
12 | df.to_csv(name + '.csv')
13 | print(df)
14 | check(df)
15 | sns.lineplot(
16 | x='size',
17 | y='GFLOPS',
18 | hue='target',
19 | style='target',
20 | markers=markers,
21 | dashes=False,
22 | palette=palettes,
23 | data=dic
24 | )
25 | plt.xticks(rotation=30)
26 | plt.savefig(name + '.png', bbox_inches='tight', dpi=600)
27 |
28 | def check(df):
29 | df_targs = []
30 | for _targ in params.TARGS:
31 | df_targs.append(df.query("target == @_targ"))
32 |
33 | if len(df_targs) <= 1:
34 | return
35 |
36 | base = df_targs[0]
37 | for _df in df_targs[1:]:
38 | testing.assert_allclose(base['max'].values, _df['max'].values)
39 | testing.assert_allclose(base['min'].values, _df['min'].values)
40 | testing.assert_allclose(base['avg'].values, _df['avg'].values)
41 | testing.assert_allclose(base['std'].values, _df['std'].values)
42 |
43 |
44 | if __name__ == '__main__':
45 | # 2D
46 | df = pd.read_csv('perf-xya.csv')
47 | gen(df, params.PALETTES, params.MARKERS, 'perf-xya', save_csv=False)
48 | # 3D
49 | df = pd.read_csv('perf-xyza.csv')
50 | gen(df, params.PALETTES, params.MARKERS, 'perf-xyza', save_csv=False)
51 |
--------------------------------------------------------------------------------
/bench/stencil_bench/params.py:
--------------------------------------------------------------------------------
1 | from pprint import pprint
2 |
3 | ITER = 1000
4 | STENCIL_SCALE = 6
5 | COEF = .01
6 | DTYPES = ('f4',)
7 |
8 | nlcpy_sca = [
9 | 'NLCPy(SCA) / VE',
10 | 'red',
11 | 'o'
12 | ]
13 | cupy_fusion = [
14 | 'CuPy(Fusion) / GPU',
15 | 'darkseagreen',
16 | 'D'
17 | ]
18 | numba_cuda = [
19 | 'Numba / GPU',
20 | 'darkgreen',
21 | 'v'
22 | ]
23 | pystencils_gpu = [
24 | 'pystencils / GPU',
25 | 'green',
26 | '^'
27 | ]
28 | pystencils_cpu = [
29 | 'pystencils / CPU',
30 | 'darkblue',
31 | '<'
32 | ]
33 | numba_cpu = [
34 | 'Numba / CPU',
35 | 'blue',
36 | '>'
37 | ]
38 |
39 | TARGS = (
40 | nlcpy_sca,
41 | # pystencils_gpu,
42 | cupy_fusion,
43 | # numba_cuda,
44 | # pystencils_cpu,
45 | # numba_cpu,
46 | )
47 | PALETTES = tuple([_targ[1] for _targ in TARGS])
48 | MARKERS = tuple([_targ[2] for _targ in TARGS])
49 |
50 | SHAPES = {
51 | '2d': (
52 | ( 64, 64),
53 | ( 128, 128),
54 | ( 256, 256),
55 | ( 512, 512),
56 | (1024, 1024),
57 | ),
58 | '3d': (
59 | ( 64, 64, 64),
60 | ( 128, 128, 128),
61 | ( 256, 256, 256),
62 | ( 512, 512, 512),
63 | (1024, 1024, 1024),
64 | ),
65 | }
66 |
67 |
68 | def print_params():
69 | print('dtype:', DTYPES)
70 | print('iter:', ITER)
71 | print('stencil_scale:', STENCIL_SCALE)
72 | print('target:', TARGS)
73 | print('shape:', SHAPES)
74 |
--------------------------------------------------------------------------------
/build_inplace.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | ### usage ###
4 | # VH only
5 | # $ sh build_inplace.sh --targ vh
6 | #
7 | # VE1 and VE3
8 | # $ sh build_inplace.sh --targ ve1,ve3
9 | #
10 | # VH and VE1 and VE3
11 | # $ sh build_inplace.sh --targ vh,ve1,ve3
12 | #############
13 |
14 | python setup.py build_ext -i $@
15 |
--------------------------------------------------------------------------------
/config/MANIFEST.in.sdist:
--------------------------------------------------------------------------------
1 | prune obj_ve1/
2 | prune obj_ve3/
3 | prune build/
4 | prune dist/
5 | prune rpm/
6 | prune nlcpy.egg-info
7 | include Makefile
8 | include make.inc
9 | include MANIFEST.in.sdist
10 | include MANIFEST.in.wheel
11 | recursive-include nlcpy *
12 | recursive-include scripts *
13 |
--------------------------------------------------------------------------------
/config/MANIFEST.in.wheel.ve1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SX-Aurora/nlcpy/78534eb1695863dfe6e731b8f1e8156061c8a988/config/MANIFEST.in.wheel.ve1
--------------------------------------------------------------------------------
/config/MANIFEST.in.wheel.ve3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SX-Aurora/nlcpy/78534eb1695863dfe6e731b8f1e8156061c8a988/config/MANIFEST.in.wheel.ve3
--------------------------------------------------------------------------------
/config/MANIFEST.in.wheel.vh:
--------------------------------------------------------------------------------
1 | global-exclude *.o *.c *.h *.cpp *.pyx *.pxi *.m4 *.master *.master2
2 | include nlcpy/include/*.h
3 | include nlcpy/veo/*.pxd
4 |
--------------------------------------------------------------------------------
/config/setup_ve1.cfg:
--------------------------------------------------------------------------------
1 | # https://setuptools.readthedocs.io/en/latest/setuptools.html#configuring-setup-using-setup-cfg-files
2 | [metadata]
3 | name = nlcpy_ve1_kernel
4 | description = VE1 kernel for NLCPy
5 | long_description = file:README.md
6 | long_description_content_type = text/markdown
7 | keywords = nlcpy_ve1_kernel
8 | license = BSD 3-Clause
9 | classifiers=
10 | Development Status :: 5 - Production/Stable
11 | License :: OSI Approved :: BSD License
12 | Operating System :: POSIX :: Linux
13 | Programming Language :: C
14 | Programming Language :: Python :: 3 :: Only
15 | Topic :: Scientific/Engineering
16 | Topic :: Software Development
17 | url = https://github.com/SX-Aurora/nlcpy/
18 | project_urls=
19 | Bug Tracker = https://github.com/SX-Aurora/nlcpy/issues
20 | Documentation = https://www.hpc.nec/documents/nlcpy/en/index.html
21 | author = NEC
22 | author_email = dev-nlcpy@sxarr.jp.nec.com
23 |
24 | [options]
25 | zip_safe=False
26 | include_package_data=True
27 | packages=nlcpy_ve1_kernel
28 | python_requires= >=3.6,<3.9
29 |
30 | [options.package_data]
31 | * = *.so
32 |
--------------------------------------------------------------------------------
/config/setup_ve3.cfg:
--------------------------------------------------------------------------------
1 | # https://setuptools.readthedocs.io/en/latest/setuptools.html#configuring-setup-using-setup-cfg-files
2 | [metadata]
3 | name = nlcpy_ve3_kernel
4 | description = VE3 kernel for NLCPy
5 | long_description = file:README.md
6 | long_description_content_type = text/markdown
7 | keywords = nlcpy_ve3_kernel
8 | license = BSD 3-Clause
9 | classifiers=
10 | Development Status :: 5 - Production/Stable
11 | License :: OSI Approved :: BSD License
12 | Operating System :: POSIX :: Linux
13 | Programming Language :: C
14 | Programming Language :: Python :: 3 :: Only
15 | Topic :: Scientific/Engineering
16 | Topic :: Software Development
17 | url = https://github.com/SX-Aurora/nlcpy/
18 | project_urls=
19 | Bug Tracker = https://github.com/SX-Aurora/nlcpy/issues
20 | Documentation = https://www.hpc.nec/documents/nlcpy/en/index.html
21 | author = NEC
22 | author_email = dev-nlcpy@sxarr.jp.nec.com
23 |
24 | [options]
25 | zip_safe=False
26 | include_package_data=True
27 | packages=nlcpy_ve3_kernel
28 | python_requires= >=3.6,<3.9
29 |
30 | [options.package_data]
31 | * = *.so
32 |
--------------------------------------------------------------------------------
/config/setup_vh.cfg:
--------------------------------------------------------------------------------
1 | # https://setuptools.readthedocs.io/en/latest/setuptools.html#configuring-setup-using-setup-cfg-files
2 | [metadata]
3 | name = nlcpy
4 | description = NLCPy is a package for accelerating performance of Python scripts using NumPy on SX-Aurora TSUBASA.
5 | long_description = file:README.md
6 | long_description_content_type = text/markdown
7 | keywords = nlcpy
8 | license = BSD 3-Clause
9 | classifiers=
10 | Development Status :: 5 - Production/Stable
11 | License :: OSI Approved :: BSD License
12 | Operating System :: POSIX :: Linux
13 | Programming Language :: Python :: 3.6
14 | Programming Language :: Python :: 3.7
15 | Programming Language :: Python :: 3.8
16 | Programming Language :: C
17 | Programming Language :: Cython
18 | Programming Language :: Python :: 3 :: Only
19 | Topic :: Scientific/Engineering
20 | Topic :: Software Development
21 | url = https://github.com/SX-Aurora/nlcpy/
22 | project_urls=
23 | Bug Tracker = https://github.com/SX-Aurora/nlcpy/issues
24 | Documentation = https://www.hpc.nec/documents/nlcpy/en/index.html
25 | author = NEC
26 | author_email = dev-nlcpy@sxarr.jp.nec.com
27 |
28 | [options]
29 | zip_safe=False
30 | include_package_data=True
31 | packages=find:
32 | python_requires= >=3.6,<3.9
33 |
34 | [options.package_data]
35 | * = *.so
36 |
37 | [options.packages.find]
38 | exclude=
39 | nlcpy_ve1_kernel*
40 | nlcpy_ve3_kernel*
41 |
--------------------------------------------------------------------------------
/doc/.gitignore:
--------------------------------------------------------------------------------
1 | *.out
2 |
--------------------------------------------------------------------------------
/doc/html_reform.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | DIR=build/html/ja
4 |
5 | if [ $1 = "ja" ]; then
6 | echo -n Reforming html...
7 | find build/html/ja/ -name "*.html" | xargs sed -i 's/\(
\)Restriction/\1制限事項/g'
8 | echo done
9 | fi
10 |
--------------------------------------------------------------------------------
/doc/image/NLCPy_banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SX-Aurora/nlcpy/78534eb1695863dfe6e731b8f1e8156061c8a988/doc/image/NLCPy_banner.png
--------------------------------------------------------------------------------
/doc/image/averaging_filter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SX-Aurora/nlcpy/78534eb1695863dfe6e731b8f1e8156061c8a988/doc/image/averaging_filter.png
--------------------------------------------------------------------------------
/doc/image/cfd.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SX-Aurora/nlcpy/78534eb1695863dfe6e731b8f1e8156061c8a988/doc/image/cfd.gif
--------------------------------------------------------------------------------
/doc/image/clustering.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SX-Aurora/nlcpy/78534eb1695863dfe6e731b8f1e8156061c8a988/doc/image/clustering.gif
--------------------------------------------------------------------------------
/doc/image/lazy_evaluation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SX-Aurora/nlcpy/78534eb1695863dfe6e731b8f1e8156061c8a988/doc/image/lazy_evaluation.png
--------------------------------------------------------------------------------
/doc/image/nec-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SX-Aurora/nlcpy/78534eb1695863dfe6e731b8f1e8156061c8a988/doc/image/nec-logo.png
--------------------------------------------------------------------------------
/doc/image/nlcpy_image1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SX-Aurora/nlcpy/78534eb1695863dfe6e731b8f1e8156061c8a988/doc/image/nlcpy_image1.png
--------------------------------------------------------------------------------
/doc/image/spectrum.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SX-Aurora/nlcpy/78534eb1695863dfe6e731b8f1e8156061c8a988/doc/image/spectrum.png
--------------------------------------------------------------------------------
/doc/image/thermal_simulation.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SX-Aurora/nlcpy/78534eb1695863dfe6e731b8f1e8156061c8a988/doc/image/thermal_simulation.gif
--------------------------------------------------------------------------------
/doc/image/wave_simulation.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SX-Aurora/nlcpy/78534eb1695863dfe6e731b8f1e8156061c8a988/doc/image/wave_simulation.gif
--------------------------------------------------------------------------------
/doc/nlcpydoc/templates/nlcpydoc_docstring.rst:
--------------------------------------------------------------------------------
1 | {{index}}
2 | {{summary}}
3 | {{extended_summary}}
4 | {{parameters}}
5 | {{returns}}
6 | {{yields}}
7 | {{receives}}
8 | {{other_parameters}}
9 | {{raises}}
10 | {{warns}}
11 | {{warnings}}
12 | {{see_also}}
13 | {{note}}
14 | {{restriction}}
15 | {{references}}
16 | {{examples}}
17 | {{attributes}}
18 | {{methods}}
19 |
--------------------------------------------------------------------------------
/doc/source/.gitignore:
--------------------------------------------------------------------------------
1 | comparison_table.rst.inc
2 | *.mo
3 |
--------------------------------------------------------------------------------
/doc/source/_templates/autosummary/class.rst:
--------------------------------------------------------------------------------
1 | {{ fullname }}
2 | {{ underline }}
3 |
4 | .. currentmodule:: {{ module }}
5 |
6 | .. autoclass:: {{ objname }}
7 |
8 | ..
9 | Methods
10 |
11 | {% block methods %}
12 |
13 | .. rubric:: Methods
14 |
15 | ..
16 | Special methods
17 |
18 | {% for item in ('__call__', '__enter__', '__exit__', '__getitem__', '__setitem__', '__len__', '__next__', '__iter__', '__copy__') %}
19 | {% if item in all_methods or item in all_attributes %}
20 | .. automethod:: {{ item }}
21 | {% endif %}
22 | {%- endfor %}
23 |
24 | ..
25 | Ordinary methods
26 |
27 | {% for item in methods %}
28 | {% if item not in ('__init__',) %}
29 | .. automethod:: {{ item }}
30 | {% endif %}
31 | {%- endfor %}
32 |
33 | ..
34 | Special methods
35 |
36 | {% for item in ('__eq__', '__ne__', '__lt__', '__le__', '__gt__', '__ge__', '__nonzero__', '__bool__') %}
37 | {% if item in all_methods %}
38 | .. automethod:: {{ item }}
39 | {% endif %}
40 | {%- endfor %}
41 | {% endblock %}
42 |
43 | ..
44 | Atributes
45 |
46 | {% block attributes %} {% if attributes %}
47 |
48 | .. rubric:: Attributes
49 |
50 | {% for item in attributes %}
51 | .. autoattribute:: {{ item }}
52 | {%- endfor %}
53 | {% endif %} {% endblock %}
54 |
--------------------------------------------------------------------------------
/doc/source/_templates/layout.html:
--------------------------------------------------------------------------------
1 | {% extends "!layout.html" %}
2 |
3 | {% block htmltitle %}
4 |
5 | {{ super() }}
6 | {% endblock %}
7 |
--------------------------------------------------------------------------------
/doc/source/building_docs.rst:
--------------------------------------------------------------------------------
1 | .. _building_docs:
2 |
3 | Building the Documentation
4 | ==========================
5 |
6 | This page describes how to build this documentation.
7 |
8 |
9 | Requirements
10 | ------------
11 |
12 | Before building the documents, the following packages are required to be installed on your x86 Node of SX-Aurora TSUBASA:
13 |
14 | * `Sphinx `_
15 | * `Read the Docs Sphinx Theme `_
16 | * `Matplotlib `_
17 | * `NumPy `_
18 |
19 | Building
20 | --------
21 |
22 | Before building the documents, please download the package from GitHub::
23 |
24 | $ git clone https://github.com/SX-Aurora/nlcpy.git
25 |
26 | And, entering the following commands::
27 |
28 | $ cd nlcpy
29 | $ sh build_inplace.sh
30 | $ cd doc
31 | $ make html
32 |
33 | The documentation is created in the following directory::
34 |
35 | $ ls build/html/{en, ja}
36 |
--------------------------------------------------------------------------------
/doc/source/example/index.rst:
--------------------------------------------------------------------------------
1 | .. _example:
2 |
3 | Examples
4 | ========
5 |
6 | Example programs using NLCPy are listed in the following pages:
7 |
8 | .. toctree::
9 | :maxdepth: 1
10 |
11 | thermal
12 | averaging
13 | spectrum
14 | clustering
15 | wave
16 | cfd
17 |
--------------------------------------------------------------------------------
/doc/source/example/thermal.rst:
--------------------------------------------------------------------------------
1 | .. _example_thermal:
2 |
3 | Example: Thermal Simulation
4 | ===========================
5 |
6 | Example programs for thermal simulation are listed in the following pages:
7 |
8 | .. toctree::
9 | :maxdepth: 1
10 |
11 | thermal_naive
12 | thermal_sca
13 |
14 |
15 | The SCA implementaition is faster than the naive implementation.
16 | As for above examples, we obtained the following performance on VE Type 10B.
17 |
18 | - The naive implementaition: 7.0 [sec]
19 | - The SCA implementaition: 0.6 [sec]
20 |
--------------------------------------------------------------------------------
/doc/source/functions.rst:
--------------------------------------------------------------------------------
1 | Functions Provided by NLCPy
2 | ===========================
3 |
4 | NLCPy provides a subset of NumPy's API.
5 | Comparison tables between NLCPy and NumPy functions are as shown below.
6 | Functions that are represented ``-`` in the column "NLCPy" are not provided yet.
7 | If your scripts need to use unsuported functions in NLCPy, please see :ref:`Interoperability between NumPy and NLCPy `.
8 |
9 | .. include:: comparison_table.rst.inc
10 |
--------------------------------------------------------------------------------
/doc/source/index.rst:
--------------------------------------------------------------------------------
1 | ==========================================================
2 | NLCPy: NumPy-like API accelerated with SX-Aurora TSUBASA
3 | ==========================================================
4 |
5 | .. module:: nlcpy
6 |
7 | .. toctree::
8 | :maxdepth: 2
9 |
10 | userguide
11 | reference/index
12 | release_notes/index
13 |
--------------------------------------------------------------------------------
/doc/source/locale/ja/LC_MESSAGES/example/averaging.po:
--------------------------------------------------------------------------------
1 | # SOME DESCRIPTIVE TITLE.
2 | # Copyright (C) 2020, NEC Corporation
3 | # This file is distributed under the same license as the nlcpy package.
4 | # FIRST AUTHOR , 2020.
5 | #
6 | msgid ""
7 | msgstr ""
8 | "Project-Id-Version: nlcpy 1.0.0b1\n"
9 | "Report-Msgid-Bugs-To: \n"
10 | "POT-Creation-Date: 2021-01-21 17:37+0900\n"
11 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 | "Last-Translator: FULL NAME \n"
13 | "Language-Team: LANGUAGE \n"
14 | "MIME-Version: 1.0\n"
15 | "Content-Type: text/plain; charset=utf-8\n"
16 | "Content-Transfer-Encoding: 8bit\n"
17 | "Generated-By: Babel 2.9.0\n"
18 |
19 | #: ../../source/example/averaging.rst:4
20 | msgid "Example: Averaging Filter"
21 | msgstr "サンプル: 平均化フィルタ"
22 |
23 | #: ../../source/example/averaging.rst:10
24 | msgid "Objective"
25 | msgstr "目的"
26 |
27 | #: ../../source/example/averaging.rst:12
28 | msgid ""
29 | "We will blur a given image using an Averaging filter. The filter size is "
30 | "19 :math:`\\times` 19, and its coefficients are uniformly "
31 | ":math:`\\frac{1}{19 \\times 19}`."
32 | msgstr ""
33 | "平均化フィルタを使用して特定の画像をぼかします。 フィルタサイズは19 :math:`\\times` 19であり、その係数は一様に"
34 | " :math:`\\frac{1}{19 \\times 19}` です。"
35 |
36 | #: ../../source/example/averaging.rst:17
37 | msgid "Program"
38 | msgstr "プログラム"
39 |
40 | #: ../../source/example/averaging.rst:116
41 | msgid "Result"
42 | msgstr "結果"
43 |
44 |
--------------------------------------------------------------------------------
/doc/source/locale/ja/LC_MESSAGES/example/index.po:
--------------------------------------------------------------------------------
1 | # SOME DESCRIPTIVE TITLE.
2 | # Copyright (C) 2020, NEC Corporation
3 | # This file is distributed under the same license as the nlcpy package.
4 | # FIRST AUTHOR , 2020.
5 | #
6 | msgid ""
7 | msgstr ""
8 | "Project-Id-Version: nlcpy 1.0.0b1\n"
9 | "Report-Msgid-Bugs-To: \n"
10 | "POT-Creation-Date: 2020-11-18 17:24+0900\n"
11 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 | "Last-Translator: FULL NAME \n"
13 | "Language-Team: LANGUAGE \n"
14 | "MIME-Version: 1.0\n"
15 | "Content-Type: text/plain; charset=utf-8\n"
16 | "Content-Transfer-Encoding: 8bit\n"
17 | "Generated-By: Babel 2.7.0\n"
18 |
19 | #: ../../source/example/index.rst:4
20 | msgid "Examples"
21 | msgstr "サンプル"
22 |
23 | #: ../../source/example/index.rst:6
24 | msgid "Example programs using NLCPy are listed in the following pages:"
25 | msgstr "NLCPyを使用するプログラムのサンプルは、次のページにリストされています。"
26 |
27 |
--------------------------------------------------------------------------------
/doc/source/locale/ja/LC_MESSAGES/example/spectrum.po:
--------------------------------------------------------------------------------
1 | # SOME DESCRIPTIVE TITLE.
2 | # Copyright (C) 2020, NEC Corporation
3 | # This file is distributed under the same license as the nlcpy package.
4 | # FIRST AUTHOR , 2021.
5 | #
6 | msgid ""
7 | msgstr ""
8 | "Project-Id-Version: nlcpy 1.0.0\n"
9 | "Report-Msgid-Bugs-To: \n"
10 | "POT-Creation-Date: 2021-02-05 14:32+0900\n"
11 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 | "Last-Translator: FULL NAME \n"
13 | "Language-Team: LANGUAGE \n"
14 | "MIME-Version: 1.0\n"
15 | "Content-Type: text/plain; charset=utf-8\n"
16 | "Content-Transfer-Encoding: 8bit\n"
17 | "Generated-By: Babel 2.9.0\n"
18 |
19 | #: ../../source/example/spectrum.rst:4
20 | msgid "Example: Spectrum Analysis"
21 | msgstr "サンプル: スペクトル解析"
22 |
23 | #: ../../source/example/spectrum.rst:10
24 | msgid "Objective"
25 | msgstr "目的"
26 |
27 | #: ../../source/example/spectrum.rst:12
28 | msgid ""
29 | "We will analyze a spectrum of the noisy signal by using FFT. The input "
30 | "signal contains 30Hz, 150Hz, and 250Hz sine waves and normally "
31 | "distributed random numbers."
32 | msgstr "FFTを使用して、ノイズが含まれた信号のスペクトルを解析します。入力信号には、30Hz, 150Hz, および、250Hzの正弦波と正規分布乱数が含まれています。"
33 |
34 | #: ../../source/example/spectrum.rst:16
35 | msgid "Program"
36 | msgstr "プログラム"
37 |
38 | #: ../../source/example/spectrum.rst:78
39 | msgid "Result"
40 | msgstr "結果"
41 |
42 |
--------------------------------------------------------------------------------
/doc/source/locale/ja/LC_MESSAGES/example/thermal.po:
--------------------------------------------------------------------------------
1 | # SOME DESCRIPTIVE TITLE.
2 | # Copyright (C) 2020, NEC Corporation
3 | # This file is distributed under the same license as the nlcpy package.
4 | # FIRST AUTHOR , 2020.
5 | #
6 | msgid ""
7 | msgstr ""
8 | "Project-Id-Version: nlcpy 1.0.0b1\n"
9 | "Report-Msgid-Bugs-To: \n"
10 | "POT-Creation-Date: 2021-07-05 14:59+0900\n"
11 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 | "Last-Translator: FULL NAME \n"
13 | "Language-Team: LANGUAGE \n"
14 | "MIME-Version: 1.0\n"
15 | "Content-Type: text/plain; charset=utf-8\n"
16 | "Content-Transfer-Encoding: 8bit\n"
17 | "Generated-By: Babel 2.9.0\n"
18 |
19 | #: ../../source/example/thermal.rst:4
20 | msgid "Example: Thermal Simulation"
21 | msgstr "サンプル: サーマルシミュレーション"
22 |
23 | #: ../../source/example/thermal.rst:6
24 | msgid "Example programs for thermal simulation are listed in the following pages:"
25 | msgstr "サーマルシミュレーションのためのサンプルプログラムを以下のページに載せています:"
26 |
27 | #: ../../source/example/thermal.rst:15
28 | msgid ""
29 | "The SCA implementaition is faster than the naive implementation. As for "
30 | "above examples, we obtained the following performance on VE Type 10B."
31 | msgstr "SCA実装は、単純な実装より速いです。上の例では、VE Type 10Bで以下の性能となりました。"
32 |
33 | #: ../../source/example/thermal.rst:18
34 | msgid "The naive implementaition: 7.0 [sec]"
35 | msgstr "単純な実装: 7.0 [秒]"
36 |
37 | #: ../../source/example/thermal.rst:19
38 | msgid "The SCA implementaition: 0.6 [sec]"
39 | msgstr "SCA実装: 0.6 [秒]"
40 |
41 |
--------------------------------------------------------------------------------
/doc/source/locale/ja/LC_MESSAGES/index.po:
--------------------------------------------------------------------------------
1 | # SOME DESCRIPTIVE TITLE.
2 | # Copyright (C) 2020, NEC Corporation
3 | # This file is distributed under the same license as the nlcpy package.
4 | # FIRST AUTHOR , 2020.
5 | #
6 | msgid ""
7 | msgstr ""
8 | "Project-Id-Version: nlcpy 1.0.0b1\n"
9 | "Report-Msgid-Bugs-To: \n"
10 | "POT-Creation-Date: 2021-01-21 15:32+0900\n"
11 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 | "Last-Translator: FULL NAME \n"
13 | "Language-Team: LANGUAGE \n"
14 | "MIME-Version: 1.0\n"
15 | "Content-Type: text/plain; charset=utf-8\n"
16 | "Content-Transfer-Encoding: 8bit\n"
17 | "Generated-By: Babel 2.9.0\n"
18 |
19 | #: ../../source/index.rst:3
20 | msgid "NLCPy: NumPy-like API accelerated with SX-Aurora TSUBASA"
21 | msgstr ""
22 |
23 |
24 |
--------------------------------------------------------------------------------
/doc/source/locale/ja/LC_MESSAGES/reference/error_handling.po:
--------------------------------------------------------------------------------
1 | # SOME DESCRIPTIVE TITLE.
2 | # Copyright (C) 2020, NEC Corporation
3 | # This file is distributed under the same license as the nlcpy package.
4 | # FIRST AUTHOR , 2021.
5 | #
6 | #, fuzzy
7 | msgid ""
8 | msgstr ""
9 | "Project-Id-Version: nlcpy 1.0.0\n"
10 | "Report-Msgid-Bugs-To: \n"
11 | "POT-Creation-Date: 2022-11-15 11:02+0900\n"
12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13 | "Last-Translator: FULL NAME \n"
14 | "Language-Team: LANGUAGE \n"
15 | "MIME-Version: 1.0\n"
16 | "Content-Type: text/plain; charset=utf-8\n"
17 | "Content-Transfer-Encoding: 8bit\n"
18 | "Generated-By: Babel 2.9.1\n"
19 |
20 | #: ../../source/reference/error_handling.rst:2
21 | msgid "Floating Point Error Handling"
22 | msgstr ""
23 |
24 | #: ../../source/reference/error_handling.rst:4
25 | msgid "The following table shows error handling functions provided by NLCPy."
26 | msgstr ""
27 |
28 | #: ../../source/reference/error_handling.rst:7
29 | msgid "Setting and Getting Error Handring"
30 | msgstr ""
31 |
32 | #: ../../source/reference/error_handling.rst:15::1
33 | msgid ":obj:`nlcpy.seterr `"
34 | msgstr ""
35 |
36 | #: ../../source/reference/error_handling.rst:15::1
37 | msgid "Sets how floating-point errors are handled."
38 | msgstr ""
39 |
40 | #: ../../source/reference/error_handling.rst:15::1
41 | msgid ":obj:`nlcpy.geterr `"
42 | msgstr ""
43 |
44 | #: ../../source/reference/error_handling.rst:15::1
45 | msgid "Gets the current way of handling floating-point errors."
46 | msgstr ""
47 |
48 | #: ../../source/reference/error_handling.rst:15::1
49 | msgid ":obj:`nlcpy.errstate `"
50 | msgstr ""
51 |
52 | #: ../../source/reference/error_handling.rst:15::1
53 | msgid "Context manager for floating-point error handling."
54 | msgstr ""
55 |
56 |
--------------------------------------------------------------------------------
/doc/source/locale/ja/LC_MESSAGES/reference/index.po:
--------------------------------------------------------------------------------
1 | # SOME DESCRIPTIVE TITLE.
2 | # Copyright (C) 2020, NEC Corporation
3 | # This file is distributed under the same license as the nlcpy package.
4 | # FIRST AUTHOR , 2020.
5 | #
6 | #, fuzzy
7 | msgid ""
8 | msgstr ""
9 | "Project-Id-Version: nlcpy 1.0.0b1\n"
10 | "Report-Msgid-Bugs-To: \n"
11 | "POT-Creation-Date: 2020-11-18 17:24+0900\n"
12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13 | "Last-Translator: FULL NAME \n"
14 | "Language-Team: LANGUAGE \n"
15 | "MIME-Version: 1.0\n"
16 | "Content-Type: text/plain; charset=utf-8\n"
17 | "Content-Transfer-Encoding: 8bit\n"
18 | "Generated-By: Babel 2.7.0\n"
19 |
20 | #: ../../source/reference/index.rst:5
21 | msgid "Reference Manual"
22 | msgstr "リファレンス(英語)"
23 |
24 | #: ../../source/reference/index.rst:7
25 | msgid "Here is a list of functionalites provided by NLCPy."
26 | msgstr ""
27 |
28 | #: ../../source/reference/index.rst:9
29 | msgid ":ref:`genindex`"
30 | msgstr ""
31 |
32 | #: ../../source/reference/index.rst:10
33 | msgid ":ref:`modindex`"
34 | msgstr ""
35 |
36 |
--------------------------------------------------------------------------------
/doc/source/locale/ja/LC_MESSAGES/reference/logging.po:
--------------------------------------------------------------------------------
1 | # SOME DESCRIPTIVE TITLE.
2 | # Copyright (C) 2020, NEC Corporation
3 | # This file is distributed under the same license as the nlcpy package.
4 | # FIRST AUTHOR , 2022.
5 | #
6 | #, fuzzy
7 | msgid ""
8 | msgstr ""
9 | "Project-Id-Version: nlcpy 2.2.0\n"
10 | "Report-Msgid-Bugs-To: \n"
11 | "POT-Creation-Date: 2023-03-02 17:07+0900\n"
12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13 | "Last-Translator: FULL NAME \n"
14 | "Language-Team: LANGUAGE \n"
15 | "MIME-Version: 1.0\n"
16 | "Content-Type: text/plain; charset=utf-8\n"
17 | "Content-Transfer-Encoding: 8bit\n"
18 | "Generated-By: Babel 2.9.1\n"
19 |
20 | #: ../../source/reference/logging.rst:2
21 | msgid "Logging (for developer)"
22 | msgstr ""
23 |
24 | #: ../../source/reference/logging.rst:4
25 | msgid "The following tables show logging routines provided by NLCPy."
26 | msgstr ""
27 |
28 | #: ../../source/reference/logging.rst:7
29 | msgid "Logging management"
30 | msgstr ""
31 |
32 | #: ../../source/reference/logging.rst:17::1
33 | msgid ":obj:`nlcpy.logging.set_stream_handler `"
34 | msgstr ""
35 |
36 | #: ../../source/reference/logging.rst:17::1
37 | msgid "Sets StreamHandler to the specified logger."
38 | msgstr ""
39 |
40 | #: ../../source/reference/logging.rst:17::1
41 | msgid ":obj:`nlcpy.logging.set_file_handler `"
42 | msgstr ""
43 |
44 | #: ../../source/reference/logging.rst:17::1
45 | msgid "Sets FileHandler to the specified logger."
46 | msgstr ""
47 |
48 | #: ../../source/reference/logging.rst:17::1
49 | msgid ":obj:`nlcpy.logging.reset_handler `"
50 | msgstr ""
51 |
52 | #: ../../source/reference/logging.rst:17::1
53 | msgid "Resets the logger."
54 | msgstr ""
55 |
56 | #: ../../source/reference/logging.rst:18
57 | msgid "The following logger names are available in NLCPy."
58 | msgstr ""
59 |
60 | #: ../../source/reference/logging.rst:21
61 | msgid "Logger Constants"
62 | msgstr ""
63 |
64 | #: ../../source/reference/logging.rst:31
65 | msgid "Example Usage"
66 | msgstr ""
67 |
68 | #~ msgid "Example:"
69 | #~ msgstr ""
70 |
71 |
--------------------------------------------------------------------------------
/doc/source/locale/ja/LC_MESSAGES/reference/miscellaneous.po:
--------------------------------------------------------------------------------
1 | # SOME DESCRIPTIVE TITLE.
2 | # Copyright (C) 2020, NEC Corporation
3 | # This file is distributed under the same license as the nlcpy package.
4 | # FIRST AUTHOR , 2021.
5 | #
6 | #, fuzzy
7 | msgid ""
8 | msgstr ""
9 | "Project-Id-Version: nlcpy 1.0.0\n"
10 | "Report-Msgid-Bugs-To: \n"
11 | "POT-Creation-Date: 2023-03-02 17:07+0900\n"
12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13 | "Last-Translator: FULL NAME \n"
14 | "Language-Team: LANGUAGE \n"
15 | "MIME-Version: 1.0\n"
16 | "Content-Type: text/plain; charset=utf-8\n"
17 | "Content-Transfer-Encoding: 8bit\n"
18 | "Generated-By: Babel 2.9.1\n"
19 |
20 | #: ../../source/reference/miscellaneous.rst:2
21 | msgid "Miscellaneous Routines"
22 | msgstr ""
23 |
24 | #: ../../source/reference/miscellaneous.rst:4
25 | msgid "The following table shows miscellaneous routine provided by NLCPy."
26 | msgstr ""
27 |
28 | #: ../../source/reference/miscellaneous.rst:7
29 | msgid "Memory Ranges"
30 | msgstr ""
31 |
32 | #: ../../source/reference/miscellaneous.rst:15::1
33 | msgid ":obj:`nlcpy.may_share_memory `"
34 | msgstr ""
35 |
36 | #: ../../source/reference/miscellaneous.rst:15::1
37 | msgid "Determine if two arrays might share memory."
38 | msgstr ""
39 |
40 | #: ../../source/reference/miscellaneous.rst:17
41 | msgid "Utility"
42 | msgstr ""
43 |
44 | #: ../../source/reference/miscellaneous.rst:24::1
45 | msgid ":obj:`nlcpy.get_include `"
46 | msgstr ""
47 |
48 | #: ../../source/reference/miscellaneous.rst:24::1
49 | msgid "Returns the directory path that contains the NLCPy \\*.h header files."
50 | msgstr ""
51 |
52 | #: ../../source/reference/miscellaneous.rst:24::1
53 | msgid ":obj:`nlcpy.show_config `"
54 | msgstr ""
55 |
56 | #: ../../source/reference/miscellaneous.rst:24::1
57 | msgid "Shows various information in the system on which NLCPy is running."
58 | msgstr ""
59 |
60 | #~ msgid "Shows library versions in the system on which NLCPy is running."
61 | #~ msgstr ""
62 |
63 |
--------------------------------------------------------------------------------
/doc/source/locale/ja/LC_MESSAGES/reference/sca_chapter_5.po:
--------------------------------------------------------------------------------
1 | # SOME DESCRIPTIVE TITLE.
2 | # Copyright (C) 2020, NEC Corporation
3 | # This file is distributed under the same license as the nlcpy package.
4 | # FIRST AUTHOR , 2021.
5 | #
6 | #, fuzzy
7 | msgid ""
8 | msgstr ""
9 | "Project-Id-Version: nlcpy 1.1.0\n"
10 | "Report-Msgid-Bugs-To: \n"
11 | "POT-Creation-Date: 2021-07-14 14:58+0900\n"
12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13 | "Last-Translator: FULL NAME \n"
14 | "Language-Team: LANGUAGE \n"
15 | "MIME-Version: 1.0\n"
16 | "Content-Type: text/plain; charset=utf-8\n"
17 | "Content-Transfer-Encoding: 8bit\n"
18 | "Generated-By: Babel 2.9.1\n"
19 |
20 | #: ../../source/reference/sca_chapter_5.rst:2
21 | msgid "Examples Using SCA Interface"
22 | msgstr ""
23 |
24 | #: ../../source/reference/sca_chapter_5.rst:4
25 | msgid "Examples that use SCA can be found in the list below."
26 | msgstr ""
27 |
28 | #: ../../source/reference/sca_chapter_5.rst:6
29 | msgid ":ref:`example_thermal_sca`"
30 | msgstr ""
31 |
32 | #: ../../source/reference/sca_chapter_5.rst:7
33 | msgid ":ref:`example_wave`"
34 | msgstr ""
35 |
36 | #: ../../source/reference/sca_chapter_5.rst:8
37 | msgid ":ref:`example_cfd`"
38 | msgstr ""
39 |
40 |
--------------------------------------------------------------------------------
/doc/source/locale/ja/LC_MESSAGES/release_notes/index.po:
--------------------------------------------------------------------------------
1 | # SOME DESCRIPTIVE TITLE.
2 | # Copyright (C) 2020, NEC Corporation
3 | # This file is distributed under the same license as the nlcpy package.
4 | # FIRST AUTHOR , 2021.
5 | #
6 | msgid ""
7 | msgstr ""
8 | "Project-Id-Version: nlcpy 1.0.0\n"
9 | "Report-Msgid-Bugs-To: \n"
10 | "POT-Creation-Date: 2021-01-14 10:35+0900\n"
11 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 | "Last-Translator: FULL NAME \n"
13 | "Language-Team: LANGUAGE \n"
14 | "MIME-Version: 1.0\n"
15 | "Content-Type: text/plain; charset=utf-8\n"
16 | "Content-Transfer-Encoding: 8bit\n"
17 | "Generated-By: Babel 2.9.0\n"
18 |
19 | #: ../../source/release_notes/index.rst:5
20 | msgid "Release Notes"
21 | msgstr "リリースノート"
22 |
23 | #: ../../source/release_notes/index.rst:7
24 | msgid "This is the list of the revision history of NLCPy between each releases."
25 | msgstr "これは、各リリース間のNLCPyの改訂履歴のリストです。"
26 |
27 |
--------------------------------------------------------------------------------
/doc/source/locale/ja/LC_MESSAGES/release_notes/v1.0.1.po:
--------------------------------------------------------------------------------
1 | # SOME DESCRIPTIVE TITLE.
2 | # Copyright (C) 2020, NEC Corporation
3 | # This file is distributed under the same license as the nlcpy package.
4 | # FIRST AUTHOR , 2021.
5 | #
6 | msgid ""
7 | msgstr ""
8 | "Project-Id-Version: nlcpy 1.0.1\n"
9 | "Report-Msgid-Bugs-To: \n"
10 | "POT-Creation-Date: 2022-02-15 16:48+0900\n"
11 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 | "Last-Translator: FULL NAME \n"
13 | "Language-Team: LANGUAGE \n"
14 | "MIME-Version: 1.0\n"
15 | "Content-Type: text/plain; charset=utf-8\n"
16 | "Content-Transfer-Encoding: 8bit\n"
17 | "Generated-By: Babel 2.9.1\n"
18 |
19 | #: ../../source/release_notes/v1.0.1.rst:3
20 | msgid "What's new in Version 1.0.1 (May, 2021)"
21 | msgstr "バージョン1.0.1の更新事項(2021年5月)"
22 |
23 | #: ../../source/release_notes/v1.0.1.rst:8
24 | msgid "Problem Fixes"
25 | msgstr "不具合修正"
26 |
27 | #: ../../source/release_notes/v1.0.1.rst:10
28 | msgid ""
29 | "Fixed abnormal termination that could occur when a Python script using "
30 | "NLCPy is executed by a batch scheduler."
31 | msgstr "バッチ環境で実行に失敗する不具合を修正"
32 |
33 | #: ../../source/release_notes/v1.0.1.rst:11
34 | msgid ""
35 | "Fixed a problem that stalls when a multi-dimensional :class:`ndarray` is "
36 | "specified as a parameter to :func:`sort` ."
37 | msgstr ":func:`sort` に多次元の :class:`ndarray` が指定された時にストールする不具合を修正"
38 |
39 | #: ../../source/release_notes/v1.0.1.rst:15
40 | msgid "Function Enhancements"
41 | msgstr "機能強化"
42 |
43 | #: ../../source/release_notes/v1.0.1.rst:17
44 | msgid "Improved a part of the memory allocation logic during the lazy evaluation."
45 | msgstr "遅延評価時のメモリ確保のロジックの一部を改善"
46 |
47 |
--------------------------------------------------------------------------------
/doc/source/locale/ja/LC_MESSAGES/release_notes/v2.1.1.po:
--------------------------------------------------------------------------------
1 | # SOME DESCRIPTIVE TITLE.
2 | # Copyright (C) 2020, NEC Corporation
3 | # This file is distributed under the same license as the nlcpy package.
4 | # FIRST AUTHOR , 2022.
5 | #
6 | msgid ""
7 | msgstr ""
8 | "Project-Id-Version: nlcpy 2.1.1\n"
9 | "Report-Msgid-Bugs-To: \n"
10 | "POT-Creation-Date: 2022-11-15 11:02+0900\n"
11 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 | "Last-Translator: FULL NAME \n"
13 | "Language-Team: LANGUAGE \n"
14 | "MIME-Version: 1.0\n"
15 | "Content-Type: text/plain; charset=utf-8\n"
16 | "Content-Transfer-Encoding: 8bit\n"
17 | "Generated-By: Babel 2.9.1\n"
18 |
19 | #: ../../source/release_notes/v2.1.1.rst:3
20 | msgid "What's new in Version 2.1.1 (March, 2022)"
21 | msgstr "バージョン2.1.1の更新事項(2022年3月)"
22 |
23 | #: ../../source/release_notes/v2.1.1.rst:7
24 | msgid "New Features"
25 | msgstr "新機能"
26 |
27 | #: ../../source/release_notes/v2.1.1.rst:9
28 | msgid ""
29 | "Newly added environment variable ``VE_NLCPY_WARMUP`` which "
30 | "enables/disables Python scripts to perform some warming up when importing"
31 | " `NLCPy`."
32 | msgstr ""
33 | "環境変数 ``VE_NLCPY_WARMUP`` を新規に追加しました。これにより、 `NLCPy` "
34 | "のインポート時にPythonスクリプトがウォームアップを実行するかどうかを設定できるようになりました。
35 |
36 | #: ../../source/release_notes/v2.1.1.rst:11
37 | msgid "Minor updates for `mpi4py-ve` support."
38 | msgstr "`mpi4py-ve` サポートのための軽微な修正を実施しました。"
39 |
40 | #: ../../source/release_notes/v2.1.1.rst:14
41 | msgid "Performance Enhancements"
42 | msgstr "性能改善"
43 |
44 | #: ../../source/release_notes/v2.1.1.rst:16
45 | msgid ""
46 | "Improved the performance of :meth:`nlcpy.linalg.norm` if the Frobenius "
47 | "norm is specified."
48 | msgstr "フロベニウスノルムが指定されたときの :meth:`nlcpy.linalg.norm` の性能を改善しました。"
49 |
50 | #: ../../source/release_notes/v2.1.1.rst:18
51 | msgid ""
52 | "Improved the performance of some functions if the memory layout is "
53 | "C-contiguous or F-contiguous."
54 | msgstr "メモリの配置がC連続もしくはF連続のときの一部関数の性能を改善しました。"
55 |
56 |
--------------------------------------------------------------------------------
/doc/source/locale/ja/LC_MESSAGES/release_notes/v3.0.1.po:
--------------------------------------------------------------------------------
1 | # SOME DESCRIPTIVE TITLE.
2 | # Copyright (C) 2020, NEC Corporation
3 | # This file is distributed under the same license as the nlcpy package.
4 | # FIRST AUTHOR , 2023.
5 | #
6 | msgid ""
7 | msgstr ""
8 | "Project-Id-Version: nlcpy 3.0.1\n"
9 | "Report-Msgid-Bugs-To: \n"
10 | "POT-Creation-Date: 2023-08-22 19:22+0900\n"
11 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 | "Last-Translator: FULL NAME \n"
13 | "Language-Team: LANGUAGE \n"
14 | "MIME-Version: 1.0\n"
15 | "Content-Type: text/plain; charset=utf-8\n"
16 | "Content-Transfer-Encoding: 8bit\n"
17 | "Generated-By: Babel 2.9.1\n"
18 |
19 | #: ../../source/release_notes/v3.0.1.rst:3
20 | msgid "What's new in Version 3.0.1 (September, 2023)"
21 | msgstr "バージョン3.0.1の更新事項(2023年9月)"
22 |
23 | #: ../../source/release_notes/v3.0.1.rst:7
24 | msgid "Problem Fixes"
25 | msgstr "不具合修正"
26 |
27 | #: ../../source/release_notes/v3.0.1.rst:9
28 | msgid ""
29 | "Fixed incorrect execution results of :func:`nlcpy.fft.fftshift` and "
30 | ":func:`nlcpy.fft.ifftshift` that are returned when the number of array "
31 | "dimensions is larger than 1 and the input parameter of `axis` is not "
32 | "equal to 0."
33 | msgstr ""
34 | ":func:`nlcpy.fft.fftshift` および :func:`nlcpy.fft.ifftshift` "
35 | "において、配列の次元数が1より大きく、入力パラメータの `axis` が0でない場合に実行結果が不正になる問題を修正"
36 |
37 | #: ../../source/release_notes/v3.0.1.rst:11
38 | msgid ""
39 | "Fixed incorrect execution results of :func:`nlcpy.linalg.norm` that are "
40 | "returned when the number of VE threads is larger than 1 and the memory "
41 | "layout of input array is not contiguous."
42 | msgstr ""
43 | ":func:`nlcpy.linalg.norm` "
44 | "において、VEスレッド数が1より大きく、入力配列のメモリレイアウトが連続でない場合に実行結果が不正になる問題を修正"
45 |
46 | #: ../../source/release_notes/v3.0.1.rst:13
47 | msgid "Fixed a problem where :func:`nlcpy.diff` raises unexpected RuntimeWarning."
48 | msgstr ":func:`nlcpy.diff` において、予期しないRuntimeWarningが発生する問題を修正"
49 |
50 |
--------------------------------------------------------------------------------
/doc/source/locale/ja/LC_MESSAGES/sphinx.po:
--------------------------------------------------------------------------------
1 | # SOME DESCRIPTIVE TITLE.
2 | # Copyright (C) 2020, NEC Corporation
3 | # This file is distributed under the same license as the nlcpy package.
4 | # FIRST AUTHOR , 2020.
5 | #
6 | msgid ""
7 | msgstr ""
8 | "Project-Id-Version: nlcpy 1.0.0b1\n"
9 | "Report-Msgid-Bugs-To: \n"
10 | "POT-Creation-Date: 2021-01-21 15:32+0900\n"
11 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 | "Last-Translator: FULL NAME \n"
13 | "Language-Team: LANGUAGE \n"
14 | "MIME-Version: 1.0\n"
15 | "Content-Type: text/plain; charset=utf-8\n"
16 | "Content-Transfer-Encoding: 8bit\n"
17 | "Generated-By: Babel 2.9.0\n"
18 |
19 | #: ../../source/_templates/breadcrumbs.html:56
20 | #: ../../source/_templates/breadcrumbs.html:58
21 | msgid "Edit on GitHub"
22 | msgstr ""
23 |
24 | #: ../../source/_templates/breadcrumbs.html:63
25 | #: ../../source/_templates/breadcrumbs.html:65
26 | msgid "Edit on Bitbucket"
27 | msgstr ""
28 |
29 | #: ../../source/_templates/breadcrumbs.html:70
30 | #: ../../source/_templates/breadcrumbs.html:72
31 | msgid "Edit on GitLab"
32 | msgstr ""
33 |
34 | #: ../../source/_templates/breadcrumbs.html:75
35 | #: ../../source/_templates/breadcrumbs.html:77
36 | msgid "View page source"
37 | msgstr ""
38 |
39 | #: ../../source/_templates/breadcrumbs.html:87
40 | msgid "Next"
41 | msgstr ""
42 |
43 | #: ../../source/_templates/breadcrumbs.html:90
44 | msgid "Previous"
45 | msgstr ""
46 |
47 | #~ msgid "Copyright"
48 | #~ msgstr ""
49 |
50 | #~ msgid "Build"
51 | #~ msgstr ""
52 |
53 | #~ msgid "Revision"
54 | #~ msgstr ""
55 |
56 | #~ msgid "Last updated on %(last_updated)s."
57 | #~ msgstr ""
58 |
59 | #~ msgid "Built with %(sphinx_web)s using a"
60 | #~ msgstr ""
61 |
62 | #~ msgid "theme"
63 | #~ msgstr ""
64 |
65 | #~ msgid "provided by %(readthedocs_web)s"
66 | #~ msgstr ""
67 |
68 | #~ msgid "Search within %(docstitle)s"
69 | #~ msgstr ""
70 |
71 | #~ msgid "About these documents"
72 | #~ msgstr ""
73 |
74 | #~ msgid "Index"
75 | #~ msgstr ""
76 |
77 | #~ msgid "Search"
78 | #~ msgstr ""
79 |
80 | #~ msgid "Logo"
81 | #~ msgstr ""
82 |
83 |
--------------------------------------------------------------------------------
/doc/source/locale/ja/LC_MESSAGES/usage/index.po:
--------------------------------------------------------------------------------
1 | # SOME DESCRIPTIVE TITLE.
2 | # Copyright (C) 2020, NEC Corporation
3 | # This file is distributed under the same license as the nlcpy package.
4 | # FIRST AUTHOR , 2020.
5 | #
6 | msgid ""
7 | msgstr ""
8 | "Project-Id-Version: nlcpy 1.0.0b1\n"
9 | "Report-Msgid-Bugs-To: \n"
10 | "POT-Creation-Date: 2020-11-18 17:24+0900\n"
11 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 | "Last-Translator: FULL NAME \n"
13 | "Language-Team: LANGUAGE \n"
14 | "MIME-Version: 1.0\n"
15 | "Content-Type: text/plain; charset=utf-8\n"
16 | "Content-Transfer-Encoding: 8bit\n"
17 | "Generated-By: Babel 2.7.0\n"
18 |
19 | #: ../../source/usage/index.rst:4
20 | msgid "Usage"
21 | msgstr "使用法"
22 |
23 | #: ../../source/usage/index.rst:7
24 | msgid "This page describes the usage of NLCPy from your Python scripts:"
25 | msgstr "このページでは、PythonスクリプトからのNLCPyの使用法について説明します。"
26 |
27 |
--------------------------------------------------------------------------------
/doc/source/locale/ja/LC_MESSAGES/userguide.po:
--------------------------------------------------------------------------------
1 | # SOME DESCRIPTIVE TITLE.
2 | # Copyright (C) 2020, NEC Corporation
3 | # This file is distributed under the same license as the nlcpy package.
4 | # FIRST AUTHOR , 2020.
5 | #
6 | msgid ""
7 | msgstr ""
8 | "Project-Id-Version: nlcpy 1.0.0b1\n"
9 | "Report-Msgid-Bugs-To: \n"
10 | "POT-Creation-Date: 2021-06-17 11:34+0900\n"
11 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 | "Last-Translator: FULL NAME \n"
13 | "Language-Team: LANGUAGE \n"
14 | "MIME-Version: 1.0\n"
15 | "Content-Type: text/plain; charset=utf-8\n"
16 | "Content-Transfer-Encoding: 8bit\n"
17 | "Generated-By: Babel 2.9.1\n"
18 |
19 | #: ../../source/userguide.rst:4
20 | msgid "User's Guide"
21 | msgstr "ユーザーズガイド"
22 |
23 | #: ../../source/userguide.rst:8
24 | msgid ""
25 | "NLCPy is a library for accelerating performance of Python scripts using "
26 | "NumPy on SX-Aurora TSUBASA. Python programmers can use this library on "
27 | "Linux/x86 of SX-Aurora TSUBASA. NLCPy's API is designed based on NumPy's "
28 | "one. The current version provides a subset of NumPy's API."
29 | msgstr ""
30 | "NLCPyは、NumPyを使用したPythonスクリプトのパフォーマンスをSX-Aurora "
31 | "TSUBASA上で高速化するためのライブラリです。Pythonプログラマは、このライブラリをSX-Aurora "
32 | "TSUBASAのLinux/x86で使用できます。NLCPyのAPIは、NumPyに基づいて設計されています。現在のバージョンは、NumPyのAPIのサブセットを提供します。"
33 |
34 | #: ../../source/userguide.rst:14
35 | msgid ""
36 | "NLCPy enables Python scripts to compute on a Vector Engine (VE) of SX-"
37 | "Aurora TSUBASA by VE offloading. To gain the performance on VE, NLCPy "
38 | "uses the functions of NEC Numeric Library Collection (NLC), which are "
39 | "highly optimized for VE."
40 | msgstr ""
41 | "NLCPyはVEオフロードにより、Pythonスクリプトの計算をSX-Aurora "
42 | "TSUBASAのベクトルエンジン(VE)上で実行することを可能にします。VEでのパフォーマンスを向上させるために、NLCPyは、高度に最適化されたNEC"
43 | " Numeric Library Collection(NLC)の機能を使用します。"
44 |
45 |
--------------------------------------------------------------------------------
/doc/source/reference/creation.rst:
--------------------------------------------------------------------------------
1 | Array Creation Routines
2 | =======================
3 |
4 | The following tables show array creation routines provided by NLCPy.
5 |
6 | Ones and Zeros
7 | --------------
8 |
9 | .. autosummary::
10 | :toctree: generated/
11 | :nosignatures:
12 |
13 | nlcpy.empty
14 | nlcpy.empty_like
15 | nlcpy.eye
16 | nlcpy.identity
17 | nlcpy.ones
18 | nlcpy.ones_like
19 | nlcpy.zeros
20 | nlcpy.zeros_like
21 | nlcpy.full
22 | nlcpy.full_like
23 |
24 |
25 | From Existing Data
26 | ------------------
27 |
28 | .. autosummary::
29 | :toctree: generated/
30 | :nosignatures:
31 |
32 | nlcpy.array
33 | nlcpy.asarray
34 | nlcpy.asanyarray
35 | nlcpy.copy
36 | nlcpy.fromfile
37 | nlcpy.loadtxt
38 |
39 |
40 | Numerical Ranges
41 | ----------------
42 |
43 | .. autosummary::
44 | :toctree: generated/
45 | :nosignatures:
46 |
47 | nlcpy.arange
48 | nlcpy.linspace
49 | nlcpy.logspace
50 | nlcpy.meshgrid
51 |
52 |
53 | Building Matrices
54 | -----------------
55 |
56 | .. autosummary::
57 | :toctree: generated/
58 | :nosignatures:
59 |
60 | nlcpy.diag
61 | nlcpy.diagflat
62 | nlcpy.tri
63 | nlcpy.tril
64 | nlcpy.triu
65 |
--------------------------------------------------------------------------------
/doc/source/reference/envs.rst:
--------------------------------------------------------------------------------
1 | .. _label_envs:
2 |
3 | Environment Vaiables
4 | ====================
5 |
6 | .. envvar:: VE_NLCPY_NODELIST
7 |
8 | Sets the execution VE node ids.
9 |
10 | Example when using VE 0,1,2:
11 |
12 | ::
13 |
14 | $ export VE_NLCPY_NODELIST=0,1,2
15 |
16 |
17 | .. envvar:: VE_NLCPY_MEMPOOL_SIZE
18 |
19 | Default: ``1G``
20 |
21 | Sets the upper limit of memory amount that can be allocated from memory pool.
22 | You can specify the suffixes B, b, K, k, M, m, G, or g.
23 |
24 | ================= =================
25 | ================= =================
26 | ``B`` or ``b`` Bytes
27 | ``K`` or ``k`` Kilobytes
28 | ``M`` or ``m`` Megabytes
29 | ``G`` or ``g`` Gigabytes
30 | ================= =================
31 |
32 | If you don't specify any suffixes, the value is represented in Kilobytes.
33 |
34 | Example that sets pool size 10 gigabytes:
35 |
36 | ::
37 |
38 | $ export VE_NLCPY_MEMPOOL_SIZE=10G
39 |
40 | .. envvar:: VE_NLCPY_FAST_MATH
41 |
42 | Default: ``NO``
43 |
44 | If set to ``YES`` or ``yes``, NLCPy uses shared object ``libnlcpy_ve_kernel_fast_math.so`` for VE.
45 | For details, please see :ref:`Optimization for Mathematical Functions `
46 |
47 | .. envvar:: VE_NLCPY_ENABLE_NUMPY_WRAP
48 |
49 | Default: ``YES``
50 |
51 | If set to ``NO`` or ``no``, NLCPy raises `Exception` when replacing NLCPy function and method to
52 | NumPy's one.
53 |
54 | .. envvar:: VE_OMP_NUM_THREADS
55 |
56 | Default: The number of VE cores.
57 |
58 | The number of OpenMP parallel threads.
59 |
60 | ::
61 |
62 | $ export VE_OMP_NUM_THREADS=4
63 |
64 | .. envvar:: VE_NODE_NUMBER
65 |
66 | Default: ``0``
67 |
68 | The node number of VE to be executed.
69 | Note that if both ``VE_NLCPY_NODELIST`` and ``VE_NODE_NUMBER`` are set, ``VE_NLCPY_NODELIST`` takes precedence.
70 |
71 | ::
72 |
73 | $ export VE_NODE_NUMBER=1
74 |
--------------------------------------------------------------------------------
/doc/source/reference/error_handling.rst:
--------------------------------------------------------------------------------
1 | Floating Point Error Handling
2 | =============================
3 |
4 | The following table shows error handling functions provided by NLCPy.
5 |
6 | Setting and Getting Error Handring
7 | ----------------------------------
8 |
9 | .. autosummary::
10 | :toctree: generated/
11 | :nosignatures:
12 |
13 | nlcpy.seterr
14 | nlcpy.geterr
15 | nlcpy.errstate
16 |
--------------------------------------------------------------------------------
/doc/source/reference/fft.rst:
--------------------------------------------------------------------------------
1 | .. _nlcpy_fft:
2 | .. module:: nlcpy.fft
3 |
4 | Discrete Fourier Transform
5 | ==========================
6 |
7 | .. contents:: :local:
8 |
9 | The following tables show discrete fourier transform provided by NLCPy.
10 |
11 | Standard FFTs
12 | -------------
13 |
14 | .. autosummary::
15 | :toctree: generated/
16 | :nosignatures:
17 |
18 | nlcpy.fft.fft
19 | nlcpy.fft.ifft
20 | nlcpy.fft.fft2
21 | nlcpy.fft.ifft2
22 | nlcpy.fft.fftn
23 | nlcpy.fft.ifftn
24 |
25 |
26 | Real FFTs
27 | ---------
28 |
29 | .. autosummary::
30 | :toctree: generated/
31 | :nosignatures:
32 |
33 | nlcpy.fft.rfft
34 | nlcpy.fft.irfft
35 | nlcpy.fft.rfft2
36 | nlcpy.fft.irfft2
37 | nlcpy.fft.rfftn
38 | nlcpy.fft.irfftn
39 |
40 |
41 | Hermitian FFTs
42 | --------------
43 |
44 | .. autosummary::
45 | :toctree: generated/
46 | :nosignatures:
47 |
48 | nlcpy.fft.hfft
49 | nlcpy.fft.ihfft
50 |
51 |
52 | Helper routines
53 | ---------------
54 |
55 | .. autosummary::
56 | :toctree: generated/
57 | :nosignatures:
58 |
59 | nlcpy.fft.fftfreq
60 | nlcpy.fft.rfftfreq
61 | nlcpy.fft.fftshift
62 | nlcpy.fft.ifftshift
63 |
--------------------------------------------------------------------------------
/doc/source/reference/index.rst:
--------------------------------------------------------------------------------
1 | .. _nlcpy_reference:
2 |
3 | ****************
4 | Reference Manual
5 | ****************
6 |
7 | Here is a list of functionalites provided by NLCPy.
8 |
9 | * :ref:`genindex`
10 | * :ref:`modindex`
11 |
12 | ----
13 |
14 | .. currentmodule:: nlcpy
15 |
16 | .. toctree::
17 | :maxdepth: 2
18 |
19 | ndarray
20 | constants
21 | envs
22 | creation
23 | manipulation
24 | ufunc
25 | mathematical
26 | fft
27 | indexing
28 | io
29 | jit/index
30 | random
31 | sca
32 | sorting
33 | statistics
34 | linalg
35 | logic
36 | request
37 | ma
38 | error_handling
39 | miscellaneous
40 | profiling
41 | venode
42 | logging
43 |
--------------------------------------------------------------------------------
/doc/source/reference/indexing.rst:
--------------------------------------------------------------------------------
1 | Indexing Routines
2 | =================
3 |
4 | The following tables show indexing routines provided by NLCPy.
5 |
6 | Generating Index Arrays
7 | -----------------------
8 |
9 | .. autosummary::
10 | :toctree: generated/
11 | :nosignatures:
12 |
13 | nlcpy.diag_indices
14 | nlcpy.nonzero
15 | nlcpy.where
16 |
17 | Indexing-like Operations
18 | ------------------------
19 |
20 | .. autosummary::
21 | :toctree: generated/
22 | :nosignatures:
23 |
24 | nlcpy.diag
25 | nlcpy.diagonal
26 | nlcpy.select
27 | nlcpy.take
28 |
29 | Inserting data into arrays
30 | --------------------------
31 |
32 | .. autosummary::
33 | :toctree: generated/
34 | :nosignatures:
35 |
36 | nlcpy.fill_diagonal
37 |
--------------------------------------------------------------------------------
/doc/source/reference/io.rst:
--------------------------------------------------------------------------------
1 | Input and Output
2 | ================
3 |
4 | The following tables show I/O routines provided by NLCPy.
5 |
6 | NumPy binary files(NPY, NPZ)
7 | ----------------------------
8 |
9 | .. autosummary::
10 | :toctree: generated/
11 | :nosignatures:
12 |
13 | nlcpy.load
14 | nlcpy.save
15 | nlcpy.savez
16 | nlcpy.savez_compressed
17 |
18 |
19 | Text files
20 | ----------
21 |
22 | .. autosummary::
23 | :toctree: generated/
24 | :nosignatures:
25 |
26 | nlcpy.loadtxt
27 | nlcpy.savetxt
28 |
29 |
30 | Raw binary files
31 | ----------------
32 |
33 | .. autosummary::
34 | :toctree: generated/
35 | :nosignatures:
36 |
37 | nlcpy.fromfile
38 |
--------------------------------------------------------------------------------
/doc/source/reference/jit/notices.rst:
--------------------------------------------------------------------------------
1 | .. module:: nlcpy.jit
2 | :noindex:
3 |
4 | =================================
5 | Notices Regarding JIT Compilation
6 | =================================
7 |
8 | * To pass a complex data into VE arguments, it is necessary to transfer data as
9 | :class:`nlcpy.ndarray` or ``nlcpy.veo.OnStack``.
10 | Please refer to the :ref:`Advanced Topics `.
11 |
12 | * You can invoke the VE function without recompiling by calling
13 | :meth:`CustomVEKernel.__call__` repeatedly.
14 |
15 | * Only the OpenMP & 64bit integer version of the NLC can be used.
16 |
17 | * When you use ASL Unified Interface, you should not call following functions
18 | because there will be internally called at the beginning/end of the NLCPy process.
19 |
20 | - ``asl_library_initialize()``
21 | - ``asl_library_finalize()``
22 |
23 | * Please avoid unloading the shared library linked with FTRACE.
24 | Otherwise, SIGSEGV may occur.
25 |
26 | * When you use NLCPy with Jupyter Notebook or Jupyter Lab,
27 | the browser cannot display stdout/stderr output from the VE side.
28 |
--------------------------------------------------------------------------------
/doc/source/reference/logging.rst:
--------------------------------------------------------------------------------
1 | Logging (for developer)
2 | =======================
3 |
4 | The following tables show logging routines provided by NLCPy.
5 |
6 | Logging management
7 | ------------------
8 |
9 | .. autosummary::
10 | :toctree: generated/
11 | :nosignatures:
12 |
13 | nlcpy.logging.set_stream_handler
14 | nlcpy.logging.set_file_handler
15 | nlcpy.logging.reset_handler
16 |
17 |
18 | The following logger names are available in NLCPy.
19 |
20 | Logger Constants
21 | ----------------
22 |
23 | .. data:: nlcpy.logging.VEO
24 | .. data:: nlcpy.logging.MEMPOOL
25 | .. data:: nlcpy.logging.REQUEST
26 | .. data:: nlcpy.logging.NPWRAP
27 | .. data:: nlcpy.logging.FFT
28 |
29 |
30 | Example Usage
31 | -------------
32 |
33 | ::
34 |
35 | >>> import nlcpy
36 | >>> _ = nlcpy.logging.set_stream_handler(nlcpy.logging.VEO)
37 | >>> _ = nlcpy.logging.set_stream_handler(nlcpy.logging.REQUEST)
38 | >>> _ = nlcpy.logging.set_stream_handler(nlcpy.logging.MEMPOOL)
39 | >>> nlcpy.arange(10)
40 | INFO:nlcpy.mempool:nlcpy_mempool_reserve used: nodeid=0, addr=8000610054000010, size=80
41 | INFO:nlcpy.request:push VE request `nlcpy_arange` (nodeid=0)
42 | INFO:nlcpy.request:veo_async_write_mem to send VE arguments (nodeid=0)
43 | INFO:nlcpy.veo:veo_async_write_mem: nodeid=0, size=3568, reqid=155
44 | INFO:nlcpy.request:veo_call_async to flush stacked requests (nodeid=0): requests
45 | INFO:nlcpy.veo:veo_call_async: name=b'kernel_launcher', reqid=156
46 | INFO:nlcpy.veo:veo_call_wait_result: nodeid=0, reqid=155
47 | INFO:nlcpy.veo:veo_call_wait_result: nodeid=0, reqid=156
48 | INFO:nlcpy.veo:veo_read_mem: nodeid=0, size=80
49 | array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
50 | >>> _ = nlcpy.logging.reset_handler(nlcpy.logging.VEO)
51 | >>> _ = nlcpy.logging.reset_handler(nlcpy.logging.REQUEST)
52 | >>> _ = nlcpy.logging.reset_handler(nlcpy.logging.MEMPOOL)
53 | >>> nlcpy.arange(10)
54 | array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
55 |
56 |
57 |
--------------------------------------------------------------------------------
/doc/source/reference/logic.rst:
--------------------------------------------------------------------------------
1 | Logic Functions
2 | ===============
3 |
4 | The following tables show logical functions provided by NLCPy.
5 |
6 | Truth Value Testing
7 | -------------------
8 |
9 | .. autosummary::
10 | :toctree: generated/
11 | :nosignatures:
12 |
13 | nlcpy.all
14 | nlcpy.any
15 |
16 | Array Contents
17 | --------------
18 |
19 | .. autosummary::
20 | :toctree: generated/
21 | :nosignatures:
22 |
23 | nlcpy.isfinite
24 | nlcpy.isinf
25 | nlcpy.isnan
26 |
27 | Logical Operations
28 | ------------------
29 |
30 | .. autosummary::
31 | :toctree: generated/
32 | :nosignatures:
33 |
34 | nlcpy.logical_and
35 | nlcpy.logical_or
36 | nlcpy.logical_not
37 | nlcpy.logical_xor
38 |
39 | Comparison
40 | ----------
41 |
42 | .. autosummary::
43 | :toctree: generated/
44 | :nosignatures:
45 |
46 | nlcpy.greater
47 | nlcpy.greater_equal
48 | nlcpy.less
49 | nlcpy.less_equal
50 | nlcpy.equal
51 | nlcpy.not_equal
52 |
--------------------------------------------------------------------------------
/doc/source/reference/miscellaneous.rst:
--------------------------------------------------------------------------------
1 | Miscellaneous Routines
2 | ======================
3 |
4 | The following table shows miscellaneous routine provided by NLCPy.
5 |
6 | Memory Ranges
7 | ----------------------------------
8 |
9 | .. autosummary::
10 | :toctree: generated/
11 | :nosignatures:
12 |
13 | nlcpy.may_share_memory
14 |
15 |
16 | Utility
17 | ----------------------------------
18 |
19 | .. autosummary::
20 | :toctree: generated/
21 | :nosignatures:
22 |
23 | nlcpy.get_include
24 | nlcpy.show_config
25 |
--------------------------------------------------------------------------------
/doc/source/reference/ndarray.rst:
--------------------------------------------------------------------------------
1 | Multi-Dimensional Array (ndarray)
2 | =================================
3 |
4 | :class:`nlcpy.ndarray` is the NLCPy counterpart of NumPy :class:`numpy.ndarray`.
5 | It provides an intuitive interface for a fixed-size multidimensional array which resides
6 | in a VE.
7 |
8 | For the basic concept of ``ndarray``, please refer to the `NumPy documentation `_.
9 |
10 | ndarray class
11 | -------------
12 |
13 | .. autosummary::
14 | :toctree: generated/
15 | :nosignatures:
16 |
17 | nlcpy.ndarray
18 |
19 |
20 | Array Indexing
21 | --------------
22 |
23 | Arrays can be indexed using an extended Python slicing syntax, array[selection].
24 | For the basic concept of indexing arrays, please refer to the
25 | `NumPy Array Indexing `_.
26 |
27 | Differences from NumPy
28 | ----------------------
29 |
30 | * **Out-of-bounds indices**
31 |
32 | NLCPy handles out-of-bounds indices differently by default from NumPy
33 | when using integer array indexing.
34 | NumPy handles them by raising an error, but NLCPy wraps around them.
35 |
36 | .. code-block:: python
37 |
38 | >>> import numpy as np
39 | >>> import nlcpy as vp
40 | >>> nx = np.arange(3)
41 | >>> nx[[0, 1, 5]]
42 | Traceback (most recent call last):
43 | File "", line 1, in
44 | IndexError: index 5 is out of bounds for axis 0 with size 3
45 | >>> vx = vp.arange(3)
46 | >>> vx[[0, 1, 5]]
47 | array([0, 1, 2])
48 |
49 | * **Multiple boolean indices**
50 |
51 | NLCPy does not support slices that consists of more than one boolean arrays.
52 |
53 | .. seealso::
54 |
55 | :ref:`Notices and Restrictions `
56 |
57 |
--------------------------------------------------------------------------------
/doc/source/reference/profiling.rst:
--------------------------------------------------------------------------------
1 | .. module:: nlcpy.prof
2 |
3 | Profiling Routines
4 | ==================
5 |
6 | The following table shows profiling routines provided by NLCPy.
7 |
8 | .. _label_profiling_ftrace:
9 |
10 | Profiling with FTRACE
11 | ---------------------
12 |
13 | .. autosummary::
14 | :toctree: generated/
15 | :nosignatures:
16 |
17 | nlcpy.prof.ftrace_region
18 | nlcpy.prof.ftrace_region_begin
19 | nlcpy.prof.ftrace_region_end
20 |
21 | FTRACE is a performance analysis tool, which can obtain performance information
22 | such as the exclusive time and vectorization aspect on the VE.
23 | Please note that VE offloading overhead is included in performance information.
24 | For details of FTRACE, see
25 | `PROGINF/FTRACE User's Guide `_.
26 |
27 | .. note::
28 |
29 | VE functions in NLCPy are multithreaded.
30 | However, the ftrace.out includes performance information of only a master thread.
31 | To obtain performance information of all threads, it is necessary to compile
32 | C programs of NLCPy by using ncc with the option '-ftrace'.
33 | If needed, please download source programs of NLCPy from GitHub.
34 |
35 |
36 | |
37 | |
38 | | **The following routines are deprecated since NLCPy version 2.0.0.**
39 |
40 | Start and Stop Profiling
41 | ------------------------
42 |
43 | .. autosummary::
44 | :toctree: generated/
45 | :nosignatures:
46 |
47 | nlcpy.prof.start_profiling
48 | nlcpy.prof.stop_profiling
49 |
50 | Get Result
51 | ----------
52 |
53 | .. autosummary::
54 | :toctree: generated/
55 | :nosignatures:
56 |
57 | nlcpy.prof.get_run_stats
58 | nlcpy.prof.print_run_stats
59 |
--------------------------------------------------------------------------------
/doc/source/reference/request.rst:
--------------------------------------------------------------------------------
1 | .. module:: nlcpy.request
2 |
3 | Request Management Routines
4 | ===========================
5 |
6 | Flush
7 | -----
8 |
9 | .. autosummary::
10 | :toctree: generated/
11 | :nosignatures:
12 |
13 | nlcpy.request.flush
14 |
15 | Manage Offload Timing
16 | ---------------------
17 |
18 | .. autosummary::
19 | :toctree: generated/
20 | :nosignatures:
21 |
22 | nlcpy.request.get_offload_timing
23 | nlcpy.request.set_offload_timing_lazy
24 | nlcpy.request.set_offload_timing_onthefly
25 |
--------------------------------------------------------------------------------
/doc/source/reference/sca.rst:
--------------------------------------------------------------------------------
1 | .. _label_sca_top:
2 | .. module:: nlcpy.sca
3 |
4 | ==================================
5 | Stencil Code Accelerator Interface
6 | ==================================
7 |
8 |
9 | Coding Guide
10 | ==========================
11 | The Stencil Code Accelerator (SCA) interface accelerates stencil computations, a processing pattern frequently used in image processing, scientific or engineering simulations, deep learning, and so on.
12 | The SCA interface enables Python scripts to call functions provided by `SCA `_ of `NEC Numeric Library Collection `_, which is highly optimized for Vector Engine of SX-Aurora TSUBASA.
13 |
14 | .. toctree::
15 | :maxdepth: 1
16 |
17 | sca_chapter_1.rst
18 | sca_chapter_2.rst
19 | sca_chapter_3.rst
20 | sca_chapter_4.rst
21 | sca_chapter_5.rst
22 |
23 |
24 | Functions
25 | =========
26 |
27 | Creation of Stencil Descriptor
28 | ------------------------------
29 | .. autosummary::
30 | :toctree: generated/
31 | :nosignatures:
32 |
33 | nlcpy.sca.create_descriptor
34 | nlcpy.sca.empty_description
35 |
36 | Creation of Kernel
37 | ------------------------------
38 | .. autosummary::
39 | :toctree: generated/
40 | :nosignatures:
41 |
42 | nlcpy.sca.create_kernel
43 |
44 | Execution of Kernel
45 | ------------------------------
46 | .. autosummary::
47 | :toctree: generated/
48 | :nosignatures:
49 |
50 | nlcpy.sca.kernel.kernel.execute
51 |
52 | Destruction of Kernel
53 | ------------------------------
54 | .. autosummary::
55 | :toctree: generated/
56 | :nosignatures:
57 |
58 | nlcpy.sca.destroy_kernel
59 |
60 | Stride Adjustment
61 | ------------------------------
62 | .. autosummary::
63 | :toctree: generated/
64 | :nosignatures:
65 |
66 | nlcpy.sca.convert_optimized_array
67 | nlcpy.sca.create_optimized_array
68 |
--------------------------------------------------------------------------------
/doc/source/reference/sca_chapter_1.rst:
--------------------------------------------------------------------------------
1 | .. _label_sca_concept:
2 |
3 | Concept of Stencil Computation
4 | ==============================
5 |
6 | Before using the SCA interface, it is necessary to understand some fundamental concepts of the stencil computation.
7 |
8 | A stencil consists of stencil elements. Each stencil element has a relative location from the stencil center,
9 | a coefficient, and a reference to an input array. The mathematical expression of the stencil is shown below.
10 |
11 | .. math::
12 | Stencil(i_{\rm x},i_{\rm y},i_{\rm z},i_{\rm w}) = \sum_{k} c^{(k)} d^{(k)}[i_{\rm x}+l_{\rm x}^{(k)},i_{\rm y}+l_{\rm y}^{(k)},i_{\rm z}+l_{\rm z}^{(k)},i_{\rm w}+l_{\rm w}^{(k)}]
13 |
14 |
15 | Here, :math:`(l_{\rm x}^{(k)},l_{\rm y}^{(k)},l_{\rm z}^{(k)},l_{\rm w}^{(k)})` denotes the relative location of the kth stencil element, :math:`c^{(k)}` denotes the coefficient of the kth stencil element, and :math:`d^{(k)}` denotes the input array which the kth stencil element refers to.
16 |
17 | In the SCA interface, you can specify either a scalar or an array as the coefficients :math:`c^{(k)}`.
18 |
--------------------------------------------------------------------------------
/doc/source/reference/sca_chapter_4.rst:
--------------------------------------------------------------------------------
1 | Notice Regarding SCA Interface
2 | ===============================
3 |
4 | - The SCA interface supports up to 4 dimension :class:`nlcpy.ndarray`. It can handle stencil computations of arbitrary shape (axial, planar, diagonal, and its combination).
5 | - In terms of dtype (data type), the current version of the SCA interface supports only ``float32`` and ``float64``.
6 |
7 | - As for integer types (int, uint, etc.), convert dtype into ``float32`` or ``float64``.
8 | - As for complex types, see :ref:`label_sca_complex`.
9 |
10 | - :func:`nlcpy.sca.create_kernel` dynamically generates a instruction sequence required to perform stencil computations on VE. This generating cost is not small compared to :func:`nlcpy.sca.kernel.kernel.execute`, so the overall performance gets better as the number of kernel executions per kernel generation increase.
11 | - An output :class:`nlcpy.ndarray` may not be shared with an input :class:`nlcpy.ndarray`. Otherwise, unpredictable results occurs.
12 |
13 |
--------------------------------------------------------------------------------
/doc/source/reference/sca_chapter_5.rst:
--------------------------------------------------------------------------------
1 | Examples Using SCA Interface
2 | ============================
3 |
4 | Examples that use SCA can be found in the list below.
5 |
6 | * :ref:`example_thermal_sca`
7 | * :ref:`example_wave`
8 | * :ref:`example_cfd`
9 |
--------------------------------------------------------------------------------
/doc/source/reference/sorting.rst:
--------------------------------------------------------------------------------
1 | Sorting, Searching, and Counting
2 | ================================
3 |
4 | The following tables show sorting and searching functions provided by NLCPy.
5 |
6 | Sorting
7 | -------
8 |
9 | .. autosummary::
10 | :toctree: generated/
11 | :nosignatures:
12 |
13 | nlcpy.argsort
14 | nlcpy.sort
15 |
16 | Searching
17 | ---------
18 |
19 | .. autosummary::
20 | :toctree: generated/
21 | :nosignatures:
22 |
23 | nlcpy.argmax
24 | nlcpy.argmin
25 | nlcpy.nanargmax
26 | nlcpy.nanargmin
27 | nlcpy.argwhere
28 | nlcpy.nonzero
29 |
30 | Counting
31 | --------
32 |
33 | .. autosummary::
34 | :toctree: generated/
35 | :nosignatures:
36 |
37 | nlcpy.count_nonzero
38 |
--------------------------------------------------------------------------------
/doc/source/reference/statistics.rst:
--------------------------------------------------------------------------------
1 | Statistics
2 | ==========
3 |
4 | The following tables show statistical functions provided by NLCPy.
5 |
6 | Order Statistics
7 | ----------------
8 |
9 | .. autosummary::
10 | :toctree: generated/
11 | :nosignatures:
12 |
13 | nlcpy.amax
14 | nlcpy.amin
15 | nlcpy.nanmax
16 | nlcpy.nanmin
17 | nlcpy.ptp
18 | nlcpy.percentile
19 | nlcpy.nanpercentile
20 | nlcpy.quantile
21 | nlcpy.nanquantile
22 |
23 | Averages and Variances
24 | ----------------------
25 |
26 | .. autosummary::
27 | :toctree: generated/
28 | :nosignatures:
29 |
30 | nlcpy.average
31 | nlcpy.mean
32 | nlcpy.median
33 | nlcpy.nanmedian
34 | nlcpy.nanmean
35 | nlcpy.nanstd
36 | nlcpy.nanvar
37 | nlcpy.std
38 | nlcpy.var
39 |
40 | Correlating
41 | -----------
42 |
43 | .. autosummary::
44 | :toctree: generated/
45 | :nosignatures:
46 |
47 | nlcpy.correlate
48 | nlcpy.corrcoef
49 | nlcpy.cov
50 |
51 | Histograms
52 | ----------
53 |
54 | .. autosummary::
55 | :toctree: generated/
56 | :nosignatures:
57 |
58 | nlcpy.histogram
59 | nlcpy.histogram2d
60 | nlcpy.histogramdd
61 | nlcpy.bincount
62 | nlcpy.histogram_bin_edges
63 | nlcpy.digitize
64 |
--------------------------------------------------------------------------------
/doc/source/reference/venode.rst:
--------------------------------------------------------------------------------
1 | .. _label_venode:
2 |
3 | VE Device Management
4 | ====================
5 |
6 | The following tables show VE device management routines provided by NLCPy.
7 | For details, please refer to the :ref:`Using Multiple VEs `
8 |
9 | .. contents:: :local:
10 |
11 | Retrieve VE Node object
12 | -----------------------
13 |
14 | .. autosummary::
15 | :toctree: generated/
16 | :nosignatures:
17 |
18 | nlcpy.venode.VE
19 |
20 | Transfer
21 | --------
22 |
23 | .. autosummary::
24 | :toctree: generated/
25 | :nosignatures:
26 |
27 | nlcpy.venode.transfer_array
28 |
29 | Synchronize
30 | -----------
31 |
32 | .. autosummary::
33 | :toctree: generated/
34 | :nosignatures:
35 |
36 | nlcpy.venode.synchronize_all_ve
37 |
38 | Utility
39 | -------
40 |
41 | .. autosummary::
42 | :toctree: generated/
43 | :nosignatures:
44 |
45 | nlcpy.venode.get_num_available_venodes
46 |
47 | VE Node Class
48 | -------------
49 |
50 | .. autosummary::
51 | :toctree: generated/
52 | :nosignatures:
53 |
54 | nlcpy.venode.VENode
55 |
--------------------------------------------------------------------------------
/doc/source/release_notes/index.rst:
--------------------------------------------------------------------------------
1 | .. _release_notes:
2 |
3 | =============
4 | Release Notes
5 | =============
6 |
7 | This is the list of the revision history of NLCPy between each releases.
8 |
9 | .. toctree::
10 | :maxdepth: 1
11 |
12 | v3.0.1
13 | v3.0.0
14 | v2.2.0
15 | v2.1.1
16 | v2.1.0
17 | v2.0.0
18 | v1.0.1
19 | v1.0.0
20 | v1.0.0b2
21 |
--------------------------------------------------------------------------------
/doc/source/release_notes/v1.0.0b2.rst:
--------------------------------------------------------------------------------
1 | =================================================
2 | What's new in Version 1.0.0b2 (December, 2020)
3 | =================================================
4 |
5 | .. currentmodule:: nlcpy
6 |
7 | Performance Enhancements
8 | ------------------------
9 |
10 | * Improved performance of universal functions with multi-dimensional arrays.
11 | * Improved performance of broadcasting operations from a scalar value to an :class:`ndarray`.
12 | * Improved performance of :func:`arccos` and :func:`arctanh`.
13 | * Improved performance of random number generators by changing the number of threads to be execeted on VE.
14 |
15 | Problem Fixes
16 | -------------
17 |
18 | * Fixed a bug in :func:`sort` that might cause a freeze of Python interpreter at the end of the program.
19 | * Fixed a bug in :func:`matmul` that returned invalid results when input ndarrays (a and b) fulfill any of the following conditions:
20 |
21 | + a.flags.c_congituous is False and a.flags.f_contiguous is False
22 | + b.flags.c_congituous is False and b.flags.f_contiguous is False
23 |
24 | * Fixed a bug in :func:`prof.print_run_stats` that might showed negative elapsed time.
25 |
--------------------------------------------------------------------------------
/doc/source/release_notes/v1.0.1.rst:
--------------------------------------------------------------------------------
1 | ============================================
2 | What's new in Version 1.0.1 (May, 2021)
3 | ============================================
4 |
5 | .. currentmodule:: nlcpy
6 |
7 | Problem Fixes
8 | -------------
9 |
10 | * Fixed abnormal termination that could occur when a Python script using NLCPy is executed by a batch scheduler.
11 | * Fixed a problem that stalls when a multi-dimensional :class:`ndarray` is specified as a parameter to :func:`sort` .
12 |
13 |
14 | Function Enhancements
15 | ---------------------
16 |
17 | * Improved a part of the memory allocation logic during the lazy evaluation.
18 |
--------------------------------------------------------------------------------
/doc/source/release_notes/v2.0.0.rst:
--------------------------------------------------------------------------------
1 | ============================================
2 | What's new in Version 2.0.0 (July, 2021)
3 | ============================================
4 |
5 |
6 | New Features
7 | ------------
8 |
9 | * Newly added :ref:`SCA Interface `, which enables Python scripts to call SCA functions of
10 | `NEC Numeric Library Collection `_.
11 |
12 | * Newly added the :ref:`profiling routines with FTRACE `.
13 |
14 | * Newly added the following functions.
15 |
16 | - :func:`nlcpy.save`
17 | - :func:`nlcpy.savetxt`
18 | - :func:`nlcpy.savez`
19 | - :func:`nlcpy.savez_compressed`
20 | - :func:`nlcpy.roll`
21 | - :func:`nlcpy.swapaxes`
22 | - :func:`nlcpy.unique`
23 | - :func:`nlcpy.count_nonzero`
24 | - :func:`nlcpy.broadcast_arrays`
25 | - :func:`nlcpy.diag_indices`
26 | - :func:`nlcpy.diagflat`
27 | - :func:`nlcpy.tri`
28 | - :func:`nlcpy.tril`
29 | - :func:`nlcpy.triu`
30 | - :func:`nlcpy.fill_diagonal`
31 | - :func:`nlcpy.hsplit`
32 | - :func:`nlcpy.vsplit`
33 | - :func:`nlcpy.split`
34 | - :func:`nlcpy.atleast_1d`
35 | - :func:`nlcpy.atleast_2d`
36 | - :func:`nlcpy.atleast_3d`
37 | - :func:`nlcpy.block`
38 | - :func:`nlcpy.clip`
39 | - :func:`nlcpy.select`
40 | - :func:`nlcpy.nanargmax`
41 | - :func:`nlcpy.nanargmin`
42 |
43 |
44 | Performance Enhancements
45 | ------------------------
46 |
47 | * Improved the overall performance of NLCPy by applying asynchronous VE function calls.
48 | * Improved the performance of reduction operations such as :func:`nlcpy.sum`, :func:`nlcpy.amax`, and :func:`nlcpy.amin`.
49 |
--------------------------------------------------------------------------------
/doc/source/release_notes/v2.1.0.rst:
--------------------------------------------------------------------------------
1 | ===============================================
2 | What's new in Version 2.1.0 (December, 2021)
3 | ===============================================
4 |
5 | .. attention::
6 |
7 | NLCPy v2.1.0 requires to install the RPM version later than or equal to
8 | nec-blas-ve-2.3.0-2.5.
9 |
10 | New Features
11 | ------------
12 |
13 | * Newly added :ref:`Just-In-Time compilation functionality `,
14 | which enables your Python scripts to call VE functions written by C/C++/Fortran.
15 |
16 | * Newly added :ref:`Masked Array `.
17 |
18 |
19 | Performance Enhancements
20 | ------------------------
21 |
22 | * Improved the performance of :meth:`nlcpy.ndarray.__getitem__` with list, tuple, or :class:`nlcpy.ndarray` elements.
23 |
24 | * Improved the performance of :func:`nlcpy.linalg.eigvalsh`.
25 |
--------------------------------------------------------------------------------
/doc/source/release_notes/v2.1.1.rst:
--------------------------------------------------------------------------------
1 | ===============================================
2 | What's new in Version 2.1.1 (March, 2022)
3 | ===============================================
4 |
5 |
6 | New Features
7 | ------------
8 |
9 | * Newly added environment variable ``VE_NLCPY_WARMUP`` which enables/disables Python scripts to perform some warming up when importing `NLCPy`.
10 |
11 | * Minor updates for `mpi4py-ve` support.
12 |
13 | Performance Enhancements
14 | ------------------------
15 |
16 | * Improved the performance of :meth:`nlcpy.linalg.norm` if the Frobenius norm is specified.
17 |
18 | * Improved the performance of some functions if the memory layout is C-contiguous or F-contiguous.
19 |
--------------------------------------------------------------------------------
/doc/source/release_notes/v2.2.0.rst:
--------------------------------------------------------------------------------
1 | ===============================================
2 | What's new in Version 2.2.0 (November, 2022)
3 | ===============================================
4 |
5 |
6 | New Features
7 | ------------
8 |
9 | * Newly added :ref:`VE device management ` routines, which enable you to select execution VE device from Python script. For details, please refer to the :ref:`Using Multiple VEs `.
10 |
11 | * Newly added environment variable ``VE_NLCPY_MEMPOOL_SIZE`` which controls amount of memory pool. For details, please refer to the :ref:`Memory Pool Management ` and :ref:`Environment Variables `. According to adding this variable, an environment variable ``VE_NLCPY_WARMUP`` is abolished.
12 |
13 | * Newly supports a feature that NLCPy automatically replaces almost functions and methods that implemented not yet to the NumPy's one. For details, please refer to the :ref:`Auto Replacing to NumPy `
14 |
15 | Performance Enhancements
16 | ------------------------
17 |
18 | * Improved the performance of :func:`nlcpy.power` and :func:`nlcpy.floor_divide` when input data types are complex.
19 |
--------------------------------------------------------------------------------
/doc/source/release_notes/v3.0.0.rst:
--------------------------------------------------------------------------------
1 | =========================================
2 | What's new in Version 3.0.0 (March, 2023)
3 | =========================================
4 |
5 |
6 | New Features
7 | ------------
8 |
9 | * Newly added shared libraries for VE30.
10 |
--------------------------------------------------------------------------------
/doc/source/release_notes/v3.0.1.rst:
--------------------------------------------------------------------------------
1 | =============================================
2 | What's new in Version 3.0.1 (September, 2023)
3 | =============================================
4 |
5 |
6 | Problem Fixes
7 | -------------
8 |
9 | * Fixed incorrect execution results of :func:`nlcpy.fft.fftshift` and :func:`nlcpy.fft.ifftshift` that are returned when the number of array dimensions is larger than 1 and the input parameter of `axis` is not equal to 0.
10 |
11 | * Fixed incorrect execution results of :func:`nlcpy.linalg.norm` that are returned when the number of VE threads is larger than 1 and the memory layout of input array is not contiguous.
12 |
13 | * Fixed a problem where :func:`nlcpy.diff` raises unexpected RuntimeWarning.
14 |
--------------------------------------------------------------------------------
/doc/source/usage/index.rst:
--------------------------------------------------------------------------------
1 | .. _usage:
2 |
3 | Usage
4 | =====
5 |
6 |
7 | This page describes the usage of NLCPy from your Python scripts:
8 |
9 | .. toctree::
10 | :maxdepth: 1
11 |
12 | basic
13 | interoperability
14 | execution
15 |
--------------------------------------------------------------------------------
/doc/source/userguide.rst:
--------------------------------------------------------------------------------
1 | .. _userguide:
2 |
3 | User's Guide
4 | ============
5 |
6 | .. currentmodule:: nlcpy
7 |
8 | NLCPy is a library for accelerating performance of Python scripts using NumPy on SX-Aurora TSUBASA. Python programmers can use this library on Linux/x86 of SX-Aurora TSUBASA. NLCPy's API is designed based on NumPy's one. The current version provides a subset of NumPy's API.
9 |
10 | .. image:: ../image/nlcpy_image1.png
11 | :width: 320px
12 | :align: center
13 |
14 | NLCPy enables Python scripts to compute on a Vector Engine (VE) of SX-Aurora TSUBASA by VE offloading. To gain the performance on VE, NLCPy uses the functions of NEC Numeric Library Collection (NLC), which are highly optimized for VE.
15 |
16 | .. toctree::
17 | :maxdepth: 1
18 |
19 | installation
20 | usage/index
21 | functions
22 | lazy
23 | notices
24 | example/index
25 | building_docs
26 | copyrights
27 |
--------------------------------------------------------------------------------
/make.inc:
--------------------------------------------------------------------------------
1 | PYTHON=$(shell echo ${PYTHONPATH} | sed -e "s/\([^:]*\)\(.*\)/\1/")
2 |
3 | # BASEDIR is a relative path to the base directory of source tree, e.g. ../..
4 | # It must be set in Makefile (but not make.inc files).
5 |
6 | SRCDIR=$(BASEDIR)/nlcpy/ve_kernel
7 | INCDIR=$(BASEDIR)/nlcpy/include
8 | TOOLDIR=$(BASEDIR)/scripts
9 | DISTDIR=$(BASEDIR)/dist
10 | ifeq ($(ARCH),ve1)
11 | OBJDIR_COMMON=$(BASEDIR)/obj_ve1/common
12 | OBJDIR_NO_FAST_MATH=$(BASEDIR)/obj_ve1/no_fast_math
13 | OBJDIR_FAST_MATH=$(BASEDIR)/obj_ve1/fast_math
14 | LIBDIR=$(BASEDIR)/nlcpy_ve1_kernel
15 | BUILD_VER_FILE=$(LIBDIR)/build_info.py
16 | else ifeq ($(ARCH),ve3)
17 | OBJDIR_COMMON=$(BASEDIR)/obj_ve3/common
18 | OBJDIR_NO_FAST_MATH=$(BASEDIR)/obj_ve3/no_fast_math
19 | OBJDIR_FAST_MATH=$(BASEDIR)/obj_ve3/fast_math
20 | LIBDIR=$(BASEDIR)/nlcpy_ve3_kernel
21 | BUILD_VER_FILE=$(LIBDIR)/build_info.py
22 | endif
23 |
24 |
25 | CPIO = find . | cpio -padlum
26 | CPIO_INC = find . -name "*.h" | cpio -padlum
27 |
--------------------------------------------------------------------------------
/make_wheel.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | ### usage ###
4 | # VH only
5 | # $ sh make_wheel.sh --targ vh
6 | #
7 | # VE1 and VE3
8 | # $ sh make_wheel.sh --targ ve1,ve3
9 | #
10 | # VH and VE1 and VE3
11 | # $ sh make_wheel.sh --targ vh,ve1,ve3
12 | #############
13 |
14 | python setup.py bdist_wheel $@
15 |
--------------------------------------------------------------------------------
/nlcpy/.gitignore:
--------------------------------------------------------------------------------
1 | *.cpp
2 | *.c
3 | *.html
4 | !/ve_kernel/*.c
5 | !/mempool/nlcpy_mempool.c
6 |
--------------------------------------------------------------------------------
/nlcpy/_path.py:
--------------------------------------------------------------------------------
1 | import os
2 |
3 | _base_path = os.path.abspath(os.path.dirname(__file__))
4 | _include_path = os.path.join(_base_path, 'include')
5 |
6 |
7 | class LibPath(object):
8 |
9 | def __init__(self, ve_arch):
10 | if ve_arch == 1:
11 | import nlcpy_ve1_kernel
12 | self._lib_dir = nlcpy_ve1_kernel.get_kernel_path()
13 | elif ve_arch == 3:
14 | import nlcpy_ve3_kernel
15 | self._lib_dir = nlcpy_ve3_kernel.get_kernel_path()
16 | else:
17 | raise RuntimeError(f"Unknown VE architecture version: {ve_arch}")
18 |
19 | self._common_kernel_path = os.path.join(
20 | self._lib_dir, 'libnlcpy_ve_kernel_common.so')
21 | self._fast_math_kernel_path = os.path.join(
22 | self._lib_dir, 'libnlcpy_ve_kernel_fast_math.so')
23 | self._no_fast_math_kernel_path = os.path.join(
24 | self._lib_dir, 'libnlcpy_ve_kernel_no_fast_math.so')
25 | self._profiling_kernel_path = os.path.join(
26 | self._lib_dir, 'libnlcpy_profiling.so')
27 |
--------------------------------------------------------------------------------
/nlcpy/_version.py:
--------------------------------------------------------------------------------
1 | __version__ = '3.0.1'
2 |
--------------------------------------------------------------------------------
/nlcpy/core/__init__.py:
--------------------------------------------------------------------------------
1 | from nlcpy.core.core import ndarray # NOQA
2 | from nlcpy.core.core import array # NOQA
3 | from nlcpy.core.broadcast import broadcast_to # NOQA
4 | from nlcpy.core.broadcast import _broadcast_core # NOQA
5 |
6 | from nlcpy import veo # NOQA
7 |
8 | from nlcpy.core.core import argument_conversion # NOQA
9 | from nlcpy.core.core import check_fpe_flags # NOQA
10 | from nlcpy.core.core import get_nlcpy_maxndim # NOQA
11 |
12 | from nlcpy.core.searching import argmax # NOQA
13 | from nlcpy.core.searching import argmin # NOQA
14 | from nlcpy.core.searching import nonzero # NOQA
15 |
16 | from nlcpy.statistics.order import ptp # NOQA
17 | from nlcpy.statistics.average import mean # NOQA
18 | from nlcpy.statistics.average import var # NOQA
19 | from nlcpy.statistics.average import std # NOQA
20 |
--------------------------------------------------------------------------------
/nlcpy/core/macros.m4:
--------------------------------------------------------------------------------
1 | ../include/macros.m4
--------------------------------------------------------------------------------
/nlcpy/core/searching.pxd:
--------------------------------------------------------------------------------
1 | #
2 | # * The source code in this file is developed independently by NEC Corporation.
3 | #
4 | # # NLCPy License #
5 | #
6 | # Copyright (c) 2020 NEC Corporation
7 | # All rights reserved.
8 | #
9 | # Redistribution and use in source and binary forms, with or without
10 | # modification, are permitted provided that the following conditions are met:
11 | # * Redistributions of source code must retain the above copyright notice,
12 | # this list of conditions and the following disclaimer.
13 | # * Redistributions in binary form must reproduce the above copyright notice,
14 | # this list of conditions and the following disclaimer in the documentation
15 | # and/or other materials provided with the distribution.
16 | # * Neither NEC Corporation nor the names of its contributors may be
17 | # used to endorse or promote products derived from this software
18 | # without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | #
31 |
32 | from libc.stdint cimport *
33 | from nlcpy.core.core cimport ndarray
34 |
35 | cpdef argmax(a, axis=*, out=*)
36 | cpdef argmin(a, axis=*, out=*)
37 | cpdef nonzero(a)
38 | cpdef argwhere(a)
39 |
--------------------------------------------------------------------------------
/nlcpy/core/vememory.pxd:
--------------------------------------------------------------------------------
1 | #
2 | # * The source code in this file is developed independently by NEC Corporation.
3 | #
4 | # # NLCPy License #
5 | #
6 | # Copyright (c) 2020 NEC Corporation
7 | # All rights reserved.
8 | #
9 | # Redistribution and use in source and binary forms, with or without
10 | # modification, are permitted provided that the following conditions are met:
11 | # * Redistributions of source code must retain the above copyright notice,
12 | # this list of conditions and the following disclaimer.
13 | # * Redistributions in binary form must reproduce the above copyright notice,
14 | # this list of conditions and the following disclaimer in the documentation
15 | # and/or other materials provided with the distribution.
16 | # * Neither NEC Corporation nor the names of its contributors may be
17 | # used to endorse or promote products derived from this software
18 | # without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | #
31 |
32 | from libc.stdint cimport *
33 | from nlcpy.venode._venode cimport VENode
34 |
35 |
36 | cpdef _alloc_mem(size_t nbytes, VENode venode)
37 | cpdef _write_mem(a_cpu, uint64_t ve_adr, size_t nbytes, VENode venode)
38 | cpdef _free_mem(uint64_t veo_hmem, bint is_pool, VENode venode)
39 | cpdef _hmemcpy(uint64_t dst, uint64_t src, size_t size)
40 |
--------------------------------------------------------------------------------
/nlcpy/creation/__init__.py:
--------------------------------------------------------------------------------
1 | #
2 | # * The source code in this file is developed independently by NEC Corporation.
3 | #
4 | # # NLCPy License #
5 | #
6 | # Copyright (c) 2020 NEC Corporation
7 | # All rights reserved.
8 | #
9 | # Redistribution and use in source and binary forms, with or without
10 | # modification, are permitted provided that the following conditions are met:
11 | # * Redistributions of source code must retain the above copyright notice,
12 | # this list of conditions and the following disclaimer.
13 | # * Redistributions in binary form must reproduce the above copyright notice,
14 | # this list of conditions and the following disclaimer in the documentation
15 | # and/or other materials provided with the distribution.
16 | # * Neither NEC Corporation nor the names of its contributors may be
17 | # used to endorse or promote products derived from this software
18 | # without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | #
31 | from nlcpy.creation import basic # NOQA
32 | from nlcpy.creation import from_data # NOQA
33 | from nlcpy.creation import ranges # NOQA
34 | from nlcpy.creation import matrices # NOQA
35 |
--------------------------------------------------------------------------------
/nlcpy/datatype/__init__.py:
--------------------------------------------------------------------------------
1 | #
2 | # * The source code in this file is developed independently by NEC Corporation.
3 | #
4 | # # NLCPy License #
5 | #
6 | # Copyright (c) 2020 NEC Corporation
7 | # All rights reserved.
8 | #
9 | # Redistribution and use in source and binary forms, with or without
10 | # modification, are permitted provided that the following conditions are met:
11 | # * Redistributions of source code must retain the above copyright notice,
12 | # this list of conditions and the following disclaimer.
13 | # * Redistributions in binary form must reproduce the above copyright notice,
14 | # this list of conditions and the following disclaimer in the documentation
15 | # and/or other materials provided with the distribution.
16 | # * Neither NEC Corporation nor the names of its contributors may be
17 | # used to endorse or promote products derived from this software
18 | # without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | #
31 |
32 | from nlcpy.datatype import getlimits # NOQA
33 |
--------------------------------------------------------------------------------
/nlcpy/error_handler/__init__.py:
--------------------------------------------------------------------------------
1 | #
2 | # * The source code in this file is developed independently by NEC Corporation.
3 | #
4 | # # NLCPy License #
5 | #
6 | # Copyright (c) 2020 NEC Corporation
7 | # All rights reserved.
8 | #
9 | # Redistribution and use in source and binary forms, with or without
10 | # modification, are permitted provided that the following conditions are met:
11 | # * Redistributions of source code must retain the above copyright notice,
12 | # this list of conditions and the following disclaimer.
13 | # * Redistributions in binary form must reproduce the above copyright notice,
14 | # this list of conditions and the following disclaimer in the documentation
15 | # and/or other materials provided with the distribution.
16 | # * Neither NEC Corporation nor the names of its contributors may be
17 | # used to endorse or promote products derived from this software
18 | # without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | #
31 |
32 | from nlcpy.error_handler import error_handler # NOQA
33 |
--------------------------------------------------------------------------------
/nlcpy/fft/__init__.py:
--------------------------------------------------------------------------------
1 |
2 | from nlcpy.fft.fft import fft # NOQA
3 | from nlcpy.fft.fft import fft2 # NOQA
4 | from nlcpy.fft.fft import fftfreq # NOQA
5 | from nlcpy.fft.fft import fftn # NOQA
6 | from nlcpy.fft.fft import fftshift # NOQA
7 | from nlcpy.fft.fft import hfft # NOQA
8 | from nlcpy.fft.fft import ifft # NOQA
9 | from nlcpy.fft.fft import ifft2 # NOQA
10 | from nlcpy.fft.fft import ifftn # NOQA
11 | from nlcpy.fft.fft import ifftshift # NOQA
12 | from nlcpy.fft.fft import ihfft # NOQA
13 | from nlcpy.fft.fft import irfft # NOQA
14 | from nlcpy.fft.fft import irfft2 # NOQA
15 | from nlcpy.fft.fft import irfftn # NOQA
16 | from nlcpy.fft.fft import rfft # NOQA
17 | from nlcpy.fft.fft import rfft2 # NOQA
18 | from nlcpy.fft.fft import rfftfreq # NOQA
19 | from nlcpy.fft.fft import rfftn # NOQA
20 |
--------------------------------------------------------------------------------
/nlcpy/fft/libfft.pxd:
--------------------------------------------------------------------------------
1 | #
2 | # Interface to fft
3 | #
4 |
5 | cdef extern from "asl.h":
6 | cdef enum: ASL_ERROR_OK
7 | cdef enum: ASL_ERROR_ARGUMENT
8 | cdef enum: ASL_ERROR_MEMORY
9 | cdef enum: ASL_ERROR_THREAD
10 | cdef enum: ASL_ERROR_MPI
11 | cdef enum: ASL_ERROR_OVERFLOW
12 | cdef enum: ASL_ERROR_UNSUPPORTED
13 | cdef enum: ASL_ERROR_LIBRARY_UNINITIALIZED
14 | cdef enum: ASL_ERROR_LIBRARY_INITIALIZED
15 | cdef enum: ASL_ERROR_MATRIX_INVALID
16 | cdef enum: ASL_ERROR_MATRIX_DUPLICATE_ELEMENTS
17 | cdef enum: ASL_ERROR_MATRIX_INCOMPATIBLE_TYPE
18 | cdef enum: ASL_ERROR_MATRIX_INCOMPATIBLE_SIZE
19 | cdef enum: ASL_ERROR_MATRIX_NOT_SQUARE
20 | cdef enum: ASL_ERROR_MATRIX_NOT_REGULAR
21 | cdef enum: ASL_ERROR_MATRIX_NOT_SYMMETRIC
22 | cdef enum: ASL_ERROR_LINEARSOLVER_INVALID
23 | cdef enum: ASL_ERROR_LINEARSOLVER_IMPROPER_METHOD
24 | cdef enum: ASL_ERROR_LINEARSOLVER_BAD_CONDITION
25 | cdef enum: ASL_ERROR_LINEARSOLVER_NOT_CONVERGED
26 | cdef enum: ASL_ERROR_EIGENSOLVER_INVALID
27 | cdef enum: ASL_ERROR_EIGENSOLVER_IMPROPER_METHOD
28 | cdef enum: ASL_ERROR_EIGENSOLVER_BAD_CONDITION
29 | cdef enum: ASL_ERROR_EIGENSOLVER_NOT_CONVERGED
30 | cdef enum: ASL_ERROR_FFT_INVALID
31 | cdef enum: ASL_ERROR_FFT_INCOMPATIBLE_CALL
32 | cdef enum: ASL_ERROR_RANDOM_INVALID
33 | cdef enum: ASL_ERROR_RANDOM_INCOMPATIBLE_CALL
34 | cdef enum: ASL_ERROR_SORT_INVALID
35 | cdef enum: ASL_ERROR_SORT_INCOMPATIBLE_CALL
36 | cdef enum: ASL_ERROR_INTERNAL
37 |
--------------------------------------------------------------------------------
/nlcpy/include/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SX-Aurora/nlcpy/78534eb1695863dfe6e731b8f1e8156061c8a988/nlcpy/include/__init__.py
--------------------------------------------------------------------------------
/nlcpy/include/macros.m4:
--------------------------------------------------------------------------------
1 | divert(-1)dnl
2 | #
3 | # * The source code in this file is developed independently by NEC Corporation.
4 | #
5 | # # NLCPy License #
6 | #
7 | # Copyright (c) 2020 NEC Corporation
8 | # All rights reserved.
9 | #
10 | # Redistribution and use in source and binary forms, with or without
11 | # modification, are permitted provided that the following conditions are met:
12 | # * Redistributions of source code must retain the above copyright notice,
13 | # this list of conditions and the following disclaimer.
14 | # * Redistributions in binary form must reproduce the above copyright notice,
15 | # this list of conditions and the following disclaimer in the documentation
16 | # and/or other materials provided with the distribution.
17 | # * Neither NEC Corporation nor the names of its contributors may be
18 | # used to endorse or promote products derived from this software
19 | # without specific prior written permission.
20 | #
21 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
22 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
25 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
28 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 | #
32 | divert(0)dnl
33 |
34 | divert(-1)
35 | ##############################################################################
36 | # Initial setteings for m4 macros
37 | undefine(len)
38 | undefine(format)
39 | changequote(<--@,@-->)
40 | ##############################################################################
41 | divert(0)dnl
42 |
--------------------------------------------------------------------------------
/nlcpy/include/nlcpy.h:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # * The source code in this file is developed independently by NEC Corporation.
4 | #
5 | # # NLCPy License #
6 | #
7 | # Copyright (c) 2020 NEC Corporation
8 | # All rights reserved.
9 | #
10 | # Redistribution and use in source and binary forms, with or without
11 | # modification, are permitted provided that the following conditions are met:
12 | # * Redistributions of source code must retain the above copyright notice,
13 | # this list of conditions and the following disclaimer.
14 | # * Redistributions in binary form must reproduce the above copyright notice,
15 | # this list of conditions and the following disclaimer in the documentation
16 | # and/or other materials provided with the distribution.
17 | # * Neither NEC Corporation nor the names of its contributors may be
18 | # used to endorse or promote products derived from this software
19 | # without specific prior written permission.
20 | #
21 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
22 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
25 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
28 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 | #
32 | */
33 | #ifndef NLCPY_H_INCLUDED
34 | #define NLCPY_H_INCLUDED
35 |
36 | #include
37 |
38 | #include "array_utility.h"
39 | #include "ve_array.h"
40 | #include "ve_dtype.h"
41 | #include "fpe_flags.h"
42 | #include "ve_error.h"
43 | #include "ve_request.h"
44 | #include "ve_selector.h"
45 | #include "ve_funclist.h"
46 | #include "ve_funcnum.h"
47 | #include "ve_functype.h"
48 |
49 | #endif /* NLCPY_H_INCLUDED */
50 |
--------------------------------------------------------------------------------
/nlcpy/include/param.pxi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SX-Aurora/nlcpy/78534eb1695863dfe6e731b8f1e8156061c8a988/nlcpy/include/param.pxi
--------------------------------------------------------------------------------
/nlcpy/indexing/__init__.py:
--------------------------------------------------------------------------------
1 | #
2 | # * The source code in this file is developed independently by NEC Corporation.
3 | #
4 | # # NLCPy License #
5 | #
6 | # Copyright (c) 2020 NEC Corporation
7 | # All rights reserved.
8 | #
9 | # Redistribution and use in source and binary forms, with or without
10 | # modification, are permitted provided that the following conditions are met:
11 | # * Redistributions of source code must retain the above copyright notice,
12 | # this list of conditions and the following disclaimer.
13 | # * Redistributions in binary form must reproduce the above copyright notice,
14 | # this list of conditions and the following disclaimer in the documentation
15 | # and/or other materials provided with the distribution.
16 | # * Neither NEC Corporation nor the names of its contributors may be
17 | # used to endorse or promote products derived from this software
18 | # without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | #
31 | from nlcpy.indexing import generate # NOQA
32 | from nlcpy.indexing import indexing # NOQA
33 | from nlcpy.indexing import inserting # NOQA
34 |
--------------------------------------------------------------------------------
/nlcpy/io/__init__.py:
--------------------------------------------------------------------------------
1 | #
2 | # * The source code in this file is developed independently by NEC Corporation.
3 | #
4 | # # NLCPy License #
5 | #
6 | # Copyright (c) 2020 NEC Corporation
7 | # All rights reserved.
8 | #
9 | # Redistribution and use in source and binary forms, with or without
10 | # modification, are permitted provided that the following conditions are met:
11 | # * Redistributions of source code must retain the above copyright notice,
12 | # this list of conditions and the following disclaimer.
13 | # * Redistributions in binary form must reproduce the above copyright notice,
14 | # this list of conditions and the following disclaimer in the documentation
15 | # and/or other materials provided with the distribution.
16 | # * Neither NEC Corporation nor the names of its contributors may be
17 | # used to endorse or promote products derived from this software
18 | # without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | #
31 | from nlcpy.io import npz # NOQA
32 | from nlcpy.io import text # NOQA
33 |
--------------------------------------------------------------------------------
/nlcpy/kernel_register/asluni_kernel_list.pxi:
--------------------------------------------------------------------------------
1 | #
2 | # * The source code in this file is developed independently by NEC Corporation.
3 | #
4 | # # NLCPy License #
5 | #
6 | # Copyright (c) 2020 NEC Corporation
7 | # All rights reserved.
8 | #
9 | # Redistribution and use in source and binary forms, with or without
10 | # modification, are permitted provided that the following conditions are met:
11 | # * Redistributions of source code must retain the above copyright notice,
12 | # this list of conditions and the following disclaimer.
13 | # * Redistributions in binary form must reproduce the above copyright notice,
14 | # this list of conditions and the following disclaimer in the documentation
15 | # and/or other materials provided with the distribution.
16 | # * Neither NEC Corporation nor the names of its contributors may be
17 | # used to endorse or promote products derived from this software
18 | # without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | #
31 |
32 | _asluni_kernel_list = {
33 | "nlcpy_asl_initialize": {
34 | "ret": "uint64_t",
35 | "args": [b"void *"],
36 | },
37 | "nlcpy_asl_finalize": {
38 | "ret": "uint64_t",
39 | "args": ["void"],
40 | },
41 | }
42 |
--------------------------------------------------------------------------------
/nlcpy/kernel_register/macros.m4:
--------------------------------------------------------------------------------
1 | ../include/macros.m4
--------------------------------------------------------------------------------
/nlcpy/kernel_register/manipulation_kernel_list.pxi:
--------------------------------------------------------------------------------
1 | #
2 | # * The source code in this file is developed independently by NEC Corporation.
3 | #
4 | # # NLCPy License #
5 | #
6 | # Copyright (c) 2020 NEC Corporation
7 | # All rights reserved.
8 | #
9 | # Redistribution and use in source and binary forms, with or without
10 | # modification, are permitted provided that the following conditions are met:
11 | # * Redistributions of source code must retain the above copyright notice,
12 | # this list of conditions and the following disclaimer.
13 | # * Redistributions in binary form must reproduce the above copyright notice,
14 | # this list of conditions and the following disclaimer in the documentation
15 | # and/or other materials provided with the distribution.
16 | # * Neither NEC Corporation nor the names of its contributors may be
17 | # used to endorse or promote products derived from this software
18 | # without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | #
31 |
32 | _manipulation_kernel_list = {
33 | "nlcpy_memcpy": {
34 | "ret": b"void *",
35 | "args":
36 | [
37 | "uint64_t",
38 | "uint64_t",
39 | "uint64_t",
40 | ],
41 | },
42 | }
43 |
--------------------------------------------------------------------------------
/nlcpy/kernel_register/math_kernel_list.pxi:
--------------------------------------------------------------------------------
1 | #
2 | # * The source code in this file is developed independently by NEC Corporation.
3 | #
4 | # # NLCPy License #
5 | #
6 | # Copyright (c) 2020 NEC Corporation
7 | # All rights reserved.
8 | #
9 | # Redistribution and use in source and binary forms, with or without
10 | # modification, are permitted provided that the following conditions are met:
11 | # * Redistributions of source code must retain the above copyright notice,
12 | # this list of conditions and the following disclaimer.
13 | # * Redistributions in binary form must reproduce the above copyright notice,
14 | # this list of conditions and the following disclaimer in the documentation
15 | # and/or other materials provided with the distribution.
16 | # * Neither NEC Corporation nor the names of its contributors may be
17 | # used to endorse or promote products derived from this software
18 | # without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | #
31 |
32 | _math_kernel_list = {
33 | # math_functions
34 |
35 | "nlcpy_angle": {
36 | "ret": "uint64_t",
37 | "args":
38 | [
39 | b"void *",
40 | b"void *",
41 | b"int32_t *",
42 | ],
43 | },
44 | }
45 |
--------------------------------------------------------------------------------
/nlcpy/kernel_register/math_kernel_list.pxi.m4:
--------------------------------------------------------------------------------
1 | include(macros.m4)dnl
2 | define(<--@math_kernel_list@-->,<--@
3 | "nlcpy_$1": {
4 | "ret": "uint64_t",
5 | "args":
6 | [
7 | b"void *",
8 | b"void *",
9 | ifelse($2,binary,<--@dnl
10 | b"void *",
11 | @-->)dnl
12 | b"int32_t *",
13 | ],
14 | },
15 | @-->)dnl
16 | _math_kernel_list = {
17 | # math_functions
18 | math_kernel_list(angle)dnl
19 | }
20 |
--------------------------------------------------------------------------------
/nlcpy/kernel_register/profiling_kernel_list.pxi:
--------------------------------------------------------------------------------
1 | #
2 | # * The source code in this file is developed independently by NEC Corporation.
3 | #
4 | # # NLCPy License #
5 | #
6 | # Copyright (c) 2020-2021 NEC Corporation
7 | # All rights reserved.
8 | #
9 | # Redistribution and use in source and binary forms, with or without
10 | # modification, are permitted provided that the following conditions are met:
11 | # * Redistributions of source code must retain the above copyright notice,
12 | # this list of conditions and the following disclaimer.
13 | # * Redistributions in binary form must reproduce the above copyright notice,
14 | # this list of conditions and the following disclaimer in the documentation
15 | # and/or other materials provided with the distribution.
16 | # * Neither NEC Corporation nor the names of its contributors may be
17 | # used to endorse or promote products derived from this software
18 | # without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | #
31 |
32 | _profiling_kernel_list = {
33 | "nlcpy_profiling_region_begin": {
34 | "ret": "void",
35 | "args": [b"void *", ],
36 | },
37 |
38 | "nlcpy_profiling_region_end": {
39 | "ret": "void",
40 | "args": [b"void *", ],
41 | },
42 | }
43 |
--------------------------------------------------------------------------------
/nlcpy/kernel_register/reduceat_kernel_list.pxi.m4:
--------------------------------------------------------------------------------
1 | include(macros.m4)dnl
2 | define(<--@ufunc_kernel_list@-->,<--@
3 | "nlcpy_$1_reduceat": {
4 | "ret": "uint64_t",
5 | "args":
6 | [
7 | b"void *",
8 | b"void *",
9 | b"void *",
10 | b"void *",
11 | "int32_t",
12 | "int32_t",
13 | "int32_t",
14 | ],
15 | },
16 | @-->)dnl
17 | _reduceat_kernel_list = {
18 |
19 | # math_operations
20 | ufunc_kernel_list(add)dnl
21 | ufunc_kernel_list(subtract)dnl
22 | ufunc_kernel_list(multiply)dnl
23 | ufunc_kernel_list(divide)dnl
24 | ufunc_kernel_list(logaddexp)dnl
25 | ufunc_kernel_list(logaddexp2)dnl
26 | ufunc_kernel_list(true_divide)dnl
27 | ufunc_kernel_list(floor_divide)dnl
28 | ufunc_kernel_list(power)dnl
29 | ufunc_kernel_list(remainder)dnl
30 | ufunc_kernel_list(mod)dnl
31 | ufunc_kernel_list(fmod)dnl
32 | ufunc_kernel_list(heaviside)dnl
33 | # bit-twiddling functions
34 | ufunc_kernel_list(bitwise_and)dnl
35 | ufunc_kernel_list(bitwise_or)dnl
36 | ufunc_kernel_list(bitwise_xor)dnl
37 | ufunc_kernel_list(left_shift)dnl
38 | ufunc_kernel_list(right_shift)dnl
39 | # comparison functions
40 | ufunc_kernel_list(greater)dnl
41 | ufunc_kernel_list(greater_equal)dnl
42 | ufunc_kernel_list(less)dnl
43 | ufunc_kernel_list(less_equal)dnl
44 | ufunc_kernel_list(not_equal)dnl
45 | ufunc_kernel_list(equal)dnl
46 | ufunc_kernel_list(logical_and)dnl
47 | ufunc_kernel_list(logical_or)dnl
48 | ufunc_kernel_list(logical_xor)dnl
49 | ufunc_kernel_list(maximum)dnl
50 | ufunc_kernel_list(minimum)dnl
51 | ufunc_kernel_list(fmax)dnl
52 | ufunc_kernel_list(fmin)dnl
53 | # trigonometric functions
54 | ufunc_kernel_list(arctan2)dnl
55 | ufunc_kernel_list(hypot)dnl
56 | # floating functions
57 | ufunc_kernel_list(copysign)dnl
58 | ufunc_kernel_list(nextafter)dnl
59 |
60 | }
61 |
--------------------------------------------------------------------------------
/nlcpy/linalg/cblas_wrapper.pxd:
--------------------------------------------------------------------------------
1 | #
2 | # * The source code in this file is developed independently by NEC Corporation.
3 | #
4 | # # NLCPy License #
5 | #
6 | # Copyright (c) 2020 NEC Corporation
7 | # All rights reserved.
8 | #
9 | # Redistribution and use in source and binary forms, with or without
10 | # modification, are permitted provided that the following conditions are met:
11 | # * Redistributions of source code must retain the above copyright notice,
12 | # this list of conditions and the following disclaimer.
13 | # * Redistributions in binary form must reproduce the above copyright notice,
14 | # this list of conditions and the following disclaimer in the documentation
15 | # and/or other materials provided with the distribution.
16 | # * Neither NEC Corporation nor the names of its contributors may be
17 | # used to endorse or promote products derived from this software
18 | # without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | #
31 |
32 | from nlcpy.core.core cimport ndarray
33 |
34 | cpdef ndarray cblas_dot(ndarray a, ndarray b, out=*)
35 | cpdef ndarray cblas_gemm(ndarray x, ndarray y, out=*, order=*, dtype=*)
36 |
--------------------------------------------------------------------------------
/nlcpy/linalg/util.py:
--------------------------------------------------------------------------------
1 | from nlcpy.linalg import LinAlgError
2 |
3 |
4 | def _assertRank2(*arrays):
5 | for a in arrays:
6 | if a.ndim != 2:
7 | raise LinAlgError('%d-dimensional array given. '
8 | 'Array must be two-dimensional' % a.ndim)
9 |
10 |
11 | def _assertRankAtLeast2(*arrays):
12 | for a in arrays:
13 | if a.ndim < 2:
14 | raise LinAlgError('%d-dimensional array given. '
15 | 'Array must be at least two-dimensional' % a.ndim)
16 |
17 |
18 | def _assertNdSquareness(*arrays):
19 | for a in arrays:
20 | if a.shape[-1] != a.shape[-2]:
21 | raise LinAlgError('Last 2 dimensions of the array must be square')
22 |
23 |
24 | # closure for callback
25 | def _assertNotSingular(info):
26 | def _info_check(*args):
27 | if info > 0:
28 | raise LinAlgError('Singular matrix')
29 | return _info_check
30 |
31 |
32 | # closure for callback
33 | def _assertPositiveDefinite(info):
34 | def _info_check(*args):
35 | if info > 0:
36 | raise LinAlgError('Matrix is not positive definite')
37 | return _info_check
38 |
--------------------------------------------------------------------------------
/nlcpy/logic/__init__.py:
--------------------------------------------------------------------------------
1 | #
2 | # * The source code in this file is developed independently by NEC Corporation.
3 | #
4 | # # NLCPy License #
5 | #
6 | # Copyright (c) 2020 NEC Corporation
7 | # All rights reserved.
8 | #
9 | # Redistribution and use in source and binary forms, with or without
10 | # modification, are permitted provided that the following conditions are met:
11 | # * Redistributions of source code must retain the above copyright notice,
12 | # this list of conditions and the following disclaimer.
13 | # * Redistributions in binary form must reproduce the above copyright notice,
14 | # this list of conditions and the following disclaimer in the documentation
15 | # and/or other materials provided with the distribution.
16 | # * Neither NEC Corporation nor the names of its contributors may be
17 | # used to endorse or promote products derived from this software
18 | # without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | #
31 | from nlcpy.logic import testing # NOQA
32 |
--------------------------------------------------------------------------------
/nlcpy/ma/__init__.py:
--------------------------------------------------------------------------------
1 | #
2 | # * The source code in this file is developed independently by NEC Corporation.
3 | #
4 | # # NLCPy License #
5 | #
6 | # Copyright (c) 2020 NEC Corporation
7 | # All rights reserved.
8 | #
9 | # Redistribution and use in source and binary forms, with or without
10 | # modification, are permitted provided that the following conditions are met:
11 | # * Redistributions of source code must retain the above copyright notice,
12 | # this list of conditions and the following disclaimer.
13 | # * Redistributions in binary form must reproduce the above copyright notice,
14 | # this list of conditions and the following disclaimer in the documentation
15 | # and/or other materials provided with the distribution.
16 | # * Neither NEC Corporation nor the names of its contributors may be
17 | # used to endorse or promote products derived from this software
18 | # without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | #
31 | from nlcpy.ma.core import * # NOQA
32 |
--------------------------------------------------------------------------------
/nlcpy/manipulation/__init__.py:
--------------------------------------------------------------------------------
1 | #
2 | # * The source code in this file is developed independently by NEC Corporation.
3 | #
4 | # # NLCPy License #
5 | #
6 | # Copyright (c) 2020 NEC Corporation
7 | # All rights reserved.
8 | #
9 | # Redistribution and use in source and binary forms, with or without
10 | # modification, are permitted provided that the following conditions are met:
11 | # * Redistributions of source code must retain the above copyright notice,
12 | # this list of conditions and the following disclaimer.
13 | # * Redistributions in binary form must reproduce the above copyright notice,
14 | # this list of conditions and the following disclaimer in the documentation
15 | # and/or other materials provided with the distribution.
16 | # * Neither NEC Corporation nor the names of its contributors may be
17 | # used to endorse or promote products derived from this software
18 | # without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | #
31 | from nlcpy.manipulation import shape # NOQA
32 | from nlcpy.manipulation import join # NOQA
33 | from nlcpy.manipulation import dims # NOQA
34 | from nlcpy.manipulation import basic # NOQA
35 | from nlcpy.manipulation import trans # NOQA
36 | from nlcpy.manipulation import add_remove # NOQA
37 | from nlcpy.manipulation import tiling # NOQA
38 | from nlcpy.manipulation import split # NOQA
39 |
--------------------------------------------------------------------------------
/nlcpy/math/__init__.py:
--------------------------------------------------------------------------------
1 | #
2 | # * The source code in this file is developed independently by NEC Corporation.
3 | #
4 | # # NLCPy License #
5 | #
6 | # Copyright (c) 2020 NEC Corporation
7 | # All rights reserved.
8 | #
9 | # Redistribution and use in source and binary forms, with or without
10 | # modification, are permitted provided that the following conditions are met:
11 | # * Redistributions of source code must retain the above copyright notice,
12 | # this list of conditions and the following disclaimer.
13 | # * Redistributions in binary form must reproduce the above copyright notice,
14 | # this list of conditions and the following disclaimer in the documentation
15 | # and/or other materials provided with the distribution.
16 | # * Neither NEC Corporation nor the names of its contributors may be
17 | # used to endorse or promote products derived from this software
18 | # without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | #
31 | # from nlcpy.ufunc import ufunc # NOQA
32 | from nlcpy.math import math # NOQA
33 |
--------------------------------------------------------------------------------
/nlcpy/mempool/__init__.py:
--------------------------------------------------------------------------------
1 | #
2 | # * The source code in this file is developed independently by NEC Corporation.
3 | #
4 | # # NLCPy License #
5 | #
6 | # Copyright (c) 2020 NEC Corporation
7 | # All rights reserved.
8 | #
9 | # Redistribution and use in source and binary forms, with or without
10 | # modification, are permitted provided that the following conditions are met:
11 | # * Redistributions of source code must retain the above copyright notice,
12 | # this list of conditions and the following disclaimer.
13 | # * Redistributions in binary form must reproduce the above copyright notice,
14 | # this list of conditions and the following disclaimer in the documentation
15 | # and/or other materials provided with the distribution.
16 | # * Neither NEC Corporation nor the names of its contributors may be
17 | # used to endorse or promote products derived from this software
18 | # without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | #
31 |
32 | from nlcpy.mempool.mempool import MemPool # NOQA
33 | from nlcpy.mempool.mempool import _get_default_pool_size # NOQA
34 |
--------------------------------------------------------------------------------
/nlcpy/prof/__init__.py:
--------------------------------------------------------------------------------
1 | #
2 | # * The source code in this file is developed independently by NEC Corporation.
3 | #
4 | # # NLCPy License #
5 | #
6 | # Copyright (c) 2020 NEC Corporation
7 | # All rights reserved.
8 | #
9 | # Redistribution and use in source and binary forms, with or without
10 | # modification, are permitted provided that the following conditions are met:
11 | # * Redistributions of source code must retain the above copyright notice,
12 | # this list of conditions and the following disclaimer.
13 | # * Redistributions in binary form must reproduce the above copyright notice,
14 | # this list of conditions and the following disclaimer in the documentation
15 | # and/or other materials provided with the distribution.
16 | # * Neither NEC Corporation nor the names of its contributors may be
17 | # used to endorse or promote products derived from this software
18 | # without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | #
31 |
32 | from nlcpy.prof.prof import start_profiling # NOQA
33 | from nlcpy.prof.prof import stop_profiling # NOQA
34 | from nlcpy.prof.prof import print_run_stats # NOQA
35 | from nlcpy.prof.prof import get_run_stats # NOQA
36 | from nlcpy.prof.prof import ftrace_region_begin # NOQA
37 | from nlcpy.prof.prof import ftrace_region_end # NOQA
38 | from nlcpy.prof.prof import ftrace_region # NOQA
39 |
--------------------------------------------------------------------------------
/nlcpy/random/libgenerator.pxd:
--------------------------------------------------------------------------------
1 | #
2 | # Interface to generator
3 | #
4 |
5 | cdef extern from "asl.h":
6 | cdef enum: ASL_ERROR_OK
7 | cdef enum: ASL_ERROR_ARGUMENT
8 | cdef enum: ASL_ERROR_MEMORY
9 | cdef enum: ASL_ERROR_THREAD
10 | cdef enum: ASL_ERROR_MPI
11 | cdef enum: ASL_ERROR_OVERFLOW
12 | cdef enum: ASL_ERROR_UNSUPPORTED
13 | cdef enum: ASL_ERROR_LIBRARY_UNINITIALIZED
14 | cdef enum: ASL_ERROR_LIBRARY_INITIALIZED
15 | cdef enum: ASL_ERROR_MATRIX_INVALID
16 | cdef enum: ASL_ERROR_MATRIX_DUPLICATE_ELEMENTS
17 | cdef enum: ASL_ERROR_MATRIX_INCOMPATIBLE_TYPE
18 | cdef enum: ASL_ERROR_MATRIX_INCOMPATIBLE_SIZE
19 | cdef enum: ASL_ERROR_MATRIX_NOT_SQUARE
20 | cdef enum: ASL_ERROR_MATRIX_NOT_REGULAR
21 | cdef enum: ASL_ERROR_MATRIX_NOT_SYMMETRIC
22 | cdef enum: ASL_ERROR_LINEARSOLVER_INVALID
23 | cdef enum: ASL_ERROR_LINEARSOLVER_IMPROPER_METHOD
24 | cdef enum: ASL_ERROR_LINEARSOLVER_BAD_CONDITION
25 | cdef enum: ASL_ERROR_LINEARSOLVER_NOT_CONVERGED
26 | cdef enum: ASL_ERROR_EIGENSOLVER_INVALID
27 | cdef enum: ASL_ERROR_EIGENSOLVER_IMPROPER_METHOD
28 | cdef enum: ASL_ERROR_EIGENSOLVER_BAD_CONDITION
29 | cdef enum: ASL_ERROR_EIGENSOLVER_NOT_CONVERGED
30 | cdef enum: ASL_ERROR_FFT_INVALID
31 | cdef enum: ASL_ERROR_FFT_INCOMPATIBLE_CALL
32 | cdef enum: ASL_ERROR_RANDOM_INVALID
33 | cdef enum: ASL_ERROR_RANDOM_INCOMPATIBLE_CALL
34 | cdef enum: ASL_ERROR_SORT_INVALID
35 | cdef enum: ASL_ERROR_SORT_INCOMPATIBLE_CALL
36 | cdef enum: ASL_ERROR_INTERNAL
37 |
--------------------------------------------------------------------------------
/nlcpy/request/__init__.py:
--------------------------------------------------------------------------------
1 | #
2 | # * The source code in this file is developed independently by NEC Corporation.
3 | #
4 | # # NLCPy License #
5 | #
6 | # Copyright (c) 2020 NEC Corporation
7 | # All rights reserved.
8 | #
9 | # Redistribution and use in source and binary forms, with or without
10 | # modification, are permitted provided that the following conditions are met:
11 | # * Redistributions of source code must retain the above copyright notice,
12 | # this list of conditions and the following disclaimer.
13 | # * Redistributions in binary form must reproduce the above copyright notice,
14 | # this list of conditions and the following disclaimer in the documentation
15 | # and/or other materials provided with the distribution.
16 | # * Neither NEC Corporation nor the names of its contributors may be
17 | # used to endorse or promote products derived from this software
18 | # without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | #
31 |
32 | from nlcpy.request import request # NOQA
33 | from nlcpy.request.request import flush # NOQA
34 | from nlcpy.request.request import set_offload_timing_onthefly # NOQA
35 | from nlcpy.request.request import set_offload_timing_lazy # NOQA
36 | from nlcpy.request.request import get_offload_timing # NOQA
37 | from nlcpy.request.request import set_max_request # NOQA
38 |
--------------------------------------------------------------------------------
/nlcpy/sca/__init__.py:
--------------------------------------------------------------------------------
1 | #
2 | # * The source code in this file is developed independently by NEC Corporation.
3 | #
4 | # # NLCPy License #
5 | #
6 | # Copyright (c) 2020 NEC Corporation
7 | # All rights reserved.
8 | #
9 | # Redistribution and use in source and binary forms, with or without
10 | # modification, are permitted provided that the following conditions are met:
11 | # * Redistributions of source code must retain the above copyright notice,
12 | # this list of conditions and the following disclaimer.
13 | # * Redistributions in binary form must reproduce the above copyright notice,
14 | # this list of conditions and the following disclaimer in the documentation
15 | # and/or other materials provided with the distribution.
16 | # * Neither NEC Corporation nor the names of its contributors may be
17 | # used to endorse or promote products derived from this software
18 | # without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | #
31 |
32 | from nlcpy.sca.utility import convert_optimized_array # NOQA
33 | from nlcpy.sca.utility import create_optimized_array # NOQA
34 | from nlcpy.sca.utility import batch_run # NOQA
35 | from nlcpy.sca.utility import create_descriptor # NOQA
36 | from nlcpy.sca.utility import empty_description # NOQA
37 | from nlcpy.sca.utility import create_kernel # NOQA
38 | from nlcpy.sca.utility import destroy_kernel # NOQA
39 |
--------------------------------------------------------------------------------
/nlcpy/sca/descriptor.pxd:
--------------------------------------------------------------------------------
1 | #
2 | # * The source code in this file is developed independently by NEC Corporation.
3 | #
4 | # # NLCPy License #
5 | #
6 | # Copyright (c) 2020 NEC Corporation
7 | # All rights reserved.
8 | #
9 | # Redistribution and use in source and binary forms, with or without
10 | # modification, are permitted provided that the following conditions are met:
11 | # * Redistributions of source code must retain the above copyright notice,
12 | # this list of conditions and the following disclaimer.
13 | # * Redistributions in binary form must reproduce the above copyright notice,
14 | # this list of conditions and the following disclaimer in the documentation
15 | # and/or other materials provided with the distribution.
16 | # * Neither NEC Corporation nor the names of its contributors may be
17 | # used to endorse or promote products derived from this software
18 | # without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | #
31 |
32 | from nlcpy.core.core cimport ndarray
33 | from libc.stdint cimport *
34 |
35 |
36 | cdef class descriptor:
37 | cdef:
38 | readonly ndarray arr
39 |
--------------------------------------------------------------------------------
/nlcpy/sca/handle.pxd:
--------------------------------------------------------------------------------
1 | #
2 | # * The source code in this file is developed independently by NEC Corporation.
3 | #
4 | # # NLCPy License #
5 | #
6 | # Copyright (c) 2020 NEC Corporation
7 | # All rights reserved.
8 | #
9 | # Redistribution and use in source and binary forms, with or without
10 | # modification, are permitted provided that the following conditions are met:
11 | # * Redistributions of source code must retain the above copyright notice,
12 | # this list of conditions and the following disclaimer.
13 | # * Redistributions in binary form must reproduce the above copyright notice,
14 | # this list of conditions and the following disclaimer in the documentation
15 | # and/or other materials provided with the distribution.
16 | # * Neither NEC Corporation nor the names of its contributors may be
17 | # used to endorse or promote products derived from this software
18 | # without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | #
31 |
32 | from nlcpy.core.core cimport ndarray
33 | from libc.stdint cimport *
34 | from nlcpy.sca.description cimport description
35 |
36 | cdef class sca_handle:
37 | cdef:
38 | readonly ndarray hnd_adr
39 | readonly object dtype
40 | readonly description desc_i
41 | readonly description desc_o
42 | readonly object destroyed
43 |
--------------------------------------------------------------------------------
/nlcpy/sca/kernel.pxd:
--------------------------------------------------------------------------------
1 | #
2 | # * The source code in this file is developed independently by NEC Corporation.
3 | #
4 | # # NLCPy License #
5 | #
6 | # Copyright (c) 2020 NEC Corporation
7 | # All rights reserved.
8 | #
9 | # Redistribution and use in source and binary forms, with or without
10 | # modification, are permitted provided that the following conditions are met:
11 | # * Redistributions of source code must retain the above copyright notice,
12 | # this list of conditions and the following disclaimer.
13 | # * Redistributions in binary form must reproduce the above copyright notice,
14 | # this list of conditions and the following disclaimer in the documentation
15 | # and/or other materials provided with the distribution.
16 | # * Neither NEC Corporation nor the names of its contributors may be
17 | # used to endorse or promote products derived from this software
18 | # without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | #
31 |
32 | from nlcpy.core.core cimport ndarray
33 | from libc.stdint cimport *
34 | from nlcpy.sca.description cimport description
35 |
36 | cdef class kernel:
37 | cdef:
38 | readonly ndarray code_adr
39 | readonly ndarray out
40 | readonly description desc_i
41 | readonly description desc_o
42 | readonly object destroyed
43 |
--------------------------------------------------------------------------------
/nlcpy/sca/utility.pxd:
--------------------------------------------------------------------------------
1 | #
2 | # * The source code in this file is developed independently by NEC Corporation.
3 | #
4 | # # NLCPy License #
5 | #
6 | # Copyright (c) 2020 NEC Corporation
7 | # All rights reserved.
8 | #
9 | # Redistribution and use in source and binary forms, with or without
10 | # modification, are permitted provided that the following conditions are met:
11 | # * Redistributions of source code must retain the above copyright notice,
12 | # this list of conditions and the following disclaimer.
13 | # * Redistributions in binary form must reproduce the above copyright notice,
14 | # this list of conditions and the following disclaimer in the documentation
15 | # and/or other materials provided with the distribution.
16 | # * Neither NEC Corporation nor the names of its contributors may be
17 | # used to endorse or promote products derived from this software
18 | # without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | #
31 |
32 | from nlcpy.core.core cimport ndarray
33 | from nlcpy.sca.description cimport description
34 |
35 |
36 | cpdef create_descriptor(arrays)
37 | cpdef empty_description()
38 | cpdef create_kernel(description desc_i, description desc_o=*)
39 | cpdef ndarray convert_optimized_array(a, dtype=*)
40 | cpdef ndarray create_optimized_array(shape, dtype=*)
41 | cpdef batch_run(kernels, int iteration)
42 |
--------------------------------------------------------------------------------
/nlcpy/sorting/__init__.py:
--------------------------------------------------------------------------------
1 | #
2 | # * The source code in this file is developed independently by NEC Corporation.
3 | #
4 | # # NLCPy License #
5 | #
6 | # Copyright (c) 2020 NEC Corporation
7 | # All rights reserved.
8 | #
9 | # Redistribution and use in source and binary forms, with or without
10 | # modification, are permitted provided that the following conditions are met:
11 | # * Redistributions of source code must retain the above copyright notice,
12 | # this list of conditions and the following disclaimer.
13 | # * Redistributions in binary form must reproduce the above copyright notice,
14 | # this list of conditions and the following disclaimer in the documentation
15 | # and/or other materials provided with the distribution.
16 | # * Neither NEC Corporation nor the names of its contributors may be
17 | # used to endorse or promote products derived from this software
18 | # without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | #
31 | from nlcpy.sorting import sort # NOQA
32 | from nlcpy.sorting import count # NOQA
33 | from nlcpy.sorting import search # NOQA
34 |
--------------------------------------------------------------------------------
/nlcpy/statistics/__init__.py:
--------------------------------------------------------------------------------
1 | from nlcpy.statistics import order # NOQA
2 | from nlcpy.statistics import average # NOQA
3 | from nlcpy.statistics import correlating # NOQA
4 | from nlcpy.statistics import histograms # NOQA
5 |
--------------------------------------------------------------------------------
/nlcpy/ufuncs/__init__.py:
--------------------------------------------------------------------------------
1 | #
2 | # * The source code in this file is developed independently by NEC Corporation.
3 | #
4 | # # NLCPy License #
5 | #
6 | # Copyright (c) 2020 NEC Corporation
7 | # All rights reserved.
8 | #
9 | # Redistribution and use in source and binary forms, with or without
10 | # modification, are permitted provided that the following conditions are met:
11 | # * Redistributions of source code must retain the above copyright notice,
12 | # this list of conditions and the following disclaimer.
13 | # * Redistributions in binary form must reproduce the above copyright notice,
14 | # this list of conditions and the following disclaimer in the documentation
15 | # and/or other materials provided with the distribution.
16 | # * Neither NEC Corporation nor the names of its contributors may be
17 | # used to endorse or promote products derived from this software
18 | # without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | #
31 | from nlcpy.ufuncs.ufuncs import ufunc # NOQA
32 | from nlcpy.ufuncs.operations import * # NOQA
33 |
--------------------------------------------------------------------------------
/nlcpy/ufuncs/accumulate.pxd:
--------------------------------------------------------------------------------
1 | #
2 | # * The source code in this file is developed independently by NEC Corporation.
3 | #
4 | # # NLCPy License #
5 | #
6 | # Copyright (c) 2020 NEC Corporation
7 | # All rights reserved.
8 | #
9 | # Redistribution and use in source and binary forms, with or without
10 | # modification, are permitted provided that the following conditions are met:
11 | # * Redistributions of source code must retain the above copyright notice,
12 | # this list of conditions and the following disclaimer.
13 | # * Redistributions in binary form must reproduce the above copyright notice,
14 | # this list of conditions and the following disclaimer in the documentation
15 | # and/or other materials provided with the distribution.
16 | # * Neither NEC Corporation nor the names of its contributors may be
17 | # used to endorse or promote products derived from this software
18 | # without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | #
31 | cpdef accumulate_core(name, a, axis=*, dtype=*, out=*)
32 |
--------------------------------------------------------------------------------
/nlcpy/ufuncs/macros.m4:
--------------------------------------------------------------------------------
1 | ../include/macros.m4
--------------------------------------------------------------------------------
/nlcpy/ufuncs/outer.pxd:
--------------------------------------------------------------------------------
1 | #
2 | # * The source code in this file is developed independently by NEC Corporation.
3 | #
4 | # # NLCPy License #
5 | #
6 | # Copyright (c) 2020 NEC Corporation
7 | # All rights reserved.
8 | #
9 | # Redistribution and use in source and binary forms, with or without
10 | # modification, are permitted provided that the following conditions are met:
11 | # * Redistributions of source code must retain the above copyright notice,
12 | # this list of conditions and the following disclaimer.
13 | # * Redistributions in binary form must reproduce the above copyright notice,
14 | # this list of conditions and the following disclaimer in the documentation
15 | # and/or other materials provided with the distribution.
16 | # * Neither NEC Corporation nor the names of its contributors may be
17 | # used to endorse or promote products derived from this software
18 | # without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | #
31 | cpdef outer_core(name, A, B, out=*, where=*, casting=*, order=*, dtype=*, subok=*)
32 |
--------------------------------------------------------------------------------
/nlcpy/ufuncs/param.pxi:
--------------------------------------------------------------------------------
1 | ../include/param.pxi
--------------------------------------------------------------------------------
/nlcpy/ufuncs/reduce.pxd:
--------------------------------------------------------------------------------
1 | #
2 | # * The source code in this file is developed independently by NEC Corporation.
3 | #
4 | # # NLCPy License #
5 | #
6 | # Copyright (c) 2020 NEC Corporation
7 | # All rights reserved.
8 | #
9 | # Redistribution and use in source and binary forms, with or without
10 | # modification, are permitted provided that the following conditions are met:
11 | # * Redistributions of source code must retain the above copyright notice,
12 | # this list of conditions and the following disclaimer.
13 | # * Redistributions in binary form must reproduce the above copyright notice,
14 | # this list of conditions and the following disclaimer in the documentation
15 | # and/or other materials provided with the distribution.
16 | # * Neither NEC Corporation nor the names of its contributors may be
17 | # used to endorse or promote products derived from this software
18 | # without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | #
31 | cpdef reduce_core(name, a, axis=*, dtype=*, out=*, keepdims=*, initial=*, where=*)
32 |
--------------------------------------------------------------------------------
/nlcpy/ufuncs/reduceat.pxd:
--------------------------------------------------------------------------------
1 | #
2 | # * The source code in this file is developed independently by NEC Corporation.
3 | #
4 | # # NLCPy License #
5 | #
6 | # Copyright (c) 2020 NEC Corporation
7 | # All rights reserved.
8 | #
9 | # Redistribution and use in source and binary forms, with or without
10 | # modification, are permitted provided that the following conditions are met:
11 | # * Redistributions of source code must retain the above copyright notice,
12 | # this list of conditions and the following disclaimer.
13 | # * Redistributions in binary form must reproduce the above copyright notice,
14 | # this list of conditions and the following disclaimer in the documentation
15 | # and/or other materials provided with the distribution.
16 | # * Neither NEC Corporation nor the names of its contributors may be
17 | # used to endorse or promote products derived from this software
18 | # without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | #
31 | cpdef reduceat_core(name, a, indices, axis=*, dtype=*, out=*)
32 |
--------------------------------------------------------------------------------
/nlcpy/ufuncs/ufuncs.pxd:
--------------------------------------------------------------------------------
1 | #
2 | # * The source code in this file is developed independently by NEC Corporation.
3 | #
4 | # # NLCPy License #
5 | #
6 | # Copyright (c) 2020 NEC Corporation
7 | # All rights reserved.
8 | #
9 | # Redistribution and use in source and binary forms, with or without
10 | # modification, are permitted provided that the following conditions are met:
11 | # * Redistributions of source code must retain the above copyright notice,
12 | # this list of conditions and the following disclaimer.
13 | # * Redistributions in binary form must reproduce the above copyright notice,
14 | # this list of conditions and the following disclaimer in the documentation
15 | # and/or other materials provided with the distribution.
16 | # * Neither NEC Corporation nor the names of its contributors may be
17 | # used to endorse or promote products derived from this software
18 | # without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | #
31 | cpdef create_ufunc(name, types_g, err_func, default_casting=*, doc=*)
32 |
--------------------------------------------------------------------------------
/nlcpy/ve_kernel/macros.m4:
--------------------------------------------------------------------------------
1 | ../include/macros.m4
--------------------------------------------------------------------------------
/nlcpy/ve_kernel/nlcpy_profiling.c:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # * The source code in this file is developed independently by NEC Corporation.
4 | #
5 | # # NLCPy License #
6 | #
7 | # Copyright (c) 2020 NEC Corporation
8 | # All rights reserved.
9 | #
10 | # Redistribution and use in source and binary forms, with or without
11 | # modification, are permitted provided that the following conditions are met:
12 | # * Redistributions of source code must retain the above copyright notice,
13 | # this list of conditions and the following disclaimer.
14 | # * Redistributions in binary form must reproduce the above copyright notice,
15 | # this list of conditions and the following disclaimer in the documentation
16 | # and/or other materials provided with the distribution.
17 | # * Neither NEC Corporation nor the names of its contributors may be
18 | # used to endorse or promote products derived from this software
19 | # without specific prior written permission.
20 | #
21 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
22 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
25 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
28 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 | #
32 | */
33 | #include
34 |
35 | extern int ftrace_region_begin(const char *id);
36 | extern int ftrace_region_end(const char *id);
37 |
38 | void nlcpy_profiling_region_begin(char *id) {
39 | ftrace_region_begin(id);
40 | }
41 |
42 | void nlcpy_profiling_region_end(char *id) {
43 | ftrace_region_end(id);
44 | }
45 |
--------------------------------------------------------------------------------
/nlcpy/ve_kernel/xerbla.c:
--------------------------------------------------------------------------------
1 | /*
2 | #
3 | # * The source code in this file is developed independently by NEC Corporation.
4 | #
5 | # # NLCPy License #
6 | #
7 | # Copyright (c) 2020 NEC Corporation
8 | # All rights reserved.
9 | #
10 | # Redistribution and use in source and binary forms, with or without
11 | # modification, are permitted provided that the following conditions are met:
12 | # * Redistributions of source code must retain the above copyright notice,
13 | # this list of conditions and the following disclaimer.
14 | # * Redistributions in binary form must reproduce the above copyright notice,
15 | # this list of conditions and the following disclaimer in the documentation
16 | # and/or other materials provided with the distribution.
17 | # * Neither NEC Corporation nor the names of its contributors may be
18 | # used to endorse or promote products derived from this software
19 | # without specific prior written permission.
20 | #
21 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
22 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
25 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
28 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 | #
32 | */
33 |
34 | #include
35 | #include
36 |
37 | void xerbla_(char* srname, int* info){
38 | }
39 |
--------------------------------------------------------------------------------
/nlcpy/ve_types/ve_types.py:
--------------------------------------------------------------------------------
1 | #
2 | # * The source code in this file is developed independently by NEC Corporation.
3 | #
4 | # # NLCPy License #
5 | #
6 | # Copyright (c) 2020 NEC Corporation
7 | # All rights reserved.
8 | #
9 | # Redistribution and use in source and binary forms, with or without
10 | # modification, are permitted provided that the following conditions are met:
11 | # * Redistributions of source code must retain the above copyright notice,
12 | # this list of conditions and the following disclaimer.
13 | # * Redistributions in binary form must reproduce the above copyright notice,
14 | # this list of conditions and the following disclaimer in the documentation
15 | # and/or other materials provided with the distribution.
16 | # * Neither NEC Corporation nor the names of its contributors may be
17 | # used to endorse or promote products derived from this software
18 | # without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | #
31 |
32 |
33 | void = 'void'
34 | char = 'char'
35 | int32 = 'int32_t'
36 | int64 = 'int64_t'
37 | uint32 = 'uint32_t'
38 | uint64 = 'uint64_t'
39 | float32 = 'float'
40 | float64 = 'double'
41 | void_p = 'void *'
42 |
--------------------------------------------------------------------------------
/nlcpy/venode/__init__.py:
--------------------------------------------------------------------------------
1 | #
2 | # * The source code in this file is based on the soure code of PyVEO.
3 | #
4 | # # NLCPy License #
5 | #
6 | # Copyright (c) 2020 NEC Corporation
7 | # All rights reserved.
8 | #
9 | # Redistribution and use in source and binary forms, with or without
10 | # modification, are permitted provided that the following conditions are met:
11 | # * Redistributions of source code must retain the above copyright notice,
12 | # this list of conditions and the following disclaimer.
13 | # * Redistributions in binary form must reproduce the above copyright notice,
14 | # this list of conditions and the following disclaimer in the documentation
15 | # and/or other materials provided with the distribution.
16 | # * Neither NEC Corporation nor the names of its contributors may be
17 | # used to endorse or promote products derived from this software
18 | # without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | #
31 |
32 | from nlcpy.venode._venode import get_num_available_venodes # NOQA
33 | from nlcpy.venode._venode import transfer_array # NOQA
34 | from nlcpy.venode._venode import VE # NOQA
35 | from nlcpy.venode._venode import VENode # NOQA
36 | from nlcpy.venode._venode import synchronize_all_ve # NOQA
37 |
--------------------------------------------------------------------------------
/nlcpy/veo/__init__.py:
--------------------------------------------------------------------------------
1 | #
2 | # * The source code in this file is based on the soure code of PyVEO.
3 | #
4 | # # NLCPy License #
5 | #
6 | # Copyright (c) 2020 NEC Corporation
7 | # All rights reserved.
8 | #
9 | # Redistribution and use in source and binary forms, with or without
10 | # modification, are permitted provided that the following conditions are met:
11 | # * Redistributions of source code must retain the above copyright notice,
12 | # this list of conditions and the following disclaimer.
13 | # * Redistributions in binary form must reproduce the above copyright notice,
14 | # this list of conditions and the following disclaimer in the documentation
15 | # and/or other materials provided with the distribution.
16 | # * Neither NEC Corporation nor the names of its contributors may be
17 | # used to endorse or promote products derived from this software
18 | # without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | #
31 |
32 | from nlcpy.veo._veo import * # NOQA
33 | from nlcpy.veo.vebuild import * # NOQA
34 |
--------------------------------------------------------------------------------
/nlcpy/veosinfo/__init__.py:
--------------------------------------------------------------------------------
1 | #
2 | # * The source code in this file is developed independently by NEC Corporation.
3 | #
4 | # # NLCPy License #
5 | #
6 | # Copyright (c) 2020 NEC Corporation
7 | # All rights reserved.
8 | #
9 | # Redistribution and use in source and binary forms, with or without
10 | # modification, are permitted provided that the following conditions are met:
11 | # * Redistributions of source code must retain the above copyright notice,
12 | # this list of conditions and the following disclaimer.
13 | # * Redistributions in binary form must reproduce the above copyright notice,
14 | # this list of conditions and the following disclaimer in the documentation
15 | # and/or other materials provided with the distribution.
16 | # * Neither NEC Corporation nor the names of its contributors may be
17 | # used to endorse or promote products derived from this software
18 | # without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | #
31 |
32 |
33 | from nlcpy.veosinfo._veosinfo import check_node_status # NOQA
34 | from nlcpy.veosinfo._veosinfo import mem_info # NOQA
35 | from nlcpy.veosinfo._veosinfo import node_info # NOQA
36 |
--------------------------------------------------------------------------------
/nlcpy/wrapper/__init__.py:
--------------------------------------------------------------------------------
1 | #
2 | # * The source code in this file is developed independently by NEC Corporation.
3 | #
4 | # # NLCPy License #
5 | #
6 | # Copyright (c) 2020 NEC Corporation
7 | # All rights reserved.
8 | #
9 | # Redistribution and use in source and binary forms, with or without
10 | # modification, are permitted provided that the following conditions are met:
11 | # * Redistributions of source code must retain the above copyright notice,
12 | # this list of conditions and the following disclaimer.
13 | # * Redistributions in binary form must reproduce the above copyright notice,
14 | # this list of conditions and the following disclaimer in the documentation
15 | # and/or other materials provided with the distribution.
16 | # * Neither NEC Corporation nor the names of its contributors may be
17 | # used to endorse or promote products derived from this software
18 | # without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | #
31 |
32 | from nlcpy.wrapper import numpy_wrap # NOQA
33 |
--------------------------------------------------------------------------------
/nlcpy_ve1_kernel/__init__.py:
--------------------------------------------------------------------------------
1 | import os
2 |
3 |
4 | def get_kernel_path():
5 | return os.path.abspath(os.path.dirname(__file__))
6 |
--------------------------------------------------------------------------------
/nlcpy_ve3_kernel/__init__.py:
--------------------------------------------------------------------------------
1 | import os
2 |
3 |
4 | def get_kernel_path():
5 | return os.path.abspath(os.path.dirname(__file__))
6 |
--------------------------------------------------------------------------------
/requirements/requirements_build.txt:
--------------------------------------------------------------------------------
1 | numpy
2 | cython
3 | wheel
4 |
--------------------------------------------------------------------------------
/requirements/requirements_doc.txt:
--------------------------------------------------------------------------------
1 | numpy
2 | scipy
3 | matplotlib
4 | sphinx == 4.2.0
5 | sphinx-intl
6 | sphinx_rtd_theme
7 |
--------------------------------------------------------------------------------
/requirements/requirements_run.txt:
--------------------------------------------------------------------------------
1 | numpy
2 | pytest
3 | pytest-cov
4 | tox
5 |
--------------------------------------------------------------------------------
/scripts/clean.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | BASEDIR=$1
4 |
5 | cd ${BASEDIR}
6 |
7 | find . -type d -name __pycache__ | xargs rm -rf
8 |
9 | FILES=`find . -type f -name "*.pyx"`
10 | for f_pyx in $FILES; do
11 | dir=`dirname $f_pyx`
12 | f_prefix=$dir/`basename $f_pyx .pyx`
13 | rm -rf $f_prefix\.*\.so $f_prefix\.cpp $f_prefix\.c
14 | done
15 |
--------------------------------------------------------------------------------
/scripts/m4_conv.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | cd nlcpy/ve_kernel
4 | FILES=`find . -name "*.m4" | xargs -I {} basename {}`
5 |
6 | # echo $FILES
7 | ext="macros.m4"
8 |
9 | for f_m4 in $FILES; do
10 | if [ $f_m4 != "macros.m4" ]; then
11 | f_base=`basename $f_m4 .m4`
12 | m4 $f_m4 > $f_base
13 | fi
14 | done
15 |
--------------------------------------------------------------------------------
/scripts/make_dep.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/bash
2 | FILE=make.dep
3 | for i in *.[ch] *.master
4 | do
5 | (echo $i:; grep -h "#include" $i |grep "\"" |perl -pe s"/(.*)\"(.*)\"(.*)/\2/" )| perl -pe 's/\n/ /g' ; echo
6 | done > $FILE
7 |
--------------------------------------------------------------------------------
/tests/pytest/core_tests/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SX-Aurora/nlcpy/78534eb1695863dfe6e731b8f1e8156061c8a988/tests/pytest/core_tests/__init__.py
--------------------------------------------------------------------------------
/tests/pytest/creation_tests/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SX-Aurora/nlcpy/78534eb1695863dfe6e731b8f1e8156061c8a988/tests/pytest/creation_tests/__init__.py
--------------------------------------------------------------------------------
/tests/pytest/err_handler_tests/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SX-Aurora/nlcpy/78534eb1695863dfe6e731b8f1e8156061c8a988/tests/pytest/err_handler_tests/__init__.py
--------------------------------------------------------------------------------
/tests/pytest/fft_tests/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SX-Aurora/nlcpy/78534eb1695863dfe6e731b8f1e8156061c8a988/tests/pytest/fft_tests/__init__.py
--------------------------------------------------------------------------------
/tests/pytest/fft_tests/test_hfft.py:
--------------------------------------------------------------------------------
1 | import functools # NOQA
2 | import unittest
3 | import pytest # NOQA
4 |
5 | import numpy as np
6 |
7 | import nlcpy # NOQA
8 | from nlcpy import testing
9 | from nlcpy.testing import ( # NOQA
10 | assert_array_equal, assert_allclose)
11 |
12 |
13 | @testing.parameterize(
14 | *testing.product(
15 | {
16 | 'n': [None, 5, 10, 15],
17 | 'shape': [(10,), (10, 10)],
18 | 'axis': [-1, 0],
19 | 'norm': [None, 'ortho'],
20 | }
21 | )
22 | )
23 | @testing.with_requires('numpy>=1.10.0')
24 | class TestHfft(unittest.TestCase):
25 |
26 | @testing.for_all_dtypes()
27 | @testing.numpy_nlcpy_allclose(rtol=1e-3, atol=1e-7, contiguous_check=False)
28 | def test_hfft(self, xp, dtype):
29 | a = testing.shaped_random(self.shape, xp, dtype)
30 | tmp = a.copy()
31 | out = xp.fft.hfft(a, n=self.n, axis=self.axis, norm=self.norm)
32 | assert_allclose(a, tmp)
33 |
34 | # if xp == np and dtype in [np.float16, np.float32, np.complex64]:
35 | # out = out.astype(np.float32)
36 | if out.dtype in [np.float16, np.float32]:
37 | out = out.astype(np.float64)
38 |
39 | if out.dtype in [np.complex64]:
40 | out = out.astype(np.complex128)
41 |
42 | return out
43 |
44 | @testing.for_all_dtypes(no_complex=True)
45 | @testing.numpy_nlcpy_allclose(rtol=1e-3, atol=1e-7, contiguous_check=False)
46 | def test_ihfft(self, xp, dtype):
47 | a = testing.shaped_random(self.shape, xp, dtype)
48 | tmp = a.copy()
49 | out = xp.fft.ihfft(a, n=self.n, axis=self.axis, norm=self.norm)
50 | assert_allclose(a, tmp)
51 |
52 | # if xp == np and dtype in [np.float16, np.float32, np.complex64]:
53 | # out = out.astype(np.complex64)
54 | if out.dtype in [np.float16, np.float32]:
55 | out = out.astype(np.float64)
56 |
57 | if out.dtype in [np.complex64]:
58 | out = out.astype(np.complex128)
59 |
60 | return out
61 |
--------------------------------------------------------------------------------
/tests/pytest/indexing_tests/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SX-Aurora/nlcpy/78534eb1695863dfe6e731b8f1e8156061c8a988/tests/pytest/indexing_tests/__init__.py
--------------------------------------------------------------------------------
/tests/pytest/io_tests/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SX-Aurora/nlcpy/78534eb1695863dfe6e731b8f1e8156061c8a988/tests/pytest/io_tests/__init__.py
--------------------------------------------------------------------------------
/tests/pytest/linalg_tests/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SX-Aurora/nlcpy/78534eb1695863dfe6e731b8f1e8156061c8a988/tests/pytest/linalg_tests/__init__.py
--------------------------------------------------------------------------------
/tests/pytest/logic_tests/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SX-Aurora/nlcpy/78534eb1695863dfe6e731b8f1e8156061c8a988/tests/pytest/logic_tests/__init__.py
--------------------------------------------------------------------------------
/tests/pytest/ma_tests/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SX-Aurora/nlcpy/78534eb1695863dfe6e731b8f1e8156061c8a988/tests/pytest/ma_tests/__init__.py
--------------------------------------------------------------------------------
/tests/pytest/manipulation_tests/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SX-Aurora/nlcpy/78534eb1695863dfe6e731b8f1e8156061c8a988/tests/pytest/manipulation_tests/__init__.py
--------------------------------------------------------------------------------
/tests/pytest/math_tests/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SX-Aurora/nlcpy/78534eb1695863dfe6e731b8f1e8156061c8a988/tests/pytest/math_tests/__init__.py
--------------------------------------------------------------------------------
/tests/pytest/pytest.ini:
--------------------------------------------------------------------------------
1 | [pytest]
2 | markers =
3 | standard: standard test
4 | full: full test
5 | small: small test
6 | fast_math: fast math test
7 | no_fast_math: no fast math test
8 | multi_ve: multi ve test
9 | import_err: import error test
10 | ctxt_close: veo context close test
11 | proc_destroy: veo proc destroy test
12 | ftrace_gen: generate ftrace.out file
13 | ftrace_chk: check ftrace.out test
14 |
--------------------------------------------------------------------------------
/tests/pytest/random_tests/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SX-Aurora/nlcpy/78534eb1695863dfe6e731b8f1e8156061c8a988/tests/pytest/random_tests/__init__.py
--------------------------------------------------------------------------------
/tests/pytest/sca_tests/conftest.py:
--------------------------------------------------------------------------------
1 | ../conftest.py
--------------------------------------------------------------------------------
/tests/pytest/sca_tests/pytest.ini:
--------------------------------------------------------------------------------
1 | ../pytest.ini
--------------------------------------------------------------------------------
/tests/pytest/sorting_tests/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SX-Aurora/nlcpy/78534eb1695863dfe6e731b8f1e8156061c8a988/tests/pytest/sorting_tests/__init__.py
--------------------------------------------------------------------------------
/tests/pytest/statistics_tests/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SX-Aurora/nlcpy/78534eb1695863dfe6e731b8f1e8156061c8a988/tests/pytest/statistics_tests/__init__.py
--------------------------------------------------------------------------------
/tests/pytest/statistics_tests/test_array_ptp_legacy.py:
--------------------------------------------------------------------------------
1 | import unittest
2 | import numpy
3 | from nlcpy import testing
4 |
5 | nan_dtypes = (
6 | numpy.float32,
7 | numpy.float64,
8 | numpy.complex64,
9 | numpy.complex128,
10 | )
11 |
12 | shapes = (
13 | (4,),
14 | (3, 4),
15 | (2, 3, 4),
16 | )
17 |
18 |
19 | @testing.parameterize(*(
20 | testing.product({
21 | 'shape': shapes,
22 | })
23 | ))
24 | class TestPtp(unittest.TestCase):
25 | # ndarray methods
26 | @testing.for_dtypes(['i', 'q', 'f', 'd', 'F', 'D'])
27 | @testing.numpy_nlcpy_array_equal()
28 | def test_case_mem_01(self, xp, dtype):
29 | a = testing.shaped_random(self.shape, xp, dtype)
30 | a = xp.asarray(a)
31 | return a.ptp()
32 |
33 | @testing.for_dtypes(['i', 'q', 'f', 'd', 'F', 'D'])
34 | @testing.numpy_nlcpy_array_equal()
35 | def test_case_mem_02(self, xp, dtype):
36 | a = testing.shaped_random(self.shape, xp, dtype)
37 | a = xp.asarray(a)
38 | return a.ptp(axis=0)
39 |
40 | @testing.numpy_nlcpy_array_equal()
41 | def test_me_case_mem_1(self, xp):
42 | x = xp.array([[4, 9, 2, 10], [6, 9, 7, 12]])
43 | return x.ptp(axis=1)
44 |
45 | @testing.numpy_nlcpy_array_equal()
46 | def test_me_case_mem_2(self, xp):
47 | x = xp.array([[4, 9, 2, 10], [6, 9, 7, 12]])
48 | return x.ptp(axis=0)
49 |
50 | @testing.numpy_nlcpy_array_equal()
51 | def test_me_case_mem_3(self, xp):
52 | x = xp.array([[1, 127], [0, 127], [-1, 127], [-2, 127]], dtype=xp.int32)
53 | return x.ptp(axis=1)
54 |
--------------------------------------------------------------------------------
/tests/pytest/statistics_tests/test_bincount_legacy.py:
--------------------------------------------------------------------------------
1 | import unittest
2 | import numpy
3 | from nlcpy import testing
4 |
5 | nan_dtypes = (
6 | numpy.float32,
7 | numpy.float64,
8 | numpy.complex64,
9 | numpy.complex128,
10 | )
11 |
12 | shapes = (
13 | (4,),
14 | )
15 |
16 |
17 | @testing.parameterize(*(
18 | testing.product({
19 | 'shape': shapes,
20 | })
21 | ))
22 | class TestBincount(unittest.TestCase):
23 | @testing.for_dtypes(['i', 'q'])
24 | @testing.numpy_nlcpy_array_equal()
25 | def test_case_01(self, xp, dtype):
26 | a = testing.shaped_random(self.shape, xp, dtype)
27 | a = xp.asarray(a)
28 | return xp.bincount(a)
29 |
30 | @testing.for_dtypes(['i', 'q'])
31 | @testing.numpy_nlcpy_array_equal()
32 | def test_case_02(self, xp, dtype):
33 | a = testing.shaped_random(self.shape, xp, dtype)
34 | a = xp.asarray(a)
35 | size = xp.bincount(a).size
36 | maxx = xp.amax(a) + 1
37 | return size == maxx
38 |
39 | @testing.numpy_nlcpy_array_equal()
40 | def test_case_03(self, xp):
41 | x = xp.array([0, 1, 1, 2, 2, 2])
42 | w = xp.array([0.3, 0.5, 0.2, 0.7, 1., -0.6])
43 | return xp.bincount(x, weights=w)
44 |
--------------------------------------------------------------------------------
/tests/pytest/statistics_tests/test_correlate_legacy.py:
--------------------------------------------------------------------------------
1 | import unittest
2 | import numpy as np
3 | import nlcpy as vp
4 | from nlcpy import testing
5 |
6 | nan_dtypes = (
7 | np.float32,
8 | np.float64,
9 | np.complex64,
10 | np.complex128,
11 | )
12 |
13 | shapes = (
14 | (10,),
15 | )
16 |
17 |
18 | @testing.parameterize(*(
19 | testing.product({
20 | 'shape': shapes,
21 | })
22 | ))
23 | class TestCorr(unittest.TestCase):
24 | @testing.for_dtypes(['i', 'q', 'f', 'd', 'F', 'D'])
25 | @testing.numpy_nlcpy_array_equal()
26 | def test_case_01(self, xp, dtype):
27 | a = testing.shaped_random(self.shape, xp, dtype)
28 | v = testing.shaped_random(self.shape, xp, dtype)
29 | a = xp.asarray(a)
30 | v = xp.asarray(v)
31 | return xp.correlate(a, v)
32 |
33 |
34 | def test_me_1():
35 | a = np.array([1, 2, 3])
36 | v = np.array([0, 1, 0.5])
37 | testing.assert_allclose(
38 | np.correlate(a, v, 'same'),
39 | vp.correlate(a, v, 'same')
40 | )
41 |
42 |
43 | def test_me_2():
44 | a = np.array([1, 2, 3])
45 | v = np.array([0, 1, 0.5])
46 | testing.assert_allclose(
47 | np.correlate(a, v, 'full'),
48 | vp.correlate(a, v, 'full')
49 | )
50 |
51 |
52 | def test_me_3():
53 | a = np.array([1 + 1j, 2, 3 - 1j])
54 | v = np.array([0, 1, 0.5j])
55 | testing.assert_allclose(
56 | np.correlate(a, v, 'full'),
57 | vp.correlate(a, v, 'full')
58 | )
59 |
--------------------------------------------------------------------------------
/tests/pytest/statistics_tests/test_digitize_legacy.py:
--------------------------------------------------------------------------------
1 | import unittest
2 | from nlcpy import testing
3 |
4 |
5 | class TestDegitize(unittest.TestCase):
6 | @testing.numpy_nlcpy_array_equal()
7 | def test_case_01(self, xp):
8 | x = xp.array([0.2, 6.4, 3.0, 1.6])
9 | bins = xp.array([0.0, 1.0, 2.5, 4.0, 10.0])
10 | return xp.digitize(x, bins)
11 |
12 | @testing.numpy_nlcpy_array_equal()
13 | def test_case_02(self, xp):
14 | x = xp.array([1.2, 10.0, 12.4, 15.5, 20.])
15 | bins = xp.array([0, 5, 10, 15, 20])
16 | return xp.digitize(x, bins, right=True)
17 |
18 | @testing.numpy_nlcpy_array_equal()
19 | def test_case_03(self, xp):
20 | x = xp.array([1.2, 10.0, 12.4, 15.5, 20.])
21 | bins = xp.array([0, 5, 10, 15, 20])
22 | return xp.digitize(x, bins, right=False)
23 |
--------------------------------------------------------------------------------
/tests/pytest/statistics_tests/test_histogram2d_legacy.py:
--------------------------------------------------------------------------------
1 | import unittest
2 | from nlcpy import testing
3 |
4 |
5 | class TestHistogram2d(unittest.TestCase):
6 | @testing.numpy_nlcpy_array_equal()
7 | def test_me_1(self, xp):
8 | xedges = [0, 1, 3, 5]
9 | yedges = [0, 2, 3, 4, 6]
10 | x = testing.shaped_random((100,), xp)
11 | y = testing.shaped_random((100,), xp)
12 | H, xedges, yedges = xp.histogram2d(x, y, bins=(xedges, yedges))
13 | return H
14 |
15 | @testing.numpy_nlcpy_array_equal()
16 | def test_me_2(self, xp):
17 | xedges = [0, 1, 3, 5]
18 | yedges = [0, 2, 3, 4, 6]
19 | x = testing.shaped_random((100,), xp)
20 | y = testing.shaped_random((100,), xp)
21 | H, xedges, yedges = xp.histogram2d(x, y, bins=(xedges, yedges))
22 | return xedges
23 |
24 | @testing.numpy_nlcpy_array_equal()
25 | def test_me_3(self, xp):
26 | xedges = [0, 1, 3, 5]
27 | yedges = [0, 2, 3, 4, 6]
28 | x = testing.shaped_random((100,), xp)
29 | y = testing.shaped_random((100,), xp)
30 | H, xedges, yedges = xp.histogram2d(x, y, bins=(xedges, yedges))
31 | return yedges
32 |
--------------------------------------------------------------------------------
/tests/pytest/statistics_tests/test_histogram_bin_edges_legacy.py:
--------------------------------------------------------------------------------
1 | import unittest
2 | from nlcpy import testing
3 |
4 |
5 | class TestHistogramBinEdges(unittest.TestCase):
6 | @testing.numpy_nlcpy_array_equal()
7 | def test_case_01(self, xp):
8 | arr = xp.array([0, 0, 0, 1, 2, 3, 3, 4, 5])
9 | return xp.histogram_bin_edges(arr, bins='auto', range=(0, 1))
10 |
11 | @testing.numpy_nlcpy_array_equal()
12 | def test_case_02(self, xp):
13 | arr = xp.array([0, 0, 0, 1, 2, 3, 3, 4, 5])
14 | return xp.histogram_bin_edges(arr, bins=2)
15 |
16 | @testing.numpy_nlcpy_array_equal()
17 | def test_case_03(self, xp):
18 | arr = xp.array([0, 0, 0, 1, 2, 3, 3, 4, 5])
19 | return xp.histogram_bin_edges(arr, [1, 2])
20 |
21 | @testing.numpy_nlcpy_array_equal()
22 | def test_case_04(self, xp):
23 | arr = xp.array([0, 0, 0, 1, 2, 3, 3, 4, 5])
24 | return xp.histogram_bin_edges(arr, bins='auto')
25 |
26 | @testing.numpy_nlcpy_array_equal()
27 | def test_case_05(self, xp):
28 | arr = xp.array([0, 0, 0, 1, 2, 3, 3, 4, 5])
29 | group_id = xp.array([0, 1, 1, 0, 1, 1, 0, 1, 1])
30 | shared_bins = xp.histogram_bin_edges(arr, bins='auto')
31 | hist_0, _ = xp.histogram(arr[group_id == 0], bins=shared_bins)
32 | hist_1, _ = xp.histogram(arr[group_id == 1], bins=shared_bins)
33 | return hist_0
34 |
35 | @testing.numpy_nlcpy_array_equal()
36 | def test_case_06(self, xp):
37 | arr = xp.array([0, 0, 0, 1, 2, 3, 3, 4, 5])
38 | group_id = xp.array([0, 1, 1, 0, 1, 1, 0, 1, 1])
39 | shared_bins = xp.histogram_bin_edges(arr, bins='auto')
40 | hist_0, _ = xp.histogram(arr[group_id == 0], bins=shared_bins)
41 | hist_1, _ = xp.histogram(arr[group_id == 1], bins=shared_bins)
42 | return hist_1
43 |
--------------------------------------------------------------------------------
/tests/pytest/statistics_tests/test_histogram_legacy.py:
--------------------------------------------------------------------------------
1 | import unittest
2 | import warnings
3 | import numpy
4 | from nlcpy import testing
5 |
6 | nan_dtypes = (
7 | numpy.float32,
8 | numpy.float64,
9 | numpy.complex64,
10 | numpy.complex128,
11 | )
12 |
13 | shapes = (
14 | (4,),
15 | )
16 |
17 |
18 | @testing.parameterize(*(
19 | testing.product({
20 | 'shape': shapes,
21 | })
22 | ))
23 | class TestHistogram(unittest.TestCase):
24 | @testing.for_all_dtypes()
25 | @testing.numpy_nlcpy_array_equal()
26 | def test_case_01(self, xp, dtype):
27 | a = testing.shaped_random(self.shape, xp, dtype)
28 | a = xp.asarray(a)
29 |
30 | bins = xp.asarray([0, 1, 2, 3])
31 |
32 | with warnings.catch_warnings():
33 | warnings.simplefilter('ignore', RuntimeWarning)
34 | return xp.histogram(a, bins)
35 |
36 | @testing.numpy_nlcpy_array_equal()
37 | def test_me_1(self, xp):
38 | a = xp.array([1, 2, 1])
39 | bins = xp.array([0, 1, 2, 3])
40 | return xp.histogram(a, bins)
41 |
42 | @testing.numpy_nlcpy_array_equal()
43 | def test_me_2(self, xp):
44 | a = xp.arange(4)
45 | bins = xp.arange(5)
46 | return xp.histogram(a, bins, density=True)
47 |
48 | @testing.numpy_nlcpy_array_equal()
49 | def test_me_3(self, xp):
50 | a = xp.array([[1, 2, 1], [1, 0, 1]])
51 | bins = xp.array([0, 1, 2, 3])
52 | return xp.histogram(a, bins)
53 |
54 | @testing.numpy_nlcpy_array_equal()
55 | def test_me_4(self, xp):
56 | a = xp.arange(5)
57 | hist, bin_edges = xp.histogram(a, density=True)
58 | return hist
59 |
60 | @testing.numpy_nlcpy_array_equal()
61 | def test_me_5(self, xp):
62 | a = xp.arange(5)
63 | hist, bin_edges = xp.histogram(a, density=True)
64 | return xp.sum(hist)
65 |
66 | @testing.numpy_nlcpy_array_equal()
67 | def test_me_6(self, xp):
68 | a = xp.arange(5)
69 | hist, bin_edges = xp.histogram(a, density=True)
70 | return xp.sum(hist * xp.diff(bin_edges))
71 |
--------------------------------------------------------------------------------
/tests/pytest/statistics_tests/test_histogramdd_legacy.py:
--------------------------------------------------------------------------------
1 | import unittest
2 | from nlcpy import testing
3 |
4 |
5 | class TestHistogramddd(unittest.TestCase):
6 | @testing.numpy_nlcpy_array_equal()
7 | def test_me_1(self, xp):
8 | r = testing.shaped_random((3, 3), xp)
9 | H, edges = xp.histogramdd(r, bins=(5, 8, 4))
10 | return H
11 |
12 | @testing.numpy_nlcpy_array_equal()
13 | def test_me_2(self, xp):
14 | r = testing.shaped_random((3, 3), xp)
15 | H, edges = xp.histogramdd(r, bins=(5, 8, 4))
16 | return edges
17 |
--------------------------------------------------------------------------------
/tests/pytest/statistics_tests/test_ptp_legacy.py:
--------------------------------------------------------------------------------
1 | import unittest
2 | import numpy
3 | from nlcpy import testing
4 |
5 | nan_dtypes = (
6 | numpy.float32,
7 | numpy.float64,
8 | numpy.complex64,
9 | numpy.complex128,
10 | )
11 |
12 | shapes = (
13 | (4,),
14 | (3, 4),
15 | (2, 3, 4),
16 | )
17 |
18 |
19 | @testing.parameterize(*(
20 | testing.product({
21 | 'shape': shapes,
22 | })
23 | ))
24 | class TestPtp(unittest.TestCase):
25 | @testing.for_dtypes(['i', 'q', 'f', 'd', 'F', 'D'])
26 | @testing.numpy_nlcpy_array_equal()
27 | def test_case_00(self, xp, dtype):
28 | a = testing.shaped_random(self.shape, xp, dtype)
29 | a = xp.asarray(a)
30 | return xp.ptp(a)
31 |
32 | @testing.for_dtypes(['i', 'q', 'f', 'd', 'F', 'D'])
33 | @testing.numpy_nlcpy_array_equal()
34 | def test_case_01(self, xp, dtype):
35 | a = testing.shaped_random(self.shape, xp, dtype)
36 | a = xp.asarray(a)
37 | return xp.ptp(a, axis=0)
38 |
39 | @testing.numpy_nlcpy_array_equal()
40 | def test_me_case_2(self, xp):
41 | x = xp.array([[4, 9, 2, 10], [6, 9, 7, 12]])
42 | return xp.ptp(x, axis=1)
43 |
44 | @testing.numpy_nlcpy_array_equal()
45 | def test_me_case_3(self, xp):
46 | x = xp.array([[4, 9, 2, 10], [6, 9, 7, 12]])
47 | return xp.ptp(x, axis=0)
48 |
--------------------------------------------------------------------------------
/tests/pytest/ufunc_tests/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SX-Aurora/nlcpy/78534eb1695863dfe6e731b8f1e8156061c8a988/tests/pytest/ufunc_tests/__init__.py
--------------------------------------------------------------------------------
/tests/pytest/ufunc_tests/conftest.py:
--------------------------------------------------------------------------------
1 | ../conftest.py
--------------------------------------------------------------------------------
/tests/pytest/ufunc_tests/pytest.ini:
--------------------------------------------------------------------------------
1 | ../pytest.ini
--------------------------------------------------------------------------------
/tests/pytest/venode_tests/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SX-Aurora/nlcpy/78534eb1695863dfe6e731b8f1e8156061c8a988/tests/pytest/venode_tests/__init__.py
--------------------------------------------------------------------------------
/tests/pytest/venode_tests/test_enter.py:
--------------------------------------------------------------------------------
1 | #
2 | # * The source code in this file is developed independently by NEC Corporation.
3 | #
4 | # # NLCPy License #
5 | #
6 | # Copyright (c) 2020 NEC Corporation
7 | # All rights reserved.
8 | #
9 | # Redistribution and use in source and binary forms, with or without
10 | # modification, are permitted provided that the following conditions are met:
11 | # * Redistributions of source code must retain the above copyright notice,
12 | # this list of conditions and the following disclaimer.
13 | # * Redistributions in binary form must reproduce the above copyright notice,
14 | # this list of conditions and the following disclaimer in the documentation
15 | # and/or other materials provided with the distribution.
16 | # * Neither NEC Corporation nor the names of its contributors may be
17 | # used to endorse or promote products derived from this software
18 | # without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | #
31 |
32 | import unittest
33 | import nlcpy
34 | from nlcpy import venode
35 |
36 |
37 | nve = nlcpy.venode.get_num_available_venodes()
38 |
39 |
40 | class TestEnter(unittest.TestCase):
41 |
42 | def test_enter(self):
43 | for veid in range(nve):
44 | ve = venode.VE(veid)
45 | with ve:
46 | nlcpy.arange(10)
47 |
--------------------------------------------------------------------------------
/tests/pytest/venode_tests/test_runtime_error_at_import.py:
--------------------------------------------------------------------------------
1 | #
2 | # * The source code in this file is developed independently by NEC Corporation.
3 | #
4 | # # NLCPy License #
5 | #
6 | # Copyright (c) 2020 NEC Corporation
7 | # All rights reserved.
8 | #
9 | # Redistribution and use in source and binary forms, with or without
10 | # modification, are permitted provided that the following conditions are met:
11 | # * Redistributions of source code must retain the above copyright notice,
12 | # this list of conditions and the following disclaimer.
13 | # * Redistributions in binary form must reproduce the above copyright notice,
14 | # this list of conditions and the following disclaimer in the documentation
15 | # and/or other materials provided with the distribution.
16 | # * Neither NEC Corporation nor the names of its contributors may be
17 | # used to endorse or promote products derived from this software
18 | # without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | #
31 |
32 | import unittest
33 | import pytest
34 |
35 |
36 | class TestRuntimeErrorAtImport(unittest.TestCase):
37 |
38 | @pytest.mark.import_err
39 | def test_runtime_error_at_import(self):
40 | with pytest.raises(RuntimeError):
41 | import nlcpy # NOQA
42 |
--------------------------------------------------------------------------------
/tests/pytest/venode_tests/test_value_error_at_import.py:
--------------------------------------------------------------------------------
1 | #
2 | # * The source code in this file is developed independently by NEC Corporation.
3 | #
4 | # # NLCPy License #
5 | #
6 | # Copyright (c) 2020 NEC Corporation
7 | # All rights reserved.
8 | #
9 | # Redistribution and use in source and binary forms, with or without
10 | # modification, are permitted provided that the following conditions are met:
11 | # * Redistributions of source code must retain the above copyright notice,
12 | # this list of conditions and the following disclaimer.
13 | # * Redistributions in binary form must reproduce the above copyright notice,
14 | # this list of conditions and the following disclaimer in the documentation
15 | # and/or other materials provided with the distribution.
16 | # * Neither NEC Corporation nor the names of its contributors may be
17 | # used to endorse or promote products derived from this software
18 | # without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | #
31 |
32 | import unittest
33 | import pytest
34 |
35 |
36 | class TestValuErrorAtImport(unittest.TestCase):
37 |
38 | @pytest.mark.import_err
39 | def test_value_error_at_import(self):
40 | with pytest.raises(ValueError):
41 | import nlcpy # NOQA
42 |
--------------------------------------------------------------------------------
/tests/pytest/wrap_tests/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SX-Aurora/nlcpy/78534eb1695863dfe6e731b8f1e8156061c8a988/tests/pytest/wrap_tests/__init__.py
--------------------------------------------------------------------------------
/tox.ini:
--------------------------------------------------------------------------------
1 | [tox]
2 | envlist =
3 | py36
4 | py37
5 | py38
6 | distshare =
7 | {toxworkdir}/distshare
8 |
9 | [testenv]
10 | #wheel = true
11 | skip_install = true
12 | setenv =
13 | PYTHONPATH = ""
14 | deps =
15 | cython
16 | wheel
17 | numpy==1.19.5
18 | pytest
19 | whitelist_externals =
20 | make
21 | sh
22 | rm
23 | commands =
24 | /bin/bash -c 'rm -rf {toxworkdir}/dist/*'
25 | python {toxinidir}/setup.py bdist_wheel --targ vh --dist-dir {toxworkdir}/dist -p manylinux1_x86_64
26 | python {toxinidir}/setup.py bdist_wheel --targ ve1,ve3 --dist-dir {toxworkdir}/dist
27 | /bin/bash -c 'cd {toxworkdir} && ls {toxworkdir}/dist/* | xargs python -m pip install'
28 | sh run_pytest.sh {posargs}
29 | /bin/bash -c 'mkdir -p {distshare}'
30 | /bin/bash -c 'cp {toxworkdir}/dist/* {distshare}/'
31 | passenv =
32 | VE_LD_LIBRARY_PATH
33 | VE_LIBRARY_PATH
34 | NCC_INCLUDE_PATH
35 | NFORT_INCLUDE_PATH
36 | VE_NODE_NUMBER
37 | NLC_HOME
38 | VE_NLCPY_NODELIST
39 |
--------------------------------------------------------------------------------