diff --git a/.clang-format b/.clang-format index 1c27bb27..a9b82591 100644 --- a/.clang-format +++ b/.clang-format @@ -34,7 +34,7 @@ AlwaysBreakBeforeMultilineStrings: false AlwaysBreakTemplateDeclarations: true BinPackArguments: true BinPackParameters: true -BraceWrapping: +BraceWrapping: AfterClass: false AfterControlStatement: false AfterEnum: false @@ -65,7 +65,7 @@ DisableFormat: false ExperimentalAutoDetectBinPacking: false FixNamespaceComments: true ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ] -IncludeCategories: +IncludeCategories: - Regex: '^"' Priority: 1 - Regex: '^<' diff --git a/.github/enable_sigma.cmake b/.github/enable_sigma.cmake index 2fbe8f6a..d6120ba5 100644 --- a/.github/enable_sigma.cmake +++ b/.github/enable_sigma.cmake @@ -1 +1 @@ -set(ENABLE_SIGMA ON) \ No newline at end of file +set(ENABLE_SIGMA ON) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 464fea37..26f21af6 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -24,7 +24,7 @@ jobs: check_formatting: uses: NWChemEx/.github/.github/workflows/check_formatting.yaml@master with: - license_config: ".github/.licenserc.yaml" + license_config: ".licenserc.yaml" test_nwx_docs: uses: NWChemEx/.github/.github/workflows/test_nwx_docs.yaml@master diff --git a/.github/.licenserc.yaml b/.licenserc.yaml similarity index 98% rename from .github/.licenserc.yaml rename to .licenserc.yaml index af8f72e3..286bd2df 100644 --- a/.github/.licenserc.yaml +++ b/.licenserc.yaml @@ -26,5 +26,6 @@ header: - docs/requirements.txt - docs/source/bibliography/*.bib - version.txt + - build/ comment: never diff --git a/CMakeLists.txt b/CMakeLists.txt index 1e0d541b..2ade5882 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,7 +45,7 @@ cmaize_option_list( ENABLE_CUTENSOR OFF "Should we enable cuTENSOR?" ) -if("${ENABLE_CUTENSOR}") +if("${ENABLE_CUTENSOR}") if("${ENABLE_SIGMA}") set(MSG "Sigma is not compatible with cuTENSOR. Turning Sigma OFF.") message(WARNING ${MSG}) @@ -116,7 +116,7 @@ if("${BUILD_TESTING}") set(cxx_test_dir "${CMAKE_CURRENT_LIST_DIR}/tests/cxx") set(cxx_unit_test_dir "${cxx_test_dir}/unit_tests/${PROJECT_NAME}") set( - cxx_acceptance_test_dir + cxx_acceptance_test_dir "${cxx_test_dir}/acceptance_tests/${PROJECT_NAME}" ) set( @@ -127,7 +127,7 @@ if("${BUILD_TESTING}") set(python_unit_test_dir "${python_test_dir}/unit_tests") include(get_catch2) - + cmaize_add_tests( test_unit_${PROJECT_NAME} SOURCE_DIR "${cxx_unit_test_dir}" diff --git a/LICENSE b/LICENSE index 4947287f..f433b1a5 100644 --- a/LICENSE +++ b/LICENSE @@ -174,4 +174,4 @@ incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - END OF TERMS AND CONDITIONS \ No newline at end of file + END OF TERMS AND CONDITIONS diff --git a/cmake/FindcuTENSOR.cmake b/cmake/FindcuTENSOR.cmake index 17b14b48..320f8341 100644 --- a/cmake/FindcuTENSOR.cmake +++ b/cmake/FindcuTENSOR.cmake @@ -88,11 +88,11 @@ if(NOT cuTENSOR_FOUND) VERSION ${CUTENSOR_VERSION} URL https://developer.download.nvidia.com/compute/cutensor/redist/libcutensor/linux-x86_64/libcutensor-linux-x86_64-${CUTENSOR_VERSION}-archive.tar.xz # Eigen's CMakelists are not intended for library use - DOWNLOAD_ONLY YES + DOWNLOAD_ONLY YES ) - + set(cuTENSOR_LIBRARY ${cutensor_SOURCE_DIR}/lib/${CUDAToolkit_VERSION_MAJOR}/libcutensor.so) - set(cuTENSOR_INCLUDE_DIR ${cutensor_SOURCE_DIR}/include) + set(cuTENSOR_INCLUDE_DIR ${cutensor_SOURCE_DIR}/include) set(cuTENSOR_FOUND TRUE) @@ -132,4 +132,4 @@ if(cuTENSOR_FOUND) endif() unset(cuTENSOR_NO_CONFIG) -unset(cuTENSOR_IS_HEADER_ONLY) \ No newline at end of file +unset(cuTENSOR_IS_HEADER_ONLY) diff --git a/docs/requirements.txt b/docs/requirements.txt index a287c935..c1e11bf8 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,4 +1,4 @@ sphinx==v7.2.6 sphinx_rtd_theme==1.3.0 -sphinxcontrib-bibtex sphinx_tabs +sphinxcontrib-bibtex diff --git a/docs/source/conf.py b/docs/source/conf.py index e12d7029..bb4f5bcb 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -24,11 +24,11 @@ # -- Project information ----------------------------------------------------- -project = u'TensorWrapper' -copyright = u'2020, NWChemEx Team' -author = u'NWChemEx Team' +project = "TensorWrapper" +copyright = "2020, NWChemEx Team" +author = "NWChemEx Team" -version = '1.0.0' +version = "1.0.0" # The full version, including alpha/beta/rc tags release = version @@ -40,37 +40,41 @@ # If your documentation needs a minimal Sphinx version, state it here. # -needs_sphinx = '1.3' +needs_sphinx = "1.3" # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - 'sphinx.ext.autodoc', 'sphinx.ext.mathjax', 'sphinx.ext.githubpages', - 'sphinx.ext.autosummary', 'sphinx_rtd_theme', 'sphinxcontrib.bibtex' + "sphinx.ext.autodoc", + "sphinx.ext.mathjax", + "sphinx.ext.githubpages", + "sphinx.ext.autosummary", + "sphinx_rtd_theme", + "sphinxcontrib.bibtex", ] dir_path = os.path.dirname(os.path.realpath(__file__)) doc_path = os.path.dirname(dir_path) root_path = os.path.dirname(doc_path) # Add any paths that contain templates here, relative to this directory. -#templates_path = ['_templates'] +# templates_path = ['_templates'] # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: # # source_suffix = ['.rst', '.md'] -source_suffix = '.rst' +source_suffix = ".rst" # The master toctree document. -master_doc = 'index' +master_doc = "index" # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = 'en' +language = "en" # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. @@ -78,7 +82,7 @@ exclude_patterns = [] # The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' +pygments_style = "sphinx" numfig = True @@ -87,7 +91,7 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = 'sphinx_rtd_theme' +html_theme = "sphinx_rtd_theme" html_logo = "assets/logo_candybar.png" @@ -95,12 +99,12 @@ # further. For a list of options available for each theme, see the # documentation. # -html_theme_options = {'vcs_pageview_mode': 'edit', 'logo_only': True} +html_theme_options = {"vcs_pageview_mode": "edit", "logo_only": True} # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -#html_static_path = ['_static'] +# html_static_path = ['_static'] # Custom sidebar templates, must be a dictionary that maps document names # to template names. @@ -114,16 +118,16 @@ # Allows the edit on GitHub button to make editing the docs easier. html_context = { - 'display_github': True, - 'github_user': 'NWChemEx', - 'github_repo': 'TensorWrapper', - 'github_version': 'master/docs/source/', + "display_github": True, + "github_user": "NWChemEx", + "github_repo": "TensorWrapper", + "github_version": "master/docs/source/", } # -- Options for HTMLHelp output --------------------------------------------- # Output file base name for HTML help builder. -htmlhelp_basename = project + 'doc' +htmlhelp_basename = project + "doc" # -- Options for LaTeX output ------------------------------------------------ @@ -131,15 +135,12 @@ # The paper size ('letterpaper' or 'a4paper'). # # 'papersize': 'letterpaper', - # The font size ('10pt', '11pt' or '12pt'). # # 'pointsize': '10pt', - # Additional stuff for the LaTeX preamble. # # 'preamble': '', - # Latex figure (float) alignment # # 'figure_align': 'htbp', @@ -149,8 +150,13 @@ # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - (master_doc, project + '.tex', project + ' Documentation', author, - 'manual'), + ( + master_doc, + project + ".tex", + project + " Documentation", + author, + "manual", + ), ] # -- Extension configuration ------------------------------------------------- @@ -158,12 +164,13 @@ # -- Options for intersphinx extension --------------------------------------- # Example configuration for intersphinx: refer to the Python standard library. -intersphinx_mapping = {'https://docs.python.org/': None} +intersphinx_mapping = {"https://docs.python.org/": None} # -- Options for bibtex -------------------------------------------------------- bibtex_bibfiles = [ - 'bibliography/background.bib', 'bibliography/other_libraries.bib' + "bibliography/background.bib", + "bibliography/other_libraries.bib", ] -bibtex_reference_style = 'super' -bibtex_default_style = 'plain' +bibtex_reference_style = "super" +bibtex_default_style = "plain" diff --git a/docs/source/developer/design/sparse_maps.rst b/docs/source/developer/design/sparse_maps.rst index 2bf5e1c4..eb90c230 100644 --- a/docs/source/developer/design/sparse_maps.rst +++ b/docs/source/developer/design/sparse_maps.rst @@ -18,4 +18,4 @@ Designing the Sparse Map Component ################################## -TODO: Write me!!! \ No newline at end of file +TODO: Write me!!! diff --git a/experimental/include/tensorwrapper/tensor/allocator/direct_tiled_array.hpp b/experimental/include/tensorwrapper/tensor/allocator/direct_tiled_array.hpp index 52a26a79..cefb6ae3 100644 --- a/experimental/include/tensorwrapper/tensor/allocator/direct_tiled_array.hpp +++ b/experimental/include/tensorwrapper/tensor/allocator/direct_tiled_array.hpp @@ -35,7 +35,7 @@ class DirectTiledArrayAllocator : public Allocator { using shape_type = typename base_type::shape_type; explicit DirectTiledArrayAllocator(std::string fxn_id = "") : - m_fxn_id_(fxn_id){}; + m_fxn_id_(fxn_id) {}; ~DirectTiledArrayAllocator() noexcept = default; diff --git a/experimental/include/tensorwrapper/tensor/allocator/tiled_array.hpp b/experimental/include/tensorwrapper/tensor/allocator/tiled_array.hpp index 6c994708..c8c73534 100644 --- a/experimental/include/tensorwrapper/tensor/allocator/tiled_array.hpp +++ b/experimental/include/tensorwrapper/tensor/allocator/tiled_array.hpp @@ -45,7 +45,7 @@ class TiledArrayAllocator : public Allocator { explicit TiledArrayAllocator( ta::Storage storage = ta::Storage::Core, ta::Distribution dist = ta::Distribution::Replicated) : - storage_(storage), dist_(dist){}; + storage_(storage), dist_(dist) {}; ~TiledArrayAllocator() noexcept = default; diff --git a/experimental/include/tensorwrapper/tensor/tensor_wrapper.hpp b/experimental/include/tensorwrapper/tensor/tensor_wrapper.hpp index ec01f232..9aecafe7 100644 --- a/experimental/include/tensorwrapper/tensor/tensor_wrapper.hpp +++ b/experimental/include/tensorwrapper/tensor/tensor_wrapper.hpp @@ -81,7 +81,7 @@ class TensorWrapper { template static constexpr bool is_t_to_tot_v = - std::is_same_v&& is_tot; + std::is_same_v && is_tot; template using eif_t_to_tot_conversion = std::enable_if_t>; diff --git a/experimental/src/tensorwrapper/sparse_map/domain/detail_/domain_pimpl.hpp b/experimental/src/tensorwrapper/sparse_map/domain/detail_/domain_pimpl.hpp index 40297fd6..79d0f7d6 100644 --- a/experimental/src/tensorwrapper/sparse_map/domain/detail_/domain_pimpl.hpp +++ b/experimental/src/tensorwrapper/sparse_map/domain/detail_/domain_pimpl.hpp @@ -63,9 +63,9 @@ class DomainPIMPL { DomainPIMPL() = default; /// Default copy and move ctors - DomainPIMPL(const DomainPIMPL& other) = default; - DomainPIMPL(DomainPIMPL&& other) noexcept = default; - DomainPIMPL& operator=(const DomainPIMPL& other) = default; + DomainPIMPL(const DomainPIMPL& other) = default; + DomainPIMPL(DomainPIMPL&& other) noexcept = default; + DomainPIMPL& operator=(const DomainPIMPL& other) = default; DomainPIMPL& operator=(DomainPIMPL&& other) noexcept = default; /// Default dtor diff --git a/experimental/src/tensorwrapper/sparse_map/sparse_map/detail_/from_sparse_map.hpp b/experimental/src/tensorwrapper/sparse_map/sparse_map/detail_/from_sparse_map.hpp index e1aa91f4..a8a1ec3f 100644 --- a/experimental/src/tensorwrapper/sparse_map/sparse_map/detail_/from_sparse_map.hpp +++ b/experimental/src/tensorwrapper/sparse_map/sparse_map/detail_/from_sparse_map.hpp @@ -178,4 +178,4 @@ auto from_sparse_map(const SparseMap& esm, const T& tensor, return TA::make_array(tensor.world(), outer_trange, l); } -} // namespace tensorwrapper::sparse_map \ No newline at end of file +} // namespace tensorwrapper::sparse_map diff --git a/experimental/src/tensorwrapper/sparse_map/sparse_map/detail_/sparse_map_pimpl.hpp b/experimental/src/tensorwrapper/sparse_map/sparse_map/detail_/sparse_map_pimpl.hpp index 6cd3abe6..40afae72 100644 --- a/experimental/src/tensorwrapper/sparse_map/sparse_map/detail_/sparse_map_pimpl.hpp +++ b/experimental/src/tensorwrapper/sparse_map/sparse_map/detail_/sparse_map_pimpl.hpp @@ -53,10 +53,10 @@ class SparseMapPIMPL { SparseMapPIMPL() = default; /// Default ctors - SparseMapPIMPL(const SparseMapPIMPL& rhs) = default; - SparseMapPIMPL(SparseMapPIMPL&& rhs) = default; + SparseMapPIMPL(const SparseMapPIMPL& rhs) = default; + SparseMapPIMPL(SparseMapPIMPL&& rhs) = default; SparseMapPIMPL& operator=(const SparseMapPIMPL& rhs) = default; - SparseMapPIMPL& operator=(SparseMapPIMPL&& rhs) = default; + SparseMapPIMPL& operator=(SparseMapPIMPL&& rhs) = default; /// Default polymorphic dtor virtual ~SparseMapPIMPL() = default; diff --git a/experimental/src/tensorwrapper/ta_helpers/einsum/einsum.hpp b/experimental/src/tensorwrapper/ta_helpers/einsum/einsum.hpp index 1810ba85..906b0b1b 100644 --- a/experimental/src/tensorwrapper/ta_helpers/einsum/einsum.hpp +++ b/experimental/src/tensorwrapper/ta_helpers/einsum/einsum.hpp @@ -53,4 +53,4 @@ auto einsum(const types::index& result_idx, const types::index& lhs_idx, return tensor_kernel(im, ranges, lhs, rhs, l); } -} // namespace tensorwrapper::ta_helpers::einsum \ No newline at end of file +} // namespace tensorwrapper::ta_helpers::einsum diff --git a/experimental/src/tensorwrapper/ta_helpers/einsum/index_map.hpp b/experimental/src/tensorwrapper/ta_helpers/einsum/index_map.hpp index 71929908..193c7db7 100644 --- a/experimental/src/tensorwrapper/ta_helpers/einsum/index_map.hpp +++ b/experimental/src/tensorwrapper/ta_helpers/einsum/index_map.hpp @@ -100,4 +100,4 @@ inline auto IndexMap::select_(const types::index_set& indices, return rv; } -} // namespace tensorwrapper::ta_helpers::einsum \ No newline at end of file +} // namespace tensorwrapper::ta_helpers::einsum diff --git a/experimental/src/tensorwrapper/ta_helpers/einsum/index_utils.hpp b/experimental/src/tensorwrapper/ta_helpers/einsum/index_utils.hpp index 3b2b8912..1eca938e 100644 --- a/experimental/src/tensorwrapper/ta_helpers/einsum/index_utils.hpp +++ b/experimental/src/tensorwrapper/ta_helpers/einsum/index_utils.hpp @@ -73,4 +73,4 @@ inline bool increment_index(types::assoc_index& idx, return true; // We apparently just reset every index, so we're done } -} // namespace tensorwrapper::ta_helpers::einsum \ No newline at end of file +} // namespace tensorwrapper::ta_helpers::einsum diff --git a/experimental/src/tensorwrapper/ta_helpers/einsum/parse_index.cpp b/experimental/src/tensorwrapper/ta_helpers/einsum/parse_index.cpp index f9e16b5e..5ac1f1ef 100644 --- a/experimental/src/tensorwrapper/ta_helpers/einsum/parse_index.cpp +++ b/experimental/src/tensorwrapper/ta_helpers/einsum/parse_index.cpp @@ -36,4 +36,4 @@ types::index_set parse_index(std::string idx) { return types::index_set(iss_itr(iss), iss_itr{}); } -} // namespace tensorwrapper::ta_helpers::einsum \ No newline at end of file +} // namespace tensorwrapper::ta_helpers::einsum diff --git a/experimental/src/tensorwrapper/ta_helpers/einsum/types.hpp b/experimental/src/tensorwrapper/ta_helpers/einsum/types.hpp index facff6d3..72b2f2bb 100644 --- a/experimental/src/tensorwrapper/ta_helpers/einsum/types.hpp +++ b/experimental/src/tensorwrapper/ta_helpers/einsum/types.hpp @@ -29,4 +29,4 @@ using index_set = std::vector; using assoc_index = std::map; using assoc_range = std::map; -} // namespace tensorwrapper::ta_helpers::einsum::types \ No newline at end of file +} // namespace tensorwrapper::ta_helpers::einsum::types diff --git a/experimental/src/tensorwrapper/ta_helpers/lazy_tile.cpp b/experimental/src/tensorwrapper/ta_helpers/lazy_tile.cpp index b6d5af0a..865b36e7 100644 --- a/experimental/src/tensorwrapper/ta_helpers/lazy_tile.cpp +++ b/experimental/src/tensorwrapper/ta_helpers/lazy_tile.cpp @@ -50,4 +50,4 @@ template void lazy_tot_type::add_evaluator( template lazy_scalar_type::operator TA::Tensor(); template lazy_tot_type::operator TA::Tensor>(); -} // namespace tensorwrapper::ta_helpers \ No newline at end of file +} // namespace tensorwrapper::ta_helpers diff --git a/experimental/src/tensorwrapper/ta_helpers/lazy_tile.hpp b/experimental/src/tensorwrapper/ta_helpers/lazy_tile.hpp index c7180399..41db8560 100644 --- a/experimental/src/tensorwrapper/ta_helpers/lazy_tile.hpp +++ b/experimental/src/tensorwrapper/ta_helpers/lazy_tile.hpp @@ -47,8 +47,8 @@ struct LazyTile { using map_type = std::map; /// Normal ctors - LazyTile() = default; - LazyTile(const LazyTile& other) = default; + LazyTile() = default; + LazyTile(const LazyTile& other) = default; LazyTile& operator=(const LazyTile& other) = default; /** @brief Adds an evaluator into the map with a given id. @@ -70,8 +70,8 @@ struct LazyTile { */ template void serialize(Archive& ar) { - ar& m_range_; - ar& m_id_; + ar & m_range_; + ar & m_id_; } /** @brief Adds an evaluator into the map with a given id. diff --git a/experimental/src/tensorwrapper/tensor/backends/tiledarray.cpp b/experimental/src/tensorwrapper/tensor/backends/tiledarray.cpp index ecd24179..e0779c5e 100644 --- a/experimental/src/tensorwrapper/tensor/backends/tiledarray.cpp +++ b/experimental/src/tensorwrapper/tensor/backends/tiledarray.cpp @@ -94,4 +94,4 @@ const TSpArrayToD& unwrap_ta(const TensorOfTensorsWrapper& tw) { return const_unwrap_ta_(tw); } -} // namespace tensorwrapper::tensor::backends \ No newline at end of file +} // namespace tensorwrapper::tensor::backends diff --git a/experimental/src/tensorwrapper/tensor/buffer/detail_/buffer_pimpl.hpp b/experimental/src/tensorwrapper/tensor/buffer/detail_/buffer_pimpl.hpp index 171c2a20..4a8bf344 100644 --- a/experimental/src/tensorwrapper/tensor/buffer/detail_/buffer_pimpl.hpp +++ b/experimental/src/tensorwrapper/tensor/buffer/detail_/buffer_pimpl.hpp @@ -148,11 +148,11 @@ class BufferPIMPL { /// These are protected to avoid users accidentally slicing the PIMPL, but /// still be accesible to derived classes who need them for implementations ///@{ - BufferPIMPL() noexcept = default; - BufferPIMPL(const BufferPIMPL&) = default; - BufferPIMPL(BufferPIMPL&&) = default; + BufferPIMPL() noexcept = default; + BufferPIMPL(const BufferPIMPL&) = default; + BufferPIMPL(BufferPIMPL&&) = default; BufferPIMPL& operator=(const BufferPIMPL&) = default; - BufferPIMPL& operator=(BufferPIMPL&&) = default; + BufferPIMPL& operator=(BufferPIMPL&&) = default; ///@} private: diff --git a/experimental/src/tensorwrapper/tensor/detail_/ta_traits.hpp b/experimental/src/tensorwrapper/tensor/detail_/ta_traits.hpp index b5d57fac..5a116193 100644 --- a/experimental/src/tensorwrapper/tensor/detail_/ta_traits.hpp +++ b/experimental/src/tensorwrapper/tensor/detail_/ta_traits.hpp @@ -104,4 +104,4 @@ struct TiledArrayTraits { std::variant, lazy_tensor_type>; }; -} // namespace tensorwrapper::tensor::detail_ \ No newline at end of file +} // namespace tensorwrapper::tensor::detail_ diff --git a/experimental/src/tensorwrapper/tensor/expression/detail_/pimpl.hpp b/experimental/src/tensorwrapper/tensor/expression/detail_/pimpl.hpp index 822f0d99..be8adaf0 100644 --- a/experimental/src/tensorwrapper/tensor/expression/detail_/pimpl.hpp +++ b/experimental/src/tensorwrapper/tensor/expression/detail_/pimpl.hpp @@ -160,9 +160,9 @@ class ExpressionPIMPL { private: // These are deleted to avoid accidentally slicing by copying/moving - ExpressionPIMPL(ExpressionPIMPL&& other) = delete; + ExpressionPIMPL(ExpressionPIMPL&& other) = delete; ExpressionPIMPL& operator=(const ExpressionPIMPL& other) = delete; - ExpressionPIMPL& operator=(ExpressionPIMPL&& other) = delete; + ExpressionPIMPL& operator=(ExpressionPIMPL&& other) = delete; }; } // namespace tensorwrapper::tensor::expression::detail_ diff --git a/experimental/src/tensorwrapper/tensor/shapes/detail_/shape_pimpl.hpp b/experimental/src/tensorwrapper/tensor/shapes/detail_/shape_pimpl.hpp index 3d89dad9..850eab71 100644 --- a/experimental/src/tensorwrapper/tensor/shapes/detail_/shape_pimpl.hpp +++ b/experimental/src/tensorwrapper/tensor/shapes/detail_/shape_pimpl.hpp @@ -153,9 +153,9 @@ class ShapePIMPL { /// Deleted to avoid slicing ///@{ - ShapePIMPL(ShapePIMPL&& other) = delete; + ShapePIMPL(ShapePIMPL&& other) = delete; ShapePIMPL& operator=(const ShapePIMPL& rhs) = delete; - ShapePIMPL& operator=(ShapePIMPL&& rhs) = delete; + ShapePIMPL& operator=(ShapePIMPL&& rhs) = delete; ///@} /// Default dtor diff --git a/experimental/src/tensorwrapper/tensor/shapes/detail_/sparse_shape_pimpl.hpp b/experimental/src/tensorwrapper/tensor/shapes/detail_/sparse_shape_pimpl.hpp index 76aaa768..1d7e9aa9 100644 --- a/experimental/src/tensorwrapper/tensor/shapes/detail_/sparse_shape_pimpl.hpp +++ b/experimental/src/tensorwrapper/tensor/shapes/detail_/sparse_shape_pimpl.hpp @@ -91,14 +91,14 @@ class SparseShapePIMPL : public ShapePIMPL { inline SparseShapePIMPL(extents_type x, sparse_map_type sm, idx2mode_type i2m) : SparseShapePIMPL(std::move(x), inner_extents_type{}, std::move(sm), - std::move(i2m)){}; + std::move(i2m)) {}; SparseShapePIMPL(tiling_type x, inner_extents_type y, sparse_map_type sm, idx2mode_type i2m); inline SparseShapePIMPL(tiling_type x, sparse_map_type sm, idx2mode_type i2m) : SparseShapePIMPL(std::move(x), inner_extents_type{}, std::move(sm), - std::move(i2m)){}; + std::move(i2m)) {}; /** @brief Makes a deep copy of the provided SparseShapePIMPL instance. * diff --git a/experimental/tests/unit/sparse_map/sparse_map/detail_/tiling_map_index.cpp b/experimental/tests/unit/sparse_map/sparse_map/detail_/tiling_map_index.cpp index 5a7aff44..03da00f1 100644 --- a/experimental/tests/unit/sparse_map/sparse_map/detail_/tiling_map_index.cpp +++ b/experimental/tests/unit/sparse_map/sparse_map/detail_/tiling_map_index.cpp @@ -76,4 +76,4 @@ TEST_CASE("Tiling a Domain") { auto new_d = tile_domain(d0, tr); REQUIRE(new_d == d1); -} \ No newline at end of file +} diff --git a/experimental/tests/unit/ta_helpers/einsum/block_kernel.cpp b/experimental/tests/unit/ta_helpers/einsum/block_kernel.cpp index eea54f4a..d59e7a99 100644 --- a/experimental/tests/unit/ta_helpers/einsum/block_kernel.cpp +++ b/experimental/tests/unit/ta_helpers/einsum/block_kernel.cpp @@ -692,4 +692,4 @@ TEST_CASE("block_kernel") { } } } -} \ No newline at end of file +} diff --git a/experimental/tests/unit/ta_helpers/einsum/increment_index.cpp b/experimental/tests/unit/ta_helpers/einsum/increment_index.cpp index 137ada7c..88e157b4 100644 --- a/experimental/tests/unit/ta_helpers/einsum/increment_index.cpp +++ b/experimental/tests/unit/ta_helpers/einsum/increment_index.cpp @@ -174,4 +174,4 @@ TEST_CASE("increment_index") { } } } -} \ No newline at end of file +} diff --git a/experimental/tests/unit/ta_helpers/einsum/index_map.cpp b/experimental/tests/unit/ta_helpers/einsum/index_map.cpp index 61296101..29f9159d 100644 --- a/experimental/tests/unit/ta_helpers/einsum/index_map.cpp +++ b/experimental/tests/unit/ta_helpers/einsum/index_map.cpp @@ -68,4 +68,4 @@ TEST_CASE("IndexMap::select_rhs") { std::vector corr{1, 0}; REQUIRE(im.select_rhs(qs) == corr); -} \ No newline at end of file +} diff --git a/experimental/tests/unit/ta_helpers/lazy_tile.cpp b/experimental/tests/unit/ta_helpers/lazy_tile.cpp index 09ef9e7d..264d2f1d 100644 --- a/experimental/tests/unit/ta_helpers/lazy_tile.cpp +++ b/experimental/tests/unit/ta_helpers/lazy_tile.cpp @@ -75,4 +75,4 @@ TEST_CASE("LazyTile") { auto clone = TA::clone(X); Y("i,j") = clone("i,j"); REQUIRE(allclose(Y, I)); -} \ No newline at end of file +} diff --git a/experimental/tests/unit/ta_helpers/pow.cpp b/experimental/tests/unit/ta_helpers/pow.cpp index b0c1e1e4..bb659c51 100644 --- a/experimental/tests/unit/ta_helpers/pow.cpp +++ b/experimental/tests/unit/ta_helpers/pow.cpp @@ -14,56 +14,56 @@ * limitations under the License. */ -//#include "tensorwrapper/ta_helpers/pow.hpp" -//#include "tensorwrapper/ta_helpers/ta_helpers.hpp" -//#include +// #include "tensorwrapper/ta_helpers/pow.hpp" +// #include "tensorwrapper/ta_helpers/ta_helpers.hpp" +// #include // -// using namespace tensorwrapper::ta_helpers; +// using namespace tensorwrapper::ta_helpers; // -// using scalar_types = std::tuple; +// using scalar_types = std::tuple; // -// TEMPLATE_LIST_TEST_CASE("hmatrix_pow", "", scalar_types) { -// using tensor_type = TA::TSpArray; -// using il_type = TA::detail::matrix_il; -// auto& world = TA::get_default_world(); +// TEMPLATE_LIST_TEST_CASE("hmatrix_pow", "", scalar_types) { +// using tensor_type = TA::TSpArray; +// using il_type = TA::detail::matrix_il; +// auto& world = TA::get_default_world(); // -// il_type t0_il{{1.0, 2.36704e-01, 7.83949e-18, 0.00000e+00}, -// {2.36704e-01, 1.0, -2.46745e-17, 0.00000e+00}, -// {7.83949e-18, -2.46745e-17, 1.0, 0.00000e+00}, -// {0., 0., 0., 1.0}}; +// il_type t0_il{{1.0, 2.36704e-01, 7.83949e-18, 0.00000e+00}, +// {2.36704e-01, 1.0, -2.46745e-17, 0.00000e+00}, +// {7.83949e-18, -2.46745e-17, 1.0, 0.00000e+00}, +// {0., 0., 0., 1.0}}; // -// tensor_type t0(world, t0_il); -// SECTION("Integer power") { -// il_type corr_il{ -// {1.0560286045074463, 0.47340795397758484, 1.5678980209093575e-17, -// 0}, -// {0.47340795397758484, 1.0560286045074463, 1.8556332932942957e-18, -// 0}, {1.5678980209093575e-17, 1.8556332932942957e-18, 1, 0}, {0, 0, -// 0, 1}}; -// tensor_type corr(world, corr_il); -// auto r = hmatrix_pow(t0, 2); -// REQUIRE(allclose(r, corr)); -// } +// tensor_type t0(world, t0_il); +// SECTION("Integer power") { +// il_type corr_il{ +// {1.0560286045074463, 0.47340795397758484, 1.5678980209093575e-17, +// 0}, +// {0.47340795397758484, 1.0560286045074463, 1.8556332932942957e-18, +// 0}, {1.5678980209093575e-17, 1.8556332932942957e-18, 1, 0}, {0, 0, +// 0, 1}}; +// tensor_type corr(world, corr_il); +// auto r = hmatrix_pow(t0, 2); +// REQUIRE(allclose(r, corr)); +// } // -// SECTION("Square root") { -// il_type corr_il{ -// {9.92870035e-01, 1.19201905e-01, 4.69113524e-18, 0.00000000e+00}, -// {1.19201905e-01, 9.92870035e-01, -1.26619859e-17, 0.00000000e+00}, -// {4.69113524e-18, -1.26619859e-17, 1.00000000e+00, 0.00000000e+00}, -// {0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 1.00000000e+00}}; -// tensor_type corr(world, corr_il); -// auto r = hmatrix_pow(t0, 0.5); -// REQUIRE(allclose(r, corr)); -// } +// SECTION("Square root") { +// il_type corr_il{ +// {9.92870035e-01, 1.19201905e-01, 4.69113524e-18, 0.00000000e+00}, +// {1.19201905e-01, 9.92870035e-01, -1.26619859e-17, 0.00000000e+00}, +// {4.69113524e-18, -1.26619859e-17, 1.00000000e+00, 0.00000000e+00}, +// {0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 1.00000000e+00}}; +// tensor_type corr(world, corr_il); +// auto r = hmatrix_pow(t0, 0.5); +// REQUIRE(allclose(r, corr)); +// } // -// SECTION("Inverse square root") { -// il_type corr_il{ -// {1.02191089e+00, -1.22688490e-01, -6.34740212e-18, 0.00000000e+00}, -// {-1.22688490e-01, 1.02191089e+00, 1.35149696e-17, 0.00000000e+00}, -// {-6.34740212e-18, 1.35149696e-17, 1.00000000e+00, 0.00000000e+00}, -// {0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 1.00000000e+00}}; -// tensor_type corr(world, corr_il); -// auto r = hmatrix_pow(t0, -0.5); -// REQUIRE(allclose(r, corr)); -// } -//} +// SECTION("Inverse square root") { +// il_type corr_il{ +// {1.02191089e+00, -1.22688490e-01, -6.34740212e-18, 0.00000000e+00}, +// {-1.22688490e-01, 1.02191089e+00, 1.35149696e-17, 0.00000000e+00}, +// {-6.34740212e-18, 1.35149696e-17, 1.00000000e+00, 0.00000000e+00}, +// {0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 1.00000000e+00}}; +// tensor_type corr(world, corr_il); +// auto r = hmatrix_pow(t0, -0.5); +// REQUIRE(allclose(r, corr)); +// } +// } diff --git a/experimental/tests/unit/ta_helpers/ta_helpers.cpp b/experimental/tests/unit/ta_helpers/ta_helpers.cpp index f06fbfe0..0f222413 100644 --- a/experimental/tests/unit/ta_helpers/ta_helpers.cpp +++ b/experimental/tests/unit/ta_helpers/ta_helpers.cpp @@ -156,4 +156,4 @@ TEST_CASE("TiledRange1 Creation") { auto test_tr = make_1D_trange(5, 2, 1); REQUIRE(test_tr == corr_tr); } -} \ No newline at end of file +} diff --git a/include/tensorwrapper/allocator/allocator_fwd.hpp b/include/tensorwrapper/allocator/allocator_fwd.hpp index 38c000aa..346cec07 100644 --- a/include/tensorwrapper/allocator/allocator_fwd.hpp +++ b/include/tensorwrapper/allocator/allocator_fwd.hpp @@ -30,4 +30,4 @@ class Replicated; template class Contiguous; -} // namespace tensorwrapper::allocator \ No newline at end of file +} // namespace tensorwrapper::allocator diff --git a/include/tensorwrapper/allocator/contiguous.hpp b/include/tensorwrapper/allocator/contiguous.hpp index 058f7906..6231257f 100644 --- a/include/tensorwrapper/allocator/contiguous.hpp +++ b/include/tensorwrapper/allocator/contiguous.hpp @@ -120,4 +120,4 @@ class Contiguous : public Replicated { element_type value) = 0; }; -} // namespace tensorwrapper::allocator \ No newline at end of file +} // namespace tensorwrapper::allocator diff --git a/include/tensorwrapper/buffer/buffer_fwd.hpp b/include/tensorwrapper/buffer/buffer_fwd.hpp index 063a9813..940e3b2b 100644 --- a/include/tensorwrapper/buffer/buffer_fwd.hpp +++ b/include/tensorwrapper/buffer/buffer_fwd.hpp @@ -30,4 +30,4 @@ class Local; class Replicated; -} // namespace tensorwrapper::buffer \ No newline at end of file +} // namespace tensorwrapper::buffer diff --git a/include/tensorwrapper/buffer/contiguous.hpp b/include/tensorwrapper/buffer/contiguous.hpp index 12b5892c..ed09aebb 100644 --- a/include/tensorwrapper/buffer/contiguous.hpp +++ b/include/tensorwrapper/buffer/contiguous.hpp @@ -208,4 +208,4 @@ TW_APPLY_FLOATING_POINT_TYPES(DECLARE_CONTIG_BUFFER); #undef DECLARE_CONTIG_BUFFER -} // namespace tensorwrapper::buffer \ No newline at end of file +} // namespace tensorwrapper::buffer diff --git a/include/tensorwrapper/detail_/dsl_base.hpp b/include/tensorwrapper/detail_/dsl_base.hpp index feb11520..9e88aada 100644 --- a/include/tensorwrapper/detail_/dsl_base.hpp +++ b/include/tensorwrapper/detail_/dsl_base.hpp @@ -302,4 +302,4 @@ class DSLBase { } // namespace tensorwrapper::detail_ -#include "dsl_base.ipp" \ No newline at end of file +#include "dsl_base.ipp" diff --git a/include/tensorwrapper/detail_/dsl_base.ipp b/include/tensorwrapper/detail_/dsl_base.ipp index c84e436f..25210f3a 100644 --- a/include/tensorwrapper/detail_/dsl_base.ipp +++ b/include/tensorwrapper/detail_/dsl_base.ipp @@ -99,4 +99,4 @@ typename DSL_BASE::dsl_reference DSL_BASE::scalar_multiplication( #undef DSL_BASE #undef TPARAMS -} // namespace tensorwrapper::detail_ \ No newline at end of file +} // namespace tensorwrapper::detail_ diff --git a/include/tensorwrapper/detail_/view_traits.hpp b/include/tensorwrapper/detail_/view_traits.hpp index 9deab3ac..26486949 100644 --- a/include/tensorwrapper/detail_/view_traits.hpp +++ b/include/tensorwrapper/detail_/view_traits.hpp @@ -58,4 +58,4 @@ template using enable_if_mutable_to_immutable_cast_t = std::enable_if_t>; -} // namespace tensorwrapper::detail_ \ No newline at end of file +} // namespace tensorwrapper::detail_ diff --git a/include/tensorwrapper/dsl/dsl.hpp b/include/tensorwrapper/dsl/dsl.hpp index 24375be6..744ad909 100644 --- a/include/tensorwrapper/dsl/dsl.hpp +++ b/include/tensorwrapper/dsl/dsl.hpp @@ -17,4 +17,4 @@ #pragma once #include #include -#include \ No newline at end of file +#include diff --git a/include/tensorwrapper/dsl/dsl_forward.hpp b/include/tensorwrapper/dsl/dsl_forward.hpp index 340b12bc..a0048c0c 100644 --- a/include/tensorwrapper/dsl/dsl_forward.hpp +++ b/include/tensorwrapper/dsl/dsl_forward.hpp @@ -23,4 +23,4 @@ class Labeled; class PairwiseParser; -} // namespace tensorwrapper::dsl \ No newline at end of file +} // namespace tensorwrapper::dsl diff --git a/include/tensorwrapper/dsl/dummy_indices.hpp b/include/tensorwrapper/dsl/dummy_indices.hpp index dc64fe30..ff7e011e 100644 --- a/include/tensorwrapper/dsl/dummy_indices.hpp +++ b/include/tensorwrapper/dsl/dummy_indices.hpp @@ -522,4 +522,4 @@ bool DummyIndices::is_contraction( return true; } -} // namespace tensorwrapper::dsl \ No newline at end of file +} // namespace tensorwrapper::dsl diff --git a/include/tensorwrapper/dsl/labeled.hpp b/include/tensorwrapper/dsl/labeled.hpp index ac83532b..85606454 100644 --- a/include/tensorwrapper/dsl/labeled.hpp +++ b/include/tensorwrapper/dsl/labeled.hpp @@ -355,4 +355,4 @@ class Labeled : public utilities::dsl::Term> { label_type m_labels_; }; -} // namespace tensorwrapper::dsl \ No newline at end of file +} // namespace tensorwrapper::dsl diff --git a/include/tensorwrapper/dsl/pairwise_parser.hpp b/include/tensorwrapper/dsl/pairwise_parser.hpp index a7caf4d0..99849f1e 100644 --- a/include/tensorwrapper/dsl/pairwise_parser.hpp +++ b/include/tensorwrapper/dsl/pairwise_parser.hpp @@ -157,4 +157,4 @@ class PairwiseParser { } }; -} // namespace tensorwrapper::dsl \ No newline at end of file +} // namespace tensorwrapper::dsl diff --git a/include/tensorwrapper/layout/layout_base.hpp b/include/tensorwrapper/layout/layout_base.hpp index 83f1bd6e..7b5c2637 100644 --- a/include/tensorwrapper/layout/layout_base.hpp +++ b/include/tensorwrapper/layout/layout_base.hpp @@ -254,7 +254,7 @@ class LayoutBase : public tensorwrapper::detail_::PolymorphicBase, /// Deleted to help avoid slicing ///@{ LayoutBase& operator=(const LayoutBase&) = delete; - LayoutBase& operator=(LayoutBase&&) = delete; + LayoutBase& operator=(LayoutBase&&) = delete; ///@} /// Implements addition_assignment by calling addition_assignment on state diff --git a/include/tensorwrapper/operations/approximately_equal.hpp b/include/tensorwrapper/operations/approximately_equal.hpp index da989855..4aaad97f 100644 --- a/include/tensorwrapper/operations/approximately_equal.hpp +++ b/include/tensorwrapper/operations/approximately_equal.hpp @@ -40,4 +40,4 @@ namespace tensorwrapper::operations { bool approximately_equal(const Tensor& lhs, const Tensor& rhs, double tol = 1e-16); -} // namespace tensorwrapper::operations \ No newline at end of file +} // namespace tensorwrapper::operations diff --git a/include/tensorwrapper/operations/norm.hpp b/include/tensorwrapper/operations/norm.hpp index d0917fa5..6a89592e 100644 --- a/include/tensorwrapper/operations/norm.hpp +++ b/include/tensorwrapper/operations/norm.hpp @@ -30,4 +30,4 @@ namespace tensorwrapper::operations { */ Tensor infinity_norm(const Tensor& t); -} // namespace tensorwrapper::operations \ No newline at end of file +} // namespace tensorwrapper::operations diff --git a/include/tensorwrapper/operations/operations.hpp b/include/tensorwrapper/operations/operations.hpp index afd96c57..b913bd97 100644 --- a/include/tensorwrapper/operations/operations.hpp +++ b/include/tensorwrapper/operations/operations.hpp @@ -19,4 +19,4 @@ #include /// Namespace for free functions that act on tensors -namespace tensorwrapper::operations {} \ No newline at end of file +namespace tensorwrapper::operations {} diff --git a/include/tensorwrapper/shape/shape_fwd.hpp b/include/tensorwrapper/shape/shape_fwd.hpp index cc2657c5..cbb852f5 100644 --- a/include/tensorwrapper/shape/shape_fwd.hpp +++ b/include/tensorwrapper/shape/shape_fwd.hpp @@ -31,4 +31,4 @@ class Smooth; template class SmoothView; -} // namespace tensorwrapper::shape \ No newline at end of file +} // namespace tensorwrapper::shape diff --git a/include/tensorwrapper/shape/shape_traits.hpp b/include/tensorwrapper/shape/shape_traits.hpp index 07dbc7a1..000f753a 100644 --- a/include/tensorwrapper/shape/shape_traits.hpp +++ b/include/tensorwrapper/shape/shape_traits.hpp @@ -69,4 +69,4 @@ struct ShapeTraits> { using const_pimpl_pointer = std::unique_ptr; }; -} // namespace tensorwrapper::shape \ No newline at end of file +} // namespace tensorwrapper::shape diff --git a/include/tensorwrapper/shape/smooth_view.hpp b/include/tensorwrapper/shape/smooth_view.hpp index 253efe08..f26d412e 100644 --- a/include/tensorwrapper/shape/smooth_view.hpp +++ b/include/tensorwrapper/shape/smooth_view.hpp @@ -241,4 +241,4 @@ class SmoothView { extern template class SmoothView; extern template class SmoothView; -} // namespace tensorwrapper::shape \ No newline at end of file +} // namespace tensorwrapper::shape diff --git a/include/tensorwrapper/types/buffer_traits.hpp b/include/tensorwrapper/types/buffer_traits.hpp index 6df3cdb4..be3e7a4e 100644 --- a/include/tensorwrapper/types/buffer_traits.hpp +++ b/include/tensorwrapper/types/buffer_traits.hpp @@ -39,4 +39,4 @@ struct ClassTraits { using const_buffer_base_pointer = std::unique_ptr; }; -} // namespace tensorwrapper::types \ No newline at end of file +} // namespace tensorwrapper::types diff --git a/include/tensorwrapper/types/class_traits.hpp b/include/tensorwrapper/types/class_traits.hpp index 2b6dfcfd..f9463440 100644 --- a/include/tensorwrapper/types/class_traits.hpp +++ b/include/tensorwrapper/types/class_traits.hpp @@ -31,4 +31,4 @@ namespace tensorwrapper::types { template struct ClassTraits; -} // namespace tensorwrapper::types \ No newline at end of file +} // namespace tensorwrapper::types diff --git a/include/tensorwrapper/types/floating_point.hpp b/include/tensorwrapper/types/floating_point.hpp index e3ef7f9c..d34ba1f1 100644 --- a/include/tensorwrapper/types/floating_point.hpp +++ b/include/tensorwrapper/types/floating_point.hpp @@ -67,4 +67,4 @@ T fabs(T value) { #endif -} // namespace tensorwrapper::types \ No newline at end of file +} // namespace tensorwrapper::types diff --git a/include/tensorwrapper/types/il_traits.hpp b/include/tensorwrapper/types/il_traits.hpp index d0485af1..ed0d8750 100644 --- a/include/tensorwrapper/types/il_traits.hpp +++ b/include/tensorwrapper/types/il_traits.hpp @@ -33,4 +33,4 @@ struct ILTraits { std::initializer_list::type>; }; -} // namespace tensorwrapper::types \ No newline at end of file +} // namespace tensorwrapper::types diff --git a/include/tensorwrapper/types/types.hpp b/include/tensorwrapper/types/types.hpp index 37b19a7e..76f09101 100644 --- a/include/tensorwrapper/types/types.hpp +++ b/include/tensorwrapper/types/types.hpp @@ -21,4 +21,4 @@ #include /// Namespace for defining types used throughout the TensorWrapper library -namespace tensorwrapper::types {} \ No newline at end of file +namespace tensorwrapper::types {} diff --git a/include/tensorwrapper/utilities/block_diagonal_matrix.hpp b/include/tensorwrapper/utilities/block_diagonal_matrix.hpp index 8b8895f6..354d6f66 100644 --- a/include/tensorwrapper/utilities/block_diagonal_matrix.hpp +++ b/include/tensorwrapper/utilities/block_diagonal_matrix.hpp @@ -29,4 +29,4 @@ namespace tensorwrapper::utilities { */ Tensor block_diagonal_matrix(std::vector matrices); -} // namespace tensorwrapper::utilities \ No newline at end of file +} // namespace tensorwrapper::utilities diff --git a/include/tensorwrapper/utilities/floating_point_dispatch.hpp b/include/tensorwrapper/utilities/floating_point_dispatch.hpp index 48d80c57..cfc6bd4b 100644 --- a/include/tensorwrapper/utilities/floating_point_dispatch.hpp +++ b/include/tensorwrapper/utilities/floating_point_dispatch.hpp @@ -66,4 +66,4 @@ decltype(auto) floating_point_dispatch(KernelType&& kernel, BufferType&& buffer, } } -} // namespace tensorwrapper::utilities \ No newline at end of file +} // namespace tensorwrapper::utilities diff --git a/include/tensorwrapper/utilities/to_json.hpp b/include/tensorwrapper/utilities/to_json.hpp index 537a214a..9d23603c 100644 --- a/include/tensorwrapper/utilities/to_json.hpp +++ b/include/tensorwrapper/utilities/to_json.hpp @@ -40,4 +40,4 @@ namespace tensorwrapper::utilities { */ std::ostream& to_json(std::ostream& os, const Tensor& t); -} // namespace tensorwrapper::utilities \ No newline at end of file +} // namespace tensorwrapper::utilities diff --git a/include/tensorwrapper/utilities/utilities.hpp b/include/tensorwrapper/utilities/utilities.hpp index 1c56040a..790313d7 100644 --- a/include/tensorwrapper/utilities/utilities.hpp +++ b/include/tensorwrapper/utilities/utilities.hpp @@ -20,4 +20,4 @@ #include /// Namespace for helper functions -namespace tensorwrapper::utilities {} \ No newline at end of file +namespace tensorwrapper::utilities {} diff --git a/src/python/export_tensorwrapper.hpp b/src/python/export_tensorwrapper.hpp index 17976dc2..3d1de3d7 100644 --- a/src/python/export_tensorwrapper.hpp +++ b/src/python/export_tensorwrapper.hpp @@ -33,4 +33,4 @@ using py_module_reference = py_module_type&; template using py_class_type = pybind11::class_; -} // namespace tensorwrapper \ No newline at end of file +} // namespace tensorwrapper diff --git a/src/python/tensor/export_tensor.cpp b/src/python/tensor/export_tensor.cpp index a174595d..2769d609 100644 --- a/src/python/tensor/export_tensor.cpp +++ b/src/python/tensor/export_tensor.cpp @@ -82,4 +82,4 @@ void export_tensor(py_module_reference m) { }); } -} // namespace tensorwrapper \ No newline at end of file +} // namespace tensorwrapper diff --git a/src/python/tensor/export_tensor.hpp b/src/python/tensor/export_tensor.hpp index 9d0230c7..f5842640 100644 --- a/src/python/tensor/export_tensor.hpp +++ b/src/python/tensor/export_tensor.hpp @@ -21,4 +21,4 @@ namespace tensorwrapper { void export_tensor(py_module_reference m); -} \ No newline at end of file +} diff --git a/src/tensorwrapper/buffer/buffer_base.cpp b/src/tensorwrapper/buffer/buffer_base.cpp index aa048530..f592f89f 100644 --- a/src/tensorwrapper/buffer/buffer_base.cpp +++ b/src/tensorwrapper/buffer/buffer_base.cpp @@ -81,4 +81,4 @@ dsl_reference BufferBase::permute_assignment_(label_type this_labels, return *this; } -} // namespace tensorwrapper::buffer \ No newline at end of file +} // namespace tensorwrapper::buffer diff --git a/src/tensorwrapper/buffer/contiguoues.cpp b/src/tensorwrapper/buffer/contiguoues.cpp index e2f80006..36438832 100644 --- a/src/tensorwrapper/buffer/contiguoues.cpp +++ b/src/tensorwrapper/buffer/contiguoues.cpp @@ -23,4 +23,4 @@ TW_APPLY_FLOATING_POINT_TYPES(DEFINE_CONTIG_BUFFER); #undef DEFINE_CONTIG_BUFFER -} // namespace tensorwrapper::buffer \ No newline at end of file +} // namespace tensorwrapper::buffer diff --git a/src/tensorwrapper/buffer/contraction_planner.hpp b/src/tensorwrapper/buffer/contraction_planner.hpp index 26dd369d..36daf72a 100644 --- a/src/tensorwrapper/buffer/contraction_planner.hpp +++ b/src/tensorwrapper/buffer/contraction_planner.hpp @@ -127,4 +127,4 @@ class ContractionPlanner { label_type m_rhs_; }; -} // namespace tensorwrapper::buffer \ No newline at end of file +} // namespace tensorwrapper::buffer diff --git a/src/tensorwrapper/buffer/detail_/cutensor_traits.cuh b/src/tensorwrapper/buffer/detail_/cutensor_traits.cuh index 005039bd..c098c1c5 100644 --- a/src/tensorwrapper/buffer/detail_/cutensor_traits.cuh +++ b/src/tensorwrapper/buffer/detail_/cutensor_traits.cuh @@ -38,4 +38,4 @@ struct cutensor_traits { } // namespace tensorwrapper::buffer::detail_ -#endif \ No newline at end of file +#endif diff --git a/src/tensorwrapper/buffer/detail_/eigen_pimpl.hpp b/src/tensorwrapper/buffer/detail_/eigen_pimpl.hpp index d3a790ee..8c297914 100644 --- a/src/tensorwrapper/buffer/detail_/eigen_pimpl.hpp +++ b/src/tensorwrapper/buffer/detail_/eigen_pimpl.hpp @@ -173,4 +173,4 @@ class EigenPIMPL const_pimpl_reference rhs) = 0; }; -} // namespace tensorwrapper::buffer::detail_ \ No newline at end of file +} // namespace tensorwrapper::buffer::detail_ diff --git a/src/tensorwrapper/buffer/detail_/eigen_tensor.cpp b/src/tensorwrapper/buffer/detail_/eigen_tensor.cpp index 7c08a5ee..dde5a7e0 100644 --- a/src/tensorwrapper/buffer/detail_/eigen_tensor.cpp +++ b/src/tensorwrapper/buffer/detail_/eigen_tensor.cpp @@ -248,4 +248,4 @@ TW_APPLY_FLOATING_POINT_TYPES(DEFINE_EIGEN_TENSOR); #undef DEFINE_EIGEN_TENSOR -} // namespace tensorwrapper::buffer::detail_ \ No newline at end of file +} // namespace tensorwrapper::buffer::detail_ diff --git a/src/tensorwrapper/buffer/detail_/eigen_tensor.cu b/src/tensorwrapper/buffer/detail_/eigen_tensor.cu index 516abff1..dd6efc1a 100644 --- a/src/tensorwrapper/buffer/detail_/eigen_tensor.cu +++ b/src/tensorwrapper/buffer/detail_/eigen_tensor.cu @@ -262,4 +262,4 @@ TW_APPLY_FLOATING_POINT_TYPES(DEFINE_CUTENSOR_CONTRACTION); } // namespace tensorwrapper::buffer::detail_ -#endif \ No newline at end of file +#endif diff --git a/src/tensorwrapper/buffer/detail_/eigen_tensor.cuh b/src/tensorwrapper/buffer/detail_/eigen_tensor.cuh index 6e026667..bc7d4e0b 100644 --- a/src/tensorwrapper/buffer/detail_/eigen_tensor.cuh +++ b/src/tensorwrapper/buffer/detail_/eigen_tensor.cuh @@ -43,4 +43,4 @@ void cutensor_contraction(typename TensorType::label_type c_label, } // namespace tensorwrapper::buffer::detail_ -#endif \ No newline at end of file +#endif diff --git a/src/tensorwrapper/buffer/detail_/eigen_tensor.hpp b/src/tensorwrapper/buffer/detail_/eigen_tensor.hpp index ad6d2449..4f89f003 100644 --- a/src/tensorwrapper/buffer/detail_/eigen_tensor.hpp +++ b/src/tensorwrapper/buffer/detail_/eigen_tensor.hpp @@ -233,4 +233,4 @@ TW_APPLY_FLOATING_POINT_TYPES(DECLARE_EIGEN_TENSOR); #undef DECLARE_EIGEN_TENSOR -} // namespace tensorwrapper::buffer::detail_ \ No newline at end of file +} // namespace tensorwrapper::buffer::detail_ diff --git a/src/tensorwrapper/buffer/detail_/hash_utilities.hpp b/src/tensorwrapper/buffer/detail_/hash_utilities.hpp index 0ede2495..021b291e 100644 --- a/src/tensorwrapper/buffer/detail_/hash_utilities.hpp +++ b/src/tensorwrapper/buffer/detail_/hash_utilities.hpp @@ -68,4 +68,4 @@ void hash_input(hash_type& seed, const sigma::Uncertain& value) { #endif -} // namespace tensorwrapper::buffer::detail_::hash_utilities \ No newline at end of file +} // namespace tensorwrapper::buffer::detail_::hash_utilities diff --git a/src/tensorwrapper/buffer/eigen.cpp b/src/tensorwrapper/buffer/eigen.cpp index 057ef6e3..f023e6f7 100644 --- a/src/tensorwrapper/buffer/eigen.cpp +++ b/src/tensorwrapper/buffer/eigen.cpp @@ -256,4 +256,4 @@ TW_APPLY_FLOATING_POINT_TYPES(DEFINE_TO_CONST_EIGEN_BUFFER); #undef DEFINE_TO_EIGEN_BUFFER #undef DEFINE_TO_CONST_EIGEN_BUFFER -} // namespace tensorwrapper::buffer \ No newline at end of file +} // namespace tensorwrapper::buffer diff --git a/src/tensorwrapper/layout/converter.hpp b/src/tensorwrapper/layout/converter.hpp index af3c3f41..cfbb8a80 100644 --- a/src/tensorwrapper/layout/converter.hpp +++ b/src/tensorwrapper/layout/converter.hpp @@ -34,4 +34,4 @@ class Converter { } }; -} // namespace tensorwrapper::layout \ No newline at end of file +} // namespace tensorwrapper::layout diff --git a/src/tensorwrapper/layout/layout_base.cpp b/src/tensorwrapper/layout/layout_base.cpp index 3bc44a99..c05a4fac 100644 --- a/src/tensorwrapper/layout/layout_base.cpp +++ b/src/tensorwrapper/layout/layout_base.cpp @@ -90,4 +90,4 @@ dsl_reference LayoutBase::permute_assignment_(label_type this_labels, return *this; } -} // namespace tensorwrapper::layout \ No newline at end of file +} // namespace tensorwrapper::layout diff --git a/src/tensorwrapper/operations/approximately_equal.cpp b/src/tensorwrapper/operations/approximately_equal.cpp index f3174fc3..3da9e93a 100644 --- a/src/tensorwrapper/operations/approximately_equal.cpp +++ b/src/tensorwrapper/operations/approximately_equal.cpp @@ -55,4 +55,4 @@ bool approximately_equal(const Tensor& lhs, const Tensor& rhs, double tol) { return floating_point_dispatch(Kernel{}, result.buffer(), tol); } -} // namespace tensorwrapper::operations \ No newline at end of file +} // namespace tensorwrapper::operations diff --git a/src/tensorwrapper/operations/norm.cpp b/src/tensorwrapper/operations/norm.cpp index 19c45c71..178337c9 100644 --- a/src/tensorwrapper/operations/norm.cpp +++ b/src/tensorwrapper/operations/norm.cpp @@ -46,4 +46,4 @@ Tensor infinity_norm(const Tensor& t) { return utilities::floating_point_dispatch(k, t.buffer()); } -} // namespace tensorwrapper::operations \ No newline at end of file +} // namespace tensorwrapper::operations diff --git a/src/tensorwrapper/shape/detail_/smooth_alias.hpp b/src/tensorwrapper/shape/detail_/smooth_alias.hpp index 0bfc6f4a..bd355325 100644 --- a/src/tensorwrapper/shape/detail_/smooth_alias.hpp +++ b/src/tensorwrapper/shape/detail_/smooth_alias.hpp @@ -83,4 +83,4 @@ class SmoothAlias : public SmoothViewPIMPL { smooth_pointer m_pshape_; }; -} // namespace tensorwrapper::shape::detail_ \ No newline at end of file +} // namespace tensorwrapper::shape::detail_ diff --git a/src/tensorwrapper/shape/detail_/smooth_view_pimpl.hpp b/src/tensorwrapper/shape/detail_/smooth_view_pimpl.hpp index 56a2b1e1..a65fce82 100644 --- a/src/tensorwrapper/shape/detail_/smooth_view_pimpl.hpp +++ b/src/tensorwrapper/shape/detail_/smooth_view_pimpl.hpp @@ -88,4 +88,4 @@ class SmoothViewPIMPL : public tensorwrapper::detail_::PolymorphicBase< } }; -} // namespace tensorwrapper::shape::detail_ \ No newline at end of file +} // namespace tensorwrapper::shape::detail_ diff --git a/src/tensorwrapper/shape/smooth.cpp b/src/tensorwrapper/shape/smooth.cpp index d004a8ec..2aff29ba 100644 --- a/src/tensorwrapper/shape/smooth.cpp +++ b/src/tensorwrapper/shape/smooth.cpp @@ -86,4 +86,4 @@ dsl_reference Smooth::permute_assignment_(label_type this_labels, return *this; } -} // namespace tensorwrapper::shape \ No newline at end of file +} // namespace tensorwrapper::shape diff --git a/src/tensorwrapper/shape/smooth_view.cpp b/src/tensorwrapper/shape/smooth_view.cpp index fba74d12..78aa5aa6 100644 --- a/src/tensorwrapper/shape/smooth_view.cpp +++ b/src/tensorwrapper/shape/smooth_view.cpp @@ -94,4 +94,4 @@ template SmoothView::SmoothView(const SmoothView&); template class SmoothView; template class SmoothView; -} // namespace tensorwrapper::shape \ No newline at end of file +} // namespace tensorwrapper::shape diff --git a/src/tensorwrapper/sparsity/pattern.cpp b/src/tensorwrapper/sparsity/pattern.cpp index e625b5de..eb0340d6 100644 --- a/src/tensorwrapper/sparsity/pattern.cpp +++ b/src/tensorwrapper/sparsity/pattern.cpp @@ -43,4 +43,4 @@ dsl_reference Pattern::permute_assignment_(label_type this_labels, return *this = rhs.object(); } -} // namespace tensorwrapper::sparsity \ No newline at end of file +} // namespace tensorwrapper::sparsity diff --git a/src/tensorwrapper/symmetry/group.cpp b/src/tensorwrapper/symmetry/group.cpp index 55a94d9b..988926e2 100644 --- a/src/tensorwrapper/symmetry/group.cpp +++ b/src/tensorwrapper/symmetry/group.cpp @@ -58,4 +58,4 @@ dsl_reference Group::permute_assignment_(label_type this_labels, return *this = rhs.object(); } -} // namespace tensorwrapper::symmetry \ No newline at end of file +} // namespace tensorwrapper::symmetry diff --git a/src/tensorwrapper/tensor/detail_/il_utils.hpp b/src/tensorwrapper/tensor/detail_/il_utils.hpp index 66d9404a..2827ffb2 100644 --- a/src/tensorwrapper/tensor/detail_/il_utils.hpp +++ b/src/tensorwrapper/tensor/detail_/il_utils.hpp @@ -57,4 +57,4 @@ auto unwrap_il(std::initializer_list il) { return std::make_tuple(*rv_dims, rv_data); } -} // namespace \ No newline at end of file +} // namespace diff --git a/src/tensorwrapper/utilities/block_diagonal_matrix.cpp b/src/tensorwrapper/utilities/block_diagonal_matrix.cpp index b3c922e4..2fd764d5 100644 --- a/src/tensorwrapper/utilities/block_diagonal_matrix.cpp +++ b/src/tensorwrapper/utilities/block_diagonal_matrix.cpp @@ -79,4 +79,4 @@ Tensor block_diagonal_matrix(std::vector matrices) { return floating_point_dispatch(kernel, buffer0, matrices); } -} // namespace tensorwrapper::utilities \ No newline at end of file +} // namespace tensorwrapper::utilities diff --git a/src/tensorwrapper/utilities/to_json.cpp b/src/tensorwrapper/utilities/to_json.cpp index 4d915f83..907257ff 100644 --- a/src/tensorwrapper/utilities/to_json.cpp +++ b/src/tensorwrapper/utilities/to_json.cpp @@ -53,4 +53,4 @@ std::ostream& to_json(std::ostream& os, const Tensor& t) { return os; } -} // namespace tensorwrapper::utilities \ No newline at end of file +} // namespace tensorwrapper::utilities diff --git a/tests/cxx/acceptance_tests/tensorwrapper/acceptance_testing.hpp b/tests/cxx/acceptance_tests/tensorwrapper/acceptance_testing.hpp index 456683b3..6077e765 100644 --- a/tests/cxx/acceptance_tests/tensorwrapper/acceptance_testing.hpp +++ b/tests/cxx/acceptance_tests/tensorwrapper/acceptance_testing.hpp @@ -19,4 +19,4 @@ #include #include #include -#include \ No newline at end of file +#include diff --git a/tests/cxx/acceptance_tests/tensorwrapper/contractions.cpp b/tests/cxx/acceptance_tests/tensorwrapper/contractions.cpp index a792b8a0..5e4f2ce6 100644 --- a/tests/cxx/acceptance_tests/tensorwrapper/contractions.cpp +++ b/tests/cxx/acceptance_tests/tensorwrapper/contractions.cpp @@ -57,4 +57,4 @@ TEST_CASE("Contractions") { } } } -} \ No newline at end of file +} diff --git a/tests/cxx/acceptance_tests/tensorwrapper/contractions.py b/tests/cxx/acceptance_tests/tensorwrapper/contractions.py index 1d1f4a86..ecce2dc3 100644 --- a/tests/cxx/acceptance_tests/tensorwrapper/contractions.py +++ b/tests/cxx/acceptance_tests/tensorwrapper/contractions.py @@ -16,8 +16,8 @@ def print_corr(t): - il = str(t.tolist()).replace('[', '{').replace(']', '}') - print('Tensor corr {};'.format(il)) + il = str(t.tolist()).replace("[", "{").replace("]", "}") + print("Tensor corr {};".format(il)) scalar_0 = np.array(1.23) @@ -30,16 +30,22 @@ def print_corr(t): matrix_1 = np.array([[5.67, 6.78], [7.89, 8.90]]) tensor3_0 = np.array([[[1.1, 2.2], [3.3, 4.4]], [[5.5, 6.6], [7.7, 8.8]]]) -tensor3_1 = np.array([[[9.9, 10.10], [11.11, 12.12]], - [[13.13, 14.14], [15.15, 16.16]]]) - -tensor4_0 = np.array([[[[1.1, 2.2], [3.3, 4.4]], [[5.5, 6.6], [7.7, 8.8]]], - [[[9.9, 10.10], [11.11, 12.12]], - [[13.13, 14.14], [15.15, 16.16]]]]) -tensor4_1 = np.array([[[[17.17, 18.18], [19.19, 20.20]], - [[21.21, 22.22], [23.23, 24.24]]], - [[[25.25, 26.26], [27.27, 28.28]], - [[29.29, 30.30], [31.31, 32.32]]]]) - -print_corr(np.einsum('ij,jkl->ikl', matrix_0, tensor3_0)) -print_corr(np.einsum('ij,ijk->k', matrix_0, tensor3_0)) +tensor3_1 = np.array( + [[[9.9, 10.10], [11.11, 12.12]], [[13.13, 14.14], [15.15, 16.16]]] +) + +tensor4_0 = np.array( + [ + [[[1.1, 2.2], [3.3, 4.4]], [[5.5, 6.6], [7.7, 8.8]]], + [[[9.9, 10.10], [11.11, 12.12]], [[13.13, 14.14], [15.15, 16.16]]], + ] +) +tensor4_1 = np.array( + [ + [[[17.17, 18.18], [19.19, 20.20]], [[21.21, 22.22], [23.23, 24.24]]], + [[[25.25, 26.26], [27.27, 28.28]], [[29.29, 30.30], [31.31, 32.32]]], + ] +) + +print_corr(np.einsum("ij,jkl->ikl", matrix_0, tensor3_0)) +print_corr(np.einsum("ij,ijk->k", matrix_0, tensor3_0)) diff --git a/tests/cxx/performance_tests/tensorwrapper/contraction.cpp b/tests/cxx/performance_tests/tensorwrapper/contraction.cpp index 4124b6f4..437c122b 100644 --- a/tests/cxx/performance_tests/tensorwrapper/contraction.cpp +++ b/tests/cxx/performance_tests/tensorwrapper/contraction.cpp @@ -34,4 +34,4 @@ TEST_CASE("Contraction") { auto [rv, info] = cpu.profile_it(std::move(l)); std::cout << "Time in ns: " << info.wall_time.count() << std::endl; -} \ No newline at end of file +} diff --git a/tests/cxx/performance_tests/tensorwrapper/performance_testing.hpp b/tests/cxx/performance_tests/tensorwrapper/performance_testing.hpp index 456683b3..6077e765 100644 --- a/tests/cxx/performance_tests/tensorwrapper/performance_testing.hpp +++ b/tests/cxx/performance_tests/tensorwrapper/performance_testing.hpp @@ -19,4 +19,4 @@ #include #include #include -#include \ No newline at end of file +#include diff --git a/tests/cxx/unit_tests/tensorwrapper/allocator/contiguous.cpp b/tests/cxx/unit_tests/tensorwrapper/allocator/contiguous.cpp index 8c6db1d4..7ba1ecf9 100644 --- a/tests/cxx/unit_tests/tensorwrapper/allocator/contiguous.cpp +++ b/tests/cxx/unit_tests/tensorwrapper/allocator/contiguous.cpp @@ -98,4 +98,4 @@ TEMPLATE_LIST_TEST_CASE("allocator::Contiguous", "", REQUIRE(pmatrix->are_equal(*matrix_corr)); } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/tensorwrapper/buffer/contiguous.cpp b/tests/cxx/unit_tests/tensorwrapper/buffer/contiguous.cpp index 5c59e2c8..ddcd4f4e 100644 --- a/tests/cxx/unit_tests/tensorwrapper/buffer/contiguous.cpp +++ b/tests/cxx/unit_tests/tensorwrapper/buffer/contiguous.cpp @@ -131,4 +131,4 @@ TEMPLATE_LIST_TEST_CASE("buffer::Contiguous", "", types::floating_point_types) { REQUIRE(base1.get_data(3) == TestType(43.0)); REQUIRE(base1.get_data(4) == TestType(43.0)); } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/tensorwrapper/buffer/detail_/hash_utilities.cpp b/tests/cxx/unit_tests/tensorwrapper/buffer/detail_/hash_utilities.cpp index f484acf8..5ba555da 100644 --- a/tests/cxx/unit_tests/tensorwrapper/buffer/detail_/hash_utilities.cpp +++ b/tests/cxx/unit_tests/tensorwrapper/buffer/detail_/hash_utilities.cpp @@ -48,4 +48,4 @@ TEMPLATE_LIST_TEST_CASE("hash_input", "", types::floating_point_types) { boost::hash_combine(corr, value_type{1.0}); REQUIRE(seed == corr); } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/tensorwrapper/buffer/eigen.cpp b/tests/cxx/unit_tests/tensorwrapper/buffer/eigen.cpp index 0b30bcb0..f783eff9 100644 --- a/tests/cxx/unit_tests/tensorwrapper/buffer/eigen.cpp +++ b/tests/cxx/unit_tests/tensorwrapper/buffer/eigen.cpp @@ -252,4 +252,4 @@ TEMPLATE_LIST_TEST_CASE("to_eigen_buffer", "", types::floating_point_types) { const buffer::BufferBase& cscalar_base = eigen_scalar; REQUIRE(&buffer::to_eigen_buffer(cscalar_base) == &eigen_scalar); -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/tensorwrapper/detail_/dsl_base.cpp b/tests/cxx/unit_tests/tensorwrapper/detail_/dsl_base.cpp index 5257eef8..4e1f0484 100644 --- a/tests/cxx/unit_tests/tensorwrapper/detail_/dsl_base.cpp +++ b/tests/cxx/unit_tests/tensorwrapper/detail_/dsl_base.cpp @@ -190,4 +190,4 @@ TEMPLATE_LIST_TEST_CASE("DSLBase", "", test_types) { REQUIRE_THROWS_AS(value.scalar_multiplication("", 1.0, s), error_t); } } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/tensorwrapper/detail_/view_traits.cpp b/tests/cxx/unit_tests/tensorwrapper/detail_/view_traits.cpp index a15a7659..5df9c1e0 100644 --- a/tests/cxx/unit_tests/tensorwrapper/detail_/view_traits.cpp +++ b/tests/cxx/unit_tests/tensorwrapper/detail_/view_traits.cpp @@ -35,4 +35,4 @@ TEST_CASE("enable_if_mutable_to_immutable_cast_t") { STATIC_REQUIRE( std::is_same_v< enable_if_mutable_to_immutable_cast_t, void>); -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/tensorwrapper/dsl/dsl.cpp b/tests/cxx/unit_tests/tensorwrapper/dsl/dsl.cpp index e2f83e57..6e2b560a 100644 --- a/tests/cxx/unit_tests/tensorwrapper/dsl/dsl.cpp +++ b/tests/cxx/unit_tests/tensorwrapper/dsl/dsl.cpp @@ -135,4 +135,4 @@ TEST_CASE("DSLr : buffer::Eigen") { corr.scalar_multiplication("", 1.0, scalar1("")); REQUIRE(corr.are_equal(scalar0)); } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/tensorwrapper/dsl/labeled.cpp b/tests/cxx/unit_tests/tensorwrapper/dsl/labeled.cpp index 1510a094..ec188017 100644 --- a/tests/cxx/unit_tests/tensorwrapper/dsl/labeled.cpp +++ b/tests/cxx/unit_tests/tensorwrapper/dsl/labeled.cpp @@ -142,4 +142,4 @@ TEMPLATE_LIST_TEST_CASE("Labeled", "", test_types) { REQUIRE_FALSE(labeled_default != clabeled_default); REQUIRE(labeled_value != labeled_type(value, "j,i")); } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/tensorwrapper/dsl/pairwise_parser.cpp b/tests/cxx/unit_tests/tensorwrapper/dsl/pairwise_parser.cpp index 9fca8092..40a86519 100644 --- a/tests/cxx/unit_tests/tensorwrapper/dsl/pairwise_parser.cpp +++ b/tests/cxx/unit_tests/tensorwrapper/dsl/pairwise_parser.cpp @@ -177,4 +177,4 @@ TEST_CASE("PairwiseParser : buffer::Eigen") { corr.scalar_multiplication("", 1.0, scalar1("")); REQUIRE(corr.are_equal(scalar0)); } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/tensorwrapper/operations/norm.cpp b/tests/cxx/unit_tests/tensorwrapper/operations/norm.cpp index e6ce3540..26b51208 100644 --- a/tests/cxx/unit_tests/tensorwrapper/operations/norm.cpp +++ b/tests/cxx/unit_tests/tensorwrapper/operations/norm.cpp @@ -60,4 +60,4 @@ TEMPLATE_LIST_TEST_CASE("infinity_norm", "", types::floating_point_types) { auto norm = infinity_norm(t); REQUIRE(approximately_equal(corr, norm)); } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/tensorwrapper/shape/detail_/smooth_alias.cpp b/tests/cxx/unit_tests/tensorwrapper/shape/detail_/smooth_alias.cpp index a272ae12..1f10517f 100644 --- a/tests/cxx/unit_tests/tensorwrapper/shape/detail_/smooth_alias.cpp +++ b/tests/cxx/unit_tests/tensorwrapper/shape/detail_/smooth_alias.cpp @@ -57,4 +57,4 @@ TEMPLATE_LIST_TEST_CASE("SmoothAlias", "", types2test) { REQUIRE(scalar.size() == 1); REQUIRE(value.size() == 6); } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/tensorwrapper/shape/detail_/smooth_view_pimpl.cpp b/tests/cxx/unit_tests/tensorwrapper/shape/detail_/smooth_view_pimpl.cpp index cf5ff1d8..16909557 100644 --- a/tests/cxx/unit_tests/tensorwrapper/shape/detail_/smooth_view_pimpl.cpp +++ b/tests/cxx/unit_tests/tensorwrapper/shape/detail_/smooth_view_pimpl.cpp @@ -53,4 +53,4 @@ TEMPLATE_LIST_TEST_CASE("SmoothViewPIMPL", "", types2test) { REQUIRE_FALSE(value.are_equal(rhs)); } } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/tensorwrapper/tensor/detail_/unwrap_il.cpp b/tests/cxx/unit_tests/tensorwrapper/tensor/detail_/unwrap_il.cpp index f084ec75..0021bdfb 100644 --- a/tests/cxx/unit_tests/tensorwrapper/tensor/detail_/unwrap_il.cpp +++ b/tests/cxx/unit_tests/tensorwrapper/tensor/detail_/unwrap_il.cpp @@ -54,4 +54,4 @@ TEST_CASE("unwrap_il") { REQUIRE(dims == dims_type{2, 2, 1}); REQUIRE(data == data_type{3.14, 1.23, 2.34, 3.45}); } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/tensorwrapper/testing/dsl.hpp b/tests/cxx/unit_tests/tensorwrapper/testing/dsl.hpp index 14712c82..70926a4b 100644 --- a/tests/cxx/unit_tests/tensorwrapper/testing/dsl.hpp +++ b/tests/cxx/unit_tests/tensorwrapper/testing/dsl.hpp @@ -75,4 +75,4 @@ inline auto tensor4_values() { {{{9.0, 10.0}, {11.0, 12.0}}, {{13.0, 14.0}, {15.0, 16.0}}}}}; } -} // namespace tensorwrapper::testing \ No newline at end of file +} // namespace tensorwrapper::testing diff --git a/tests/cxx/unit_tests/tensorwrapper/testing/eigen_buffers.hpp b/tests/cxx/unit_tests/tensorwrapper/testing/eigen_buffers.hpp index 3d3c3f4e..97cd8d75 100644 --- a/tests/cxx/unit_tests/tensorwrapper/testing/eigen_buffers.hpp +++ b/tests/cxx/unit_tests/tensorwrapper/testing/eigen_buffers.hpp @@ -87,4 +87,4 @@ auto eigen_tensor4(std::array extents = {2, 2, 2, 2}) { return buffer; } -} // namespace tensorwrapper::testing \ No newline at end of file +} // namespace tensorwrapper::testing diff --git a/tests/cxx/unit_tests/tensorwrapper/testing/layouts.hpp b/tests/cxx/unit_tests/tensorwrapper/testing/layouts.hpp index 3da5f104..a21bde60 100644 --- a/tests/cxx/unit_tests/tensorwrapper/testing/layouts.hpp +++ b/tests/cxx/unit_tests/tensorwrapper/testing/layouts.hpp @@ -72,4 +72,4 @@ inline auto tensor4_physical(std::size_t i = 10, std::size_t j = 10, return tensorwrapper::layout::Physical(smooth_tensor4(i, j, k, l)); } -} // namespace tensorwrapper::testing \ No newline at end of file +} // namespace tensorwrapper::testing diff --git a/tests/cxx/unit_tests/tensorwrapper/testing/shapes.hpp b/tests/cxx/unit_tests/tensorwrapper/testing/shapes.hpp index 28634628..837692cb 100644 --- a/tests/cxx/unit_tests/tensorwrapper/testing/shapes.hpp +++ b/tests/cxx/unit_tests/tensorwrapper/testing/shapes.hpp @@ -44,4 +44,4 @@ inline auto smooth_tensor4(std::size_t i = 10, std::size_t j = 10, return tensorwrapper::shape::Smooth{i, j, k, l}; } -} // namespace tensorwrapper::testing \ No newline at end of file +} // namespace tensorwrapper::testing diff --git a/tests/cxx/unit_tests/tensorwrapper/testing/testing.hpp b/tests/cxx/unit_tests/tensorwrapper/testing/testing.hpp index b3dd57b6..76053fad 100644 --- a/tests/cxx/unit_tests/tensorwrapper/testing/testing.hpp +++ b/tests/cxx/unit_tests/tensorwrapper/testing/testing.hpp @@ -22,4 +22,4 @@ #include "layouts.hpp" #include "shapes.hpp" -namespace tensorwrapper::testing {} // namespace tensorwrapper::testing \ No newline at end of file +namespace tensorwrapper::testing {} // namespace tensorwrapper::testing diff --git a/tests/cxx/unit_tests/tensorwrapper/utilities/block_diagonal_matrix.cpp b/tests/cxx/unit_tests/tensorwrapper/utilities/block_diagonal_matrix.cpp index 075b9f74..93e5c0ec 100644 --- a/tests/cxx/unit_tests/tensorwrapper/utilities/block_diagonal_matrix.cpp +++ b/tests/cxx/unit_tests/tensorwrapper/utilities/block_diagonal_matrix.cpp @@ -82,4 +82,4 @@ TEMPLATE_LIST_TEST_CASE("block_diagonal_matrix", "", SECTION("Input has reactangular matrix") { REQUIRE_THROWS(block_diagonal_matrix(inputs4)); } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/tensorwrapper/utilities/floating_point_dispatch.cpp b/tests/cxx/unit_tests/tensorwrapper/utilities/floating_point_dispatch.cpp index 1aef800a..f04922c9 100644 --- a/tests/cxx/unit_tests/tensorwrapper/utilities/floating_point_dispatch.cpp +++ b/tests/cxx/unit_tests/tensorwrapper/utilities/floating_point_dispatch.cpp @@ -44,4 +44,4 @@ TEMPLATE_LIST_TEST_CASE("floating_point_dispatch", "", SECTION("Two inputs and a return") { REQUIRE(floating_point_dispatch(kernel, *tensor, *tensor)); } -} \ No newline at end of file +} diff --git a/tests/cxx/unit_tests/tensorwrapper/utilities/to_json.cpp b/tests/cxx/unit_tests/tensorwrapper/utilities/to_json.cpp index 90983d99..0b8aa61e 100644 --- a/tests/cxx/unit_tests/tensorwrapper/utilities/to_json.cpp +++ b/tests/cxx/unit_tests/tensorwrapper/utilities/to_json.cpp @@ -54,4 +54,4 @@ TEMPLATE_LIST_TEST_CASE("to_json", "", std::tuple) { REQUIRE(pss == &ss); REQUIRE(ss.str() == "[[[1,2],[3,4]],[[5,6],[7,8]]]"); } -} \ No newline at end of file +} diff --git a/tests/python/unit_tests/tensor/test_tensor.py b/tests/python/unit_tests/tensor/test_tensor.py index a4e17bb6..ca99ba21 100644 --- a/tests/python/unit_tests/tensor/test_tensor.py +++ b/tests/python/unit_tests/tensor/test_tensor.py @@ -12,14 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -import tensorwrapper +import unittest + import numpy as np import py_test_tensorwrapper.testing as testing -import unittest +import tensorwrapper -class TestTensor(unittest.TestCase): +class TestTensor(unittest.TestCase): def test_rank(self): with self.assertRaises(RuntimeError): self.defaulted.rank() diff --git a/tests/python/unit_tests/test_tensorwrapper.cpp b/tests/python/unit_tests/test_tensorwrapper.cpp index d4d80c50..72d7cf2e 100644 --- a/tests/python/unit_tests/test_tensorwrapper.cpp +++ b/tests/python/unit_tests/test_tensorwrapper.cpp @@ -36,4 +36,4 @@ void get_matrix(pybind11::module_& m) { m.def("get_matrix", []() { return Tensor{{1.0, 2.0}, {3.0, 4.0}}; }); } -} // namespace tensorwrapper::testing \ No newline at end of file +} // namespace tensorwrapper::testing diff --git a/tests/python/unit_tests/test_tensorwrapper.hpp b/tests/python/unit_tests/test_tensorwrapper.hpp index 30bc398f..0ea98ebd 100644 --- a/tests/python/unit_tests/test_tensorwrapper.hpp +++ b/tests/python/unit_tests/test_tensorwrapper.hpp @@ -23,4 +23,4 @@ void get_scalar(pybind11::module_& m); void get_vector(pybind11::module_& m); void get_matrix(pybind11::module_& m); -} // namespace tensorwrapper::testing \ No newline at end of file +} // namespace tensorwrapper::testing diff --git a/tests/python/unit_tests/test_tensorwrapper.py b/tests/python/unit_tests/test_tensorwrapper.py index 42b1103f..5aa3d0dc 100644 --- a/tests/python/unit_tests/test_tensorwrapper.py +++ b/tests/python/unit_tests/test_tensorwrapper.py @@ -15,11 +15,12 @@ # import os -import parallelzone as pz import sys import unittest -if __name__ == '__main__': +import parallelzone as pz + +if __name__ == "__main__": rv = pz.runtime.RuntimeView() my_dir = os.path.dirname(os.path.realpath(__file__))