diff --git a/examples/advection/LaxFridrichs.h b/examples/advection/LaxFridrichs.h index 8c6c0f17f9a0c344c169f0d4a986eea1a1e15906..46e63b77a2fa7661b8f7dd83cae964eab0c61272 100644 --- a/examples/advection/LaxFridrichs.h +++ b/examples/advection/LaxFridrichs.h @@ -1,7 +1,7 @@ #ifndef LaxFridrichs_H #define LaxFridrichs_H -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #include <TNL/Meshes/Grid.h> namespace TNL { diff --git a/examples/advection/LaxFridrichs_impl.h b/examples/advection/LaxFridrichs_impl.h index 7b4420f8c588d0e8788fbbf9c3c4ba96b54958a5..dc65664b3b5b8ef599d61988924b3a705b6f94ca 100644 --- a/examples/advection/LaxFridrichs_impl.h +++ b/examples/advection/LaxFridrichs_impl.h @@ -17,8 +17,8 @@ getType() { return String( "LaxFridrichs< " ) + MeshType::getType() + ", " + - TNL::getType< Real >() + ", " + - TNL::getType< Index >() + " >"; + TNL::getType< Real >() + ", " + + TNL::getType< Index >() + " >"; } template< typename MeshReal, @@ -126,8 +126,8 @@ getType() { return String( "LaxFridrichs< " ) + MeshType::getType() + ", " + - TNL::getType< Real >() + ", " + - TNL::getType< Index >() + " >"; + TNL::getType< Real >() + ", " + + TNL::getType< Index >() + " >"; } template< typename MeshReal, diff --git a/examples/advection/advection.h b/examples/advection/advection.h index 372de18b5ff35bc9ba2447ccb3260e7b34574f64..dc8d52ae085b277225634637969e72e2d3ff6a40 100644 --- a/examples/advection/advection.h +++ b/examples/advection/advection.h @@ -73,7 +73,7 @@ class advectionSetter enum { Dimensions = MeshType::getMeshDimensions() }; typedef LaxFridrichs< MeshType, Real, Index > ApproximateOperator; typedef advectionRhs< MeshType, Real > RightHandSide; - typedef Vectors::StaticVector < MeshType::getMeshDimensions(), Real > Vertex; + typedef Containers::StaticVector < MeshType::getMeshDimensions(), Real > Vertex; /**** * Resolve the template arguments of your solver here. diff --git a/examples/heat-equation/tnl-heat-equation-eoc.h b/examples/heat-equation/tnl-heat-equation-eoc.h index 154a00f22706cf6cb03446e1561918b7255ed77b..7e1e417449eb6acc41d7dcc20768ab09ec810c0d 100644 --- a/examples/heat-equation/tnl-heat-equation-eoc.h +++ b/examples/heat-equation/tnl-heat-equation-eoc.h @@ -53,7 +53,7 @@ class heatEquationSetter typedef Device DeviceType; typedef Index IndexType; - typedef Vectors::StaticVector< MeshType::meshDimensions, Real > Vertex; + typedef Containers::StaticVector< MeshType::meshDimensions, Real > Vertex; static bool run( const Config::ParameterContainer& parameters ) { @@ -62,7 +62,7 @@ class heatEquationSetter typedef Operators::ExactLinearDiffusion< Dimensions > ExactOperator; typedef Functions::TestFunction< MeshType::meshDimensions, Real, Device > TestFunction; typedef HeatEquationEocRhs< ExactOperator, TestFunction > RightHandSide; - typedef Vectors::StaticVector < MeshType::meshDimensions, Real > Vertex; + typedef Containers::StaticVector < MeshType::meshDimensions, Real > Vertex; typedef Operators::DirichletBoundaryConditions< MeshType, TestFunction, Dimensions, Real, Index > BoundaryConditions; typedef HeatEquationEocProblem< MeshType, BoundaryConditions, RightHandSide, ApproximateOperator > Solver; SolverStarter solverStarter; diff --git a/examples/heat-equation/tnl-heat-equation.h b/examples/heat-equation/tnl-heat-equation.h index 0b03881d8d493c920f1e0d10b3de125c89497dc2..e52a3ea2e16ebf0bea78c4afeaac6a1580b1963e 100644 --- a/examples/heat-equation/tnl-heat-equation.h +++ b/examples/heat-equation/tnl-heat-equation.h @@ -64,14 +64,14 @@ class heatEquationSetter typedef Device DeviceType; typedef Index IndexType; - typedef Vectors::StaticVector< MeshType::meshDimensions, Real > Vertex; + typedef Containers::StaticVector< MeshType::meshDimensions, Real > Vertex; static bool run( const Config::ParameterContainer& parameters ) { enum { Dimensions = MeshType::meshDimensions }; typedef Operators::LinearDiffusion< MeshType, Real, Index > ApproximateOperator; typedef Functions::Analytic::Constant< Dimensions, Real > RightHandSide; - typedef Vectors::StaticVector < MeshType::meshDimensions, Real > Vertex; + typedef Containers::StaticVector < MeshType::meshDimensions, Real > Vertex; String boundaryConditionsType = parameters.getParameter< String >( "boundary-conditions-type" ); if( parameters.checkParameter( "boundary-conditions-constant" ) ) diff --git a/examples/inviscid-flow/1d/EulerPressureGetter.h b/examples/inviscid-flow/1d/EulerPressureGetter.h index 3a4174396b8dbb3b71d1a71a49b673debfa35807..bc64be54ed13fe05b6613caa84f53fbd6e46b038 100644 --- a/examples/inviscid-flow/1d/EulerPressureGetter.h +++ b/examples/inviscid-flow/1d/EulerPressureGetter.h @@ -1,7 +1,7 @@ #ifndef EulerPressureGetter_H #define EulerPressureGetter_H -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #include <TNL/Meshes/Grid.h> #include <TNL/Functions/Domain.h> diff --git a/examples/inviscid-flow/1d/EulerVelGetter.h b/examples/inviscid-flow/1d/EulerVelGetter.h index 062ab511051988de300edd705d359bf78b645e4c..1b502cb1a26dea088465d0e98bfb39abfe276369 100644 --- a/examples/inviscid-flow/1d/EulerVelGetter.h +++ b/examples/inviscid-flow/1d/EulerVelGetter.h @@ -1,7 +1,7 @@ #ifndef EulerVelGetter_H #define EulerVelGetter_H -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #include <TNL/Meshes/Grid.h> namespace TNL { diff --git a/examples/inviscid-flow/1d/LaxFridrichs.h b/examples/inviscid-flow/1d/LaxFridrichs.h index 67fe26dca542f024077f8c21993b021eeb0bab6f..a5cb7eea5c6183e07facebb0750d02b8fc04d694 100644 --- a/examples/inviscid-flow/1d/LaxFridrichs.h +++ b/examples/inviscid-flow/1d/LaxFridrichs.h @@ -1,7 +1,7 @@ #ifndef LaxFridrichs_H #define LaxFridrichs_H -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #include <TNL/Meshes/Grid.h> #include "LaxFridrichsContinuity.h" diff --git a/examples/inviscid-flow/1d/LaxFridrichsContinuity.h b/examples/inviscid-flow/1d/LaxFridrichsContinuity.h index b14b5e031144a787bcc9a8a283cdaa9727527f8b..8053895eda0787a52d12335ad4d9a1acc87e114a 100644 --- a/examples/inviscid-flow/1d/LaxFridrichsContinuity.h +++ b/examples/inviscid-flow/1d/LaxFridrichsContinuity.h @@ -1,7 +1,7 @@ #ifndef LaxFridrichsContinuity_H #define LaxFridrichsContinuity_H -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #include <TNL/Meshes/Grid.h> namespace TNL { diff --git a/examples/inviscid-flow/1d/LaxFridrichsEnergy.h b/examples/inviscid-flow/1d/LaxFridrichsEnergy.h index 44373c778443d607bea31f1e5dbe418e4e29087e..fa0012eb8d006aa452b702c4d0d38eed6b04ccdd 100644 --- a/examples/inviscid-flow/1d/LaxFridrichsEnergy.h +++ b/examples/inviscid-flow/1d/LaxFridrichsEnergy.h @@ -1,7 +1,7 @@ #ifndef LaxFridrichsEnergy_H #define LaxFridrichsEnergy_H -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #include <TNL/Meshes/Grid.h> namespace TNL { diff --git a/examples/inviscid-flow/1d/LaxFridrichsMomentum.h b/examples/inviscid-flow/1d/LaxFridrichsMomentum.h index de269694b6bbe6712f39e2c00e6da40e59e761cc..5bb8818833b32f14415c4d2c107dfe0025d44a7e 100644 --- a/examples/inviscid-flow/1d/LaxFridrichsMomentum.h +++ b/examples/inviscid-flow/1d/LaxFridrichsMomentum.h @@ -1,7 +1,7 @@ #ifndef LaxFridrichsMomentum_H #define LaxFridrichsMomentum_H -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #include <TNL/Meshes/Grid.h> namespace TNL { diff --git a/examples/inviscid-flow/1d/euler.h b/examples/inviscid-flow/1d/euler.h index fe1e1e4c8cbc1803e45f13b5485aa2606ac10a35..65bf55820659f8ce67d3a1cfd5622e1f558dab72 100644 --- a/examples/inviscid-flow/1d/euler.h +++ b/examples/inviscid-flow/1d/euler.h @@ -69,7 +69,7 @@ class eulerSetter enum { Dimensions = MeshType::getMeshDimensions() }; typedef LaxFridrichs< MeshType, Real, Index > ApproximateOperator; typedef eulerRhs< MeshType, Real > RightHandSide; - typedef Vectors::StaticVector < MeshType::getMeshDimensions(), Real > Vertex; + typedef Containers::StaticVector < MeshType::getMeshDimensions(), Real > Vertex; /**** * Resolve the template arguments of your solver here. diff --git a/examples/inviscid-flow/1d/eulerProblem_impl.h b/examples/inviscid-flow/1d/eulerProblem_impl.h index 76219d72cdfa83fa8a64a89209736666364b254a..acb3ddcef2bf3a86a5302bf765d68467b72d7d71 100644 --- a/examples/inviscid-flow/1d/eulerProblem_impl.h +++ b/examples/inviscid-flow/1d/eulerProblem_impl.h @@ -119,7 +119,7 @@ setInitialCondition( const Config::ParameterContainer& parameters, uRho->bind( mesh, *dofs, 0); uRhoVelocity->bind( mesh, *dofs, count); uEnergy->bind( mesh, *dofs, 2 * count); - Vectors::Vector < RealType, DeviceType, IndexType > data; + Containers::Vector < RealType, DeviceType, IndexType > data; data.setSize(2*count); velocity->bind( mesh, data, 0); pressure->bind( mesh, data, count ); diff --git a/examples/inviscid-flow/2d/EulerPressureGetter.h b/examples/inviscid-flow/2d/EulerPressureGetter.h index 634911177319f98eeec83b2c173d7aa332c1a689..49e50d72576c270dc1f94f661aae70444ca00677 100644 --- a/examples/inviscid-flow/2d/EulerPressureGetter.h +++ b/examples/inviscid-flow/2d/EulerPressureGetter.h @@ -1,7 +1,7 @@ #ifndef EulerPressureGetter_H #define EulerPressureGetter_H -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #include <TNL/Meshes/Grid.h> namespace TNL { diff --git a/examples/inviscid-flow/2d/EulerVelGetter.h b/examples/inviscid-flow/2d/EulerVelGetter.h index 74b128f02d396070150ae8b101a1d956b4815e60..ce0f7208957ac7bea45b3faa3194dee5fb3c1637 100644 --- a/examples/inviscid-flow/2d/EulerVelGetter.h +++ b/examples/inviscid-flow/2d/EulerVelGetter.h @@ -1,7 +1,7 @@ #ifndef EulerVelGetter_H #define EulerVelGetter_H -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #include <TNL/Meshes/Grid.h> namespace TNL { diff --git a/examples/inviscid-flow/2d/EulerVelXGetter.h b/examples/inviscid-flow/2d/EulerVelXGetter.h index f6c83a9501e8e41066c0bef154fa22a3ae902610..93e3363bfab2f2d7eca6b375d9013c661bd47427 100644 --- a/examples/inviscid-flow/2d/EulerVelXGetter.h +++ b/examples/inviscid-flow/2d/EulerVelXGetter.h @@ -1,7 +1,7 @@ #ifndef EulerVelXGetter_H #define EulerVelXGetter_H -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #include <TNL/Meshes/Grid.h> namespace TNL { diff --git a/examples/inviscid-flow/2d/EulerVelYGetter.h b/examples/inviscid-flow/2d/EulerVelYGetter.h index 57131f14027ffe81cb14e3b5ead72a198f93f240..49474808d38d60baa3a0625ca690b953f714c5c7 100644 --- a/examples/inviscid-flow/2d/EulerVelYGetter.h +++ b/examples/inviscid-flow/2d/EulerVelYGetter.h @@ -1,7 +1,7 @@ #ifndef EulerVelYGetter_H #define EulerVelYGetter_H -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #include <TNL/Meshes/Grid.h> namespace TNL { diff --git a/examples/inviscid-flow/2d/LaxFridrichs.h b/examples/inviscid-flow/2d/LaxFridrichs.h index 2c1e16a68f4ea4598c0c7296b63e31dcdd990c5a..b689e002122e0c885a53585ebe982f281cfbf43e 100644 --- a/examples/inviscid-flow/2d/LaxFridrichs.h +++ b/examples/inviscid-flow/2d/LaxFridrichs.h @@ -1,7 +1,7 @@ #ifndef LaxFridrichs_H #define LaxFridrichs_H -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #include <TNL/Meshes/Grid.h> #include "LaxFridrichsContinuity.h" diff --git a/examples/inviscid-flow/2d/LaxFridrichsContinuity.h b/examples/inviscid-flow/2d/LaxFridrichsContinuity.h index 7c8c23219b70520ac48ad4387160d67ce6f2d43a..433d6a3512cbd8493ac16d0181d2255bb7692974 100644 --- a/examples/inviscid-flow/2d/LaxFridrichsContinuity.h +++ b/examples/inviscid-flow/2d/LaxFridrichsContinuity.h @@ -1,7 +1,7 @@ #ifndef LaxFridrichsContinuity_H #define LaxFridrichsContinuity_H -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #include <TNL/Meshes/Grid.h> namespace TNL { diff --git a/examples/inviscid-flow/2d/LaxFridrichsEnergy.h b/examples/inviscid-flow/2d/LaxFridrichsEnergy.h index 9180a13ac96d26ed58dbff5fb816688335d67c2d..8685697295d485d03c57e3748d2b6320e84f3ac5 100644 --- a/examples/inviscid-flow/2d/LaxFridrichsEnergy.h +++ b/examples/inviscid-flow/2d/LaxFridrichsEnergy.h @@ -1,7 +1,7 @@ #ifndef LaxFridrichsEnergy_H #define LaxFridrichsEnergy_H -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #include <TNL/Meshes/Grid.h> namespace TNL { diff --git a/examples/inviscid-flow/2d/LaxFridrichsMomentumX.h b/examples/inviscid-flow/2d/LaxFridrichsMomentumX.h index 32eb637eba2e14d5dae20c51f07c11e970926f57..b82758fc7c24cebfcc08580d73c0fd142a82dedc 100644 --- a/examples/inviscid-flow/2d/LaxFridrichsMomentumX.h +++ b/examples/inviscid-flow/2d/LaxFridrichsMomentumX.h @@ -1,7 +1,7 @@ #ifndef LaxFridrichsMomentumX_H #define LaxFridrichsMomentumX_H -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #include <TNL/Meshes/Grid.h> namespace TNL { diff --git a/examples/inviscid-flow/2d/LaxFridrichsMomentumY.h b/examples/inviscid-flow/2d/LaxFridrichsMomentumY.h index cd2dfe2370b1eab65b06ba8a0152fcd91ea6d19b..309051829f7b973ed3009ae12eef2c8ec425f647 100644 --- a/examples/inviscid-flow/2d/LaxFridrichsMomentumY.h +++ b/examples/inviscid-flow/2d/LaxFridrichsMomentumY.h @@ -1,7 +1,7 @@ #ifndef LaxFridrichsMomentumY_H #define LaxFridrichsMomentumY_H -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #include <TNL/Meshes/Grid.h> namespace TNL { diff --git a/examples/inviscid-flow/2d/euler.h b/examples/inviscid-flow/2d/euler.h index 2450b900cd978fc5473566b5e38d0d04da985713..a888f928e86227dd3126c32408ba69fe46c89b7d 100644 --- a/examples/inviscid-flow/2d/euler.h +++ b/examples/inviscid-flow/2d/euler.h @@ -70,7 +70,7 @@ class eulerSetter enum { Dimensions = MeshType::getMeshDimensions() }; typedef LaxFridrichs< MeshType, Real, Index > ApproximateOperator; typedef eulerRhs< MeshType, Real > RightHandSide; - typedef Vectors::StaticVector < MeshType::getMeshDimensions(), Real > Vertex; + typedef Containers::StaticVector < MeshType::getMeshDimensions(), Real > Vertex; /**** * Resolve the template arguments of your solver here. diff --git a/examples/inviscid-flow/2d/eulerProblem.h b/examples/inviscid-flow/2d/eulerProblem.h index 4ffd2dc7bffe0660fe5a86bab8f3d2af8f464846..67c36052ce0628bd46530572ccde136a7f6c88fc 100644 --- a/examples/inviscid-flow/2d/eulerProblem.h +++ b/examples/inviscid-flow/2d/eulerProblem.h @@ -102,25 +102,25 @@ class eulerProblem: RightHandSidePointer rightHandSidePointer; //definition - Vectors::Vector< RealType, DeviceType, IndexType > _uRho; - Vectors::Vector< RealType, DeviceType, IndexType > _uRhoVelocityX; - Vectors::Vector< RealType, DeviceType, IndexType > _uRhoVelocityY; - Vectors::Vector< RealType, DeviceType, IndexType > _uEnergy; - - Vectors::Vector< RealType, DeviceType, IndexType > _fuRho; - Vectors::Vector< RealType, DeviceType, IndexType > _fuRhoVelocityX; - Vectors::Vector< RealType, DeviceType, IndexType > _fuRhoVelocityY; - Vectors::Vector< RealType, DeviceType, IndexType > _fuEnergy; - - Vectors::Vector< RealType, DeviceType, IndexType > rho; - Vectors::Vector< RealType, DeviceType, IndexType > rhoVelX; - Vectors::Vector< RealType, DeviceType, IndexType > rhoVelY; - Vectors::Vector< RealType, DeviceType, IndexType > energy; - Vectors::Vector< RealType, DeviceType, IndexType > data; - Vectors::Vector< RealType, DeviceType, IndexType > pressure; - Vectors::Vector< RealType, DeviceType, IndexType > velocity; - Vectors::Vector< RealType, DeviceType, IndexType > velocityX; - Vectors::Vector< RealType, DeviceType, IndexType > velocityY; + Containers::Vector< RealType, DeviceType, IndexType > _uRho; + Containers::Vector< RealType, DeviceType, IndexType > _uRhoVelocityX; + Containers::Vector< RealType, DeviceType, IndexType > _uRhoVelocityY; + Containers::Vector< RealType, DeviceType, IndexType > _uEnergy; + + Containers::Vector< RealType, DeviceType, IndexType > _fuRho; + Containers::Vector< RealType, DeviceType, IndexType > _fuRhoVelocityX; + Containers::Vector< RealType, DeviceType, IndexType > _fuRhoVelocityY; + Containers::Vector< RealType, DeviceType, IndexType > _fuEnergy; + + Containers::Vector< RealType, DeviceType, IndexType > rho; + Containers::Vector< RealType, DeviceType, IndexType > rhoVelX; + Containers::Vector< RealType, DeviceType, IndexType > rhoVelY; + Containers::Vector< RealType, DeviceType, IndexType > energy; + Containers::Vector< RealType, DeviceType, IndexType > data; + Containers::Vector< RealType, DeviceType, IndexType > pressure; + Containers::Vector< RealType, DeviceType, IndexType > velocity; + Containers::Vector< RealType, DeviceType, IndexType > velocityX; + Containers::Vector< RealType, DeviceType, IndexType > velocityY; double gamma; diff --git a/examples/navier-stokes/navierStokesSolver.h b/examples/navier-stokes/navierStokesSolver.h index 47448f20f0f5a89a7dc92f1f1a2f2be1291389f0..a54707b2520d93bf1e8f2a029ef252a0a779d069 100644 --- a/examples/navier-stokes/navierStokesSolver.h +++ b/examples/navier-stokes/navierStokesSolver.h @@ -20,7 +20,7 @@ #include <TNL/Logger.h> #include <TNL/Devices/Host.h> -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #include <TNL/Config/ParameterContainer.h> #include <TNL/Matrices/CSR.h> #include <TNL/Solvers/preconditioners/Dummy.h> diff --git a/examples/navier-stokes/navierStokesSolver_impl.h b/examples/navier-stokes/navierStokesSolver_impl.h index 0e4652e13b93a1dc39e01c4bf974284b8b3b0f55..620c37fe995631145828afa665af3c0c8fb2435a 100644 --- a/examples/navier-stokes/navierStokesSolver_impl.h +++ b/examples/navier-stokes/navierStokesSolver_impl.h @@ -25,7 +25,7 @@ #include <TNL/String.h> #include <TNL/core/mfilename.h> #include <TNL/core/mfuncs.h> -#include <TNL/Vectors/SharedVector.h> +#include <TNL/Containers/SharedVector.h> #include <TNL/Solvers/ODE/Merson.h> diff --git a/examples/quad-test/CMakeLists.txt b/examples/quad-test/CMakeLists.txt deleted file mode 100755 index 85e54342b7ccff7a625b52249cb0bba30b5c4455..0000000000000000000000000000000000000000 --- a/examples/quad-test/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -INSTALL( FILES Makefile - main.cpp - program-name.cfg.desc - DESTINATION share/tnl-${tnlVersion}/examples/make-project ) \ No newline at end of file diff --git a/src/TNL/Arithmetics/CMakeLists.txt b/src/TNL/Arithmetics/CMakeLists.txt new file mode 100755 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/examples/quad-test/Quad.cpp b/src/TNL/Arithmetics/Quad.cpp similarity index 100% rename from examples/quad-test/Quad.cpp rename to src/TNL/Arithmetics/Quad.cpp diff --git a/examples/quad-test/Quad.h b/src/TNL/Arithmetics/Quad.h similarity index 100% rename from examples/quad-test/Quad.h rename to src/TNL/Arithmetics/Quad.h diff --git a/examples/quad-test/Quadcpp.cpp b/src/TNL/Arithmetics/Quadcpp.cpp similarity index 100% rename from examples/quad-test/Quadcpp.cpp rename to src/TNL/Arithmetics/Quadcpp.cpp diff --git a/examples/quad-test/Quadcpp.h b/src/TNL/Arithmetics/Quadcpp.h similarity index 100% rename from examples/quad-test/Quadcpp.h rename to src/TNL/Arithmetics/Quadcpp.h diff --git a/src/TNL/CMakeLists.txt b/src/TNL/CMakeLists.txt index 9ae1fd5c0c93222f949861dd4a19b9f98851d2a0..3c40db065bf13cebcdf362606e097c938ff0b98a 100755 --- a/src/TNL/CMakeLists.txt +++ b/src/TNL/CMakeLists.txt @@ -1,5 +1,6 @@ -ADD_SUBDIRECTORY( Arrays ) +ADD_SUBDIRECTORY( Arithmetics ) ADD_SUBDIRECTORY( Config ) +ADD_SUBDIRECTORY( Containers ) ADD_SUBDIRECTORY( Devices ) ADD_SUBDIRECTORY( Functions ) ADD_SUBDIRECTORY( Images ) @@ -8,7 +9,6 @@ ADD_SUBDIRECTORY( Meshes ) ADD_SUBDIRECTORY( Operators ) ADD_SUBDIRECTORY( Problems ) ADD_SUBDIRECTORY( Solvers ) -ADD_SUBDIRECTORY( Vectors ) ADD_SUBDIRECTORY( core ) ADD_SUBDIRECTORY( legacy ) @@ -42,37 +42,34 @@ set( common_SOURCES TimerCPU.cpp TimerRT.cpp ) -set( tnl_SOURCES ${tnl_arrays_SOURCES} - ${tnl_config_SOURCES} +set( tnl_SOURCES ${tnl_config_SOURCES} + ${tnl_containers_SOURCES} ${tnl_devices_SOURCES} ${tnl_functions_SOURCES} ${tnl_images_SOURCES} ${tnl_matrices_SOURCES} + ${tnl_operators_SOURCES} + ${tnl_problems_SOURCES} ${tnl_solvers_SOURCES} - ${tnl_vectors_SOURCES} - ${tnl_core_SOURCES} ${tnl_legacy_SOURCES} - ${tnl_operators_SOURCES} - ${tnl_problems_SOURCES} - - ${common_SOURCES} - ) + + ${common_SOURCES} ) -set( tnl_CUDA__SOURCES ${tnl_arrays_CUDA__SOURCES} - ${tnl_config_CUDA__SOURCES} +set( tnl_CUDA__SOURCES ${tnl_config_CUDA__SOURCES} + ${tnl_containers_CUDA__SOURCES} ${tnl_devices_CUDA__SOURCES} ${tnl_functions_CUDA__SOURCES} ${tnl_images_CUDA__SOURCES} - - ${tnl_core_CUDA__SOURCES} - ${tnl_legacy_CUDA__SOURCES} ${tnl_matrices_CUDA__SOURCES} - ${tnl_problems_CUDA__SOURCES} ${tnl_operators_CUDA__SOURCES} + ${tnl_problems_CUDA__SOURCES} ${tnl_solvers_CUDA__SOURCES} - ${tnl_vectors_CUDA__SOURCES} + + + ${tnl_core_CUDA__SOURCES} + ${tnl_legacy_CUDA__SOURCES} ${common_SOURCES} ) diff --git a/src/TNL/Arrays/Array.h b/src/TNL/Containers/Array.h similarity index 93% rename from src/TNL/Arrays/Array.h rename to src/TNL/Containers/Array.h index e4605c70b94cbffc277008c3ea6ae05e05787c8c..8eb769622002c12ac6d5d55d68cc22d4ffeea175 100644 --- a/src/TNL/Arrays/Array.h +++ b/src/TNL/Containers/Array.h @@ -11,7 +11,7 @@ #pragma once #include <TNL/Object.h> -#include <TNL/Arrays/SharedArray.h> +#include <TNL/Containers/SharedArray.h> // Forward declarations namespace TNL { @@ -22,7 +22,7 @@ namespace Devices { } -namespace Arrays { +namespace Containers { template< typename Element, typename Device, typename Index > @@ -42,9 +42,9 @@ class Array : public virtual Object typedef Element ElementType; typedef Device DeviceType; typedef Index IndexType; - typedef Arrays::Array< Element, Devices::Host, Index > HostType; - typedef Arrays::Array< Element, Devices::Cuda, Index > CudaType; - typedef Arrays::Array< Element, Device, Index > ThisType; + typedef Containers::Array< Element, Devices::Host, Index > HostType; + typedef Containers::Array< Element, Devices::Cuda, Index > CudaType; + typedef Containers::Array< Element, Device, Index > ThisType; Array(); @@ -188,8 +188,8 @@ class Array : public virtual Object template< typename Element, typename Device, typename Index > std::ostream& operator << ( std::ostream& str, const Array< Element, Device, Index >& v ); -} // namespace Arrays +} // namespace Containers } // namespace TNL -#include <TNL/Arrays/Array_impl.h> +#include <TNL/Containers/Array_impl.h> diff --git a/src/TNL/Arrays/ArrayIO.h b/src/TNL/Containers/ArrayIO.h similarity index 97% rename from src/TNL/Arrays/ArrayIO.h rename to src/TNL/Containers/ArrayIO.h index 667d6ab88997acb186a1375ca58ddb9b7fd5e927..4930bbe2f7ff608462631930f1920bc413a2084c 100644 --- a/src/TNL/Arrays/ArrayIO.h +++ b/src/TNL/Containers/ArrayIO.h @@ -14,7 +14,7 @@ #include <TNL/File.h> namespace TNL { -namespace Arrays { +namespace Containers { template< typename Element, typename Device, @@ -80,5 +80,5 @@ class ArrayIO< Element, Device, Index, false > }; -} // namespace Arrays +} // namespace Containers } // namespace TNL diff --git a/src/TNL/Arrays/ArrayOperations.h b/src/TNL/Containers/ArrayOperations.h similarity index 96% rename from src/TNL/Arrays/ArrayOperations.h rename to src/TNL/Containers/ArrayOperations.h index 298575502a6303fda232a45f5a4b1712fdd0a374..042270d5b7455aeb06500a98ddc4b161613b477d 100644 --- a/src/TNL/Arrays/ArrayOperations.h +++ b/src/TNL/Containers/ArrayOperations.h @@ -14,7 +14,7 @@ #include <TNL/Devices/Cuda.h> namespace TNL { -namespace Arrays { +namespace Containers { template< typename DestinationDevice, typename SourceDevice = DestinationDevice > @@ -152,8 +152,8 @@ class ArrayOperations< Devices::Host, Devices::Cuda > const Index size ); }; -} // namespace Arrays +} // namespace Containers } // namespace TNL -#include <TNL/Arrays/ArrayOperationsHost_impl.h> -#include <TNL/Arrays/ArrayOperationsCuda_impl.h> +#include <TNL/Containers/ArrayOperationsHost_impl.h> +#include <TNL/Containers/ArrayOperationsCuda_impl.h> diff --git a/src/TNL/Arrays/ArrayOperationsCuda_impl.cpp b/src/TNL/Containers/ArrayOperationsCuda_impl.cpp similarity index 99% rename from src/TNL/Arrays/ArrayOperationsCuda_impl.cpp rename to src/TNL/Containers/ArrayOperationsCuda_impl.cpp index 7b2b5d72acd0f7022152d7750a9cffcfbdcd88b6..019b4f9ea48237e58237d9b964ce8403f50fee03 100644 --- a/src/TNL/Arrays/ArrayOperationsCuda_impl.cpp +++ b/src/TNL/Containers/ArrayOperationsCuda_impl.cpp @@ -8,10 +8,10 @@ /* See Copyright Notice in tnl/Copyright */ -#include <TNL/Arrays/ArrayOperations.h> +#include <TNL/Containers/ArrayOperations.h> namespace TNL { -namespace Arrays { +namespace Containers { #ifdef TEMPLATE_EXPLICIT_INSTANTIATION @@ -290,7 +290,7 @@ template bool ArrayOperations< Devices::Cuda >::setMemory< long double, long int #endif -} // namespace Arrays +} // namespace Containers } // namespace TNL diff --git a/src/TNL/Arrays/ArrayOperationsCuda_impl.cu b/src/TNL/Containers/ArrayOperationsCuda_impl.cu similarity index 100% rename from src/TNL/Arrays/ArrayOperationsCuda_impl.cu rename to src/TNL/Containers/ArrayOperationsCuda_impl.cu diff --git a/src/TNL/Arrays/ArrayOperationsCuda_impl.h b/src/TNL/Containers/ArrayOperationsCuda_impl.h similarity index 99% rename from src/TNL/Arrays/ArrayOperationsCuda_impl.h rename to src/TNL/Containers/ArrayOperationsCuda_impl.h index 6fbd3f2010160bd2f1f7c86178d72922df22b1bb..95702a78782c439cef4a711c36d2fe2b8b8de363 100644 --- a/src/TNL/Arrays/ArrayOperationsCuda_impl.h +++ b/src/TNL/Containers/ArrayOperationsCuda_impl.h @@ -17,7 +17,7 @@ #include <TNL/core/cuda/reduction-operations.h> namespace TNL { -namespace Arrays { +namespace Containers { template< typename Element, typename Index > bool ArrayOperations< Devices::Cuda >::allocateMemory( Element*& data, @@ -643,5 +643,5 @@ extern template bool ArrayOperations< Devices::Cuda >::setMemory< long double, l #endif -} // namespace Arrays +} // namespace Containers } // namespace TNL diff --git a/src/TNL/Arrays/ArrayOperationsHost_impl.cpp b/src/TNL/Containers/ArrayOperationsHost_impl.cpp similarity index 99% rename from src/TNL/Arrays/ArrayOperationsHost_impl.cpp rename to src/TNL/Containers/ArrayOperationsHost_impl.cpp index 6d39ac0306261cf65f04f75b189922154ea71b77..a684b3608e20d627a92939822b4d9e0db3228cb8 100644 --- a/src/TNL/Arrays/ArrayOperationsHost_impl.cpp +++ b/src/TNL/Containers/ArrayOperationsHost_impl.cpp @@ -8,10 +8,10 @@ /* See Copyright Notice in tnl/Copyright */ -#include <TNL/Arrays/ArrayOperations.h> +#include <TNL/Containers/ArrayOperations.h> namespace TNL { -namespace Arrays { +namespace Containers { #ifdef TEMPLATE_EXPLICIT_INSTANTIATION @@ -194,5 +194,5 @@ template bool ArrayOperations< Devices::Host >::setMemory< long double, long int #endif -} // namespace Arrays +} // namespace Containers } // namespace TNL \ No newline at end of file diff --git a/src/TNL/Arrays/ArrayOperationsHost_impl.cu b/src/TNL/Containers/ArrayOperationsHost_impl.cu similarity index 100% rename from src/TNL/Arrays/ArrayOperationsHost_impl.cu rename to src/TNL/Containers/ArrayOperationsHost_impl.cu diff --git a/src/TNL/Arrays/ArrayOperationsHost_impl.h b/src/TNL/Containers/ArrayOperationsHost_impl.h similarity index 99% rename from src/TNL/Arrays/ArrayOperationsHost_impl.h rename to src/TNL/Containers/ArrayOperationsHost_impl.h index c1a2b33a9d1ee5f7dc2fb40f999a26800f6d56c9..6bebb34a4e5ff52c5f6cb4ba6804a3073e7ad15f 100644 --- a/src/TNL/Arrays/ArrayOperationsHost_impl.h +++ b/src/TNL/Containers/ArrayOperationsHost_impl.h @@ -15,7 +15,7 @@ #include <string.h> namespace TNL { -namespace Arrays { +namespace Containers { template< typename Element, typename Index > bool ArrayOperations< Devices::Host >::allocateMemory( Element*& data, @@ -284,5 +284,5 @@ extern template bool ArrayOperations< Devices::Host >::setMemory< long double, l #endif -} // namespace Arrays +} // namespace Containers } // namespace TNL diff --git a/src/TNL/Arrays/Array_impl.cpp b/src/TNL/Containers/Array_impl.cpp similarity index 95% rename from src/TNL/Arrays/Array_impl.cpp rename to src/TNL/Containers/Array_impl.cpp index 7a9109020f9af42bf138751e3d26d02009f3837a..966b0e5f35292a6a0a000b5b030108d67769b4be 100644 --- a/src/TNL/Arrays/Array_impl.cpp +++ b/src/TNL/Containers/Array_impl.cpp @@ -8,10 +8,10 @@ /* See Copyright Notice in tnl/Copyright */ -#include <TNL/Arrays/Array.h> +#include <TNL/Containers/Array.h> namespace TNL { -namespace Arrays { +namespace Containers { #ifdef TEMPLATE_EXPLICIT_INSTANTIATION @@ -57,5 +57,5 @@ template class Array< long double, Devices::Cuda, long int >; #endif -} // namespace Arrays +} // namespace Containers } // namespace TNL \ No newline at end of file diff --git a/src/TNL/Arrays/Array_impl.cu b/src/TNL/Containers/Array_impl.cu similarity index 100% rename from src/TNL/Arrays/Array_impl.cu rename to src/TNL/Containers/Array_impl.cu diff --git a/src/TNL/Arrays/Array_impl.h b/src/TNL/Containers/Array_impl.h similarity index 97% rename from src/TNL/Arrays/Array_impl.h rename to src/TNL/Containers/Array_impl.h index 3514cf1e2ef9f528db95d0d89db079be49cc69ca..e386214e9e8766e952a10f8aa5b27ac69532efd0 100644 --- a/src/TNL/Arrays/Array_impl.h +++ b/src/TNL/Containers/Array_impl.h @@ -15,12 +15,12 @@ #include <TNL/File.h> #include <TNL/core/mfuncs.h> #include <TNL/core/param-types.h> -#include <TNL/Arrays/ArrayOperations.h> -#include <TNL/Arrays/ArrayIO.h> -#include <TNL/Arrays/Array.h> +#include <TNL/Containers/ArrayOperations.h> +#include <TNL/Containers/ArrayIO.h> +#include <TNL/Containers/Array.h> namespace TNL { -namespace Arrays { +namespace Containers { template< typename Element, typename Device, @@ -100,11 +100,10 @@ String Array< Element, Device, Index >:: getType() { - return String( "Array< " ) + - TNL::getType< Element >() + ", " + - Device :: getDeviceType() + ", " + - TNL::getType< Index >() + - " >"; + return String( "Containers::Array< " ) + + TNL::getType< Element >() + ", " + + Device::getDeviceType() + ", " + + TNL::getType< Index >() + " >"; }; template< typename Element, @@ -659,5 +658,5 @@ extern template class Array< long double, Devices::Host, long int >; #endif -} // namespace Arrays +} // namespace Containers } // namespace TNL diff --git a/src/TNL/Arrays/CMakeLists.txt b/src/TNL/Containers/CMakeLists.txt similarity index 56% rename from src/TNL/Arrays/CMakeLists.txt rename to src/TNL/Containers/CMakeLists.txt index f489ecf81f46d02da43625da1422c4fd04125dc1..a8f7228e1a6c0f0cc35fb1cd33671ae8a96a9e6c 100755 --- a/src/TNL/Arrays/CMakeLists.txt +++ b/src/TNL/Containers/CMakeLists.txt @@ -16,18 +16,40 @@ set( headers Array.h StaticArray_impl.h StaticArray1D_impl.h StaticArray2D_impl.h - StaticArray3D_impl.h ) + StaticArray3D_impl.h + Vector.h + Vector_impl.h + MultiVector.h + MultiVector1D_impl.h + MultiVector2D_impl.h + MultiVector3D_impl.h + MultiVector4D_impl.h + VectorOperations.h + VectorOperationsHost_impl.h + VectorOperationsCuda_impl.h + SharedVector.h + SharedVector_impl.h + StaticVector.h + StaticVector_impl.h + StaticVector1D_impl.h + StaticVector2D_impl.h + StaticVector3D_impl.h ) -SET( CURRENT_DIR ${CMAKE_SOURCE_DIR}/src/TNL/Arrays ) +SET( CURRENT_DIR ${CMAKE_SOURCE_DIR}/src/TNL/Containers ) set( common_SOURCES ${CURRENT_DIR}/SharedArray_impl.cpp ${CURRENT_DIR}/MultiArray_impl.cpp ${CURRENT_DIR}/Array_impl.cpp ${CURRENT_DIR}/StaticArray_impl.cpp + ${CURRENT_DIR}/VectorOperationsHost_impl.cpp + ${CURRENT_DIR}/MultiVector_impl.cpp + ${CURRENT_DIR}/SharedVector_impl.cpp + ${CURRENT_DIR}/Vector_impl.cpp + ${CURRENT_DIR}/StaticVector_impl.cpp ) IF( BUILD_CUDA ) - set( tnl_arrays_CUDA__SOURCES + set( tnl_containers_CUDA__SOURCES ${common_SOURCES} ${CURRENT_DIR}/ArrayOperationsHost_impl.cu ${CURRENT_DIR}/ArrayOperationsCuda_impl.cu @@ -35,6 +57,9 @@ IF( BUILD_CUDA ) ${CURRENT_DIR}/SharedArray_impl.cu ${CURRENT_DIR}/MultiArray_impl.cu ${CURRENT_DIR}/StaticArray_impl.cu + ${CURRENT_DIR}/VectorOperationsCuda_impl.cu + ${CURRENT_DIR}/Vector_impl.cu + ${CURRENT_DIR}/StaticVector_impl.cu PARENT_SCOPE ) ELSE() set( common_SOURCES @@ -44,8 +69,8 @@ ELSE() ) ENDIF() -set( tnl_arrays_SOURCES +set( tnl_containers_SOURCES ${common_SOURCES} PARENT_SCOPE ) -INSTALL( FILES ${headers} DESTINATION include/tnl-${tnlVersion}/TNL/Arrays ) \ No newline at end of file +INSTALL( FILES ${headers} DESTINATION include/tnl-${tnlVersion}/TNL/Containers ) \ No newline at end of file diff --git a/src/TNL/Arrays/ConstSharedArray.h b/src/TNL/Containers/ConstSharedArray.h similarity index 96% rename from src/TNL/Arrays/ConstSharedArray.h rename to src/TNL/Containers/ConstSharedArray.h index c4b0eb3650df0d7e623cc5583411320f31ebbf24..d9435f843739dd6e3b300a590adaabea198eeb99 100644 --- a/src/TNL/Arrays/ConstSharedArray.h +++ b/src/TNL/Containers/ConstSharedArray.h @@ -21,7 +21,7 @@ namespace Devices class Host; } -namespace Arrays { +namespace Containers { template< typename Element, typename Device, typename Index > @@ -116,9 +116,9 @@ class tnlConstSharedArray : public Object template< typename Element, typename Device, typename Index > std::ostream& operator << ( std::ostream& str, const tnlConstSharedArray< Element, Device, Index >& v ); -} // namespace Arrays +} // namespace Containers } // namespace TNL -#include <TNL/Arrays/ConstSharedArray_impl.h> +#include <TNL/Containers/ConstSharedArray_impl.h> diff --git a/src/TNL/Arrays/ConstSharedArray_impl.h b/src/TNL/Containers/ConstSharedArray_impl.h similarity index 98% rename from src/TNL/Arrays/ConstSharedArray_impl.h rename to src/TNL/Containers/ConstSharedArray_impl.h index b989fcd02b734707bb4f3575ed8aeaa27d0a9145..439ec67b180b4cc5179417bd7a010b2d96d6cccd 100644 --- a/src/TNL/Arrays/ConstSharedArray_impl.h +++ b/src/TNL/Containers/ConstSharedArray_impl.h @@ -12,13 +12,13 @@ #include <iostream> #include <TNL/File.h> -#include <TNL/Arrays/Array.h> -#include <TNL/Arrays/ArrayOperations.h> +#include <TNL/Containers/Array.h> +#include <TNL/Containers/ArrayOperations.h> #include <TNL/core/mfuncs.h> #include <TNL/core/param-types.h> namespace TNL { -namespace Arrays { +namespace Containers { template< typename Element, typename Device, @@ -313,5 +313,5 @@ extern template class tnlConstSharedArray< long double, Devices::Cuda, long int #endif -} // namespace Arrays +} // namespace Containers } // namespace TNL diff --git a/src/TNL/Arrays/MultiArray.h b/src/TNL/Containers/MultiArray.h similarity index 91% rename from src/TNL/Arrays/MultiArray.h rename to src/TNL/Containers/MultiArray.h index e0dda062d3d9557d28179398259d5793b29c8fd6..b062fb605109691bdb3e18ca3dbfe4b6a31f8ddd 100644 --- a/src/TNL/Arrays/MultiArray.h +++ b/src/TNL/Containers/MultiArray.h @@ -11,12 +11,12 @@ #pragma once #include <iostream> -#include <TNL/Arrays/Array.h> -#include <TNL/Vectors/StaticVector.h> +#include <TNL/Containers/Array.h> +#include <TNL/Containers/StaticVector.h> #include <TNL/Assert.h> namespace TNL { -namespace Arrays { +namespace Containers { template< int Dimensions, typename Element = double, typename Device = Devices::Host, typename Index = int > class MultiArray : public Array< Element, Device, Index > @@ -47,11 +47,11 @@ class MultiArray< 1, Element, Device, Index > : public Array< Element, Device, I bool setDimensions( const Index iSize ); - bool setDimensions( const Vectors::StaticVector< 1, Index >& dimensions ); + bool setDimensions( const Containers::StaticVector< 1, Index >& dimensions ); __cuda_callable__ void getDimensions( Index& iSize ) const; - __cuda_callable__ const Vectors::StaticVector< 1, Index >& getDimensions() const; + __cuda_callable__ const Containers::StaticVector< 1, Index >& getDimensions() const; //! Set dimensions of the array using another array as a template template< typename MultiArray > @@ -99,7 +99,7 @@ class MultiArray< 1, Element, Device, Index > : public Array< Element, Device, I protected: - Vectors::StaticVector< 1, Index > dimensions; + Containers::StaticVector< 1, Index > dimensions; }; template< typename Element, typename Device, typename Index > @@ -126,11 +126,11 @@ class MultiArray< 2, Element, Device, Index > : public Array< Element, Device, I bool setDimensions( const Index jSize, const Index iSize ); - bool setDimensions( const Vectors::StaticVector< 2, Index >& dimensions ); + bool setDimensions( const Containers::StaticVector< 2, Index >& dimensions ); __cuda_callable__ void getDimensions( Index& jSize, Index& iSize ) const; - __cuda_callable__ const Vectors::StaticVector< 2, Index >& getDimensions() const; + __cuda_callable__ const Containers::StaticVector< 2, Index >& getDimensions() const; //! Set dimensions of the array using another array as a template template< typename MultiArray > @@ -181,7 +181,7 @@ class MultiArray< 2, Element, Device, Index > : public Array< Element, Device, I protected: - Vectors::StaticVector< 2, Index > dimensions; + Containers::StaticVector< 2, Index > dimensions; }; template< typename Element, typename Device, typename Index > @@ -209,11 +209,11 @@ class MultiArray< 3, Element, Device, Index > : public Array< Element, Device, I bool setDimensions( const Index k, const Index j, const Index iSize ); - bool setDimensions( const Vectors::StaticVector< 3, Index >& dimensions ); + bool setDimensions( const Containers::StaticVector< 3, Index >& dimensions ); __cuda_callable__ void getDimensions( Index& k, Index& j, Index& iSize ) const; - __cuda_callable__ const Vectors::StaticVector< 3, Index >& getDimensions() const; + __cuda_callable__ const Containers::StaticVector< 3, Index >& getDimensions() const; //! Set dimensions of the array using another array as a template template< typename MultiArrayT > @@ -264,7 +264,7 @@ class MultiArray< 3, Element, Device, Index > : public Array< Element, Device, I protected: - Vectors::StaticVector< 3, Index > dimensions; + Containers::StaticVector< 3, Index > dimensions; }; template< typename Element, typename Device, typename Index > @@ -292,11 +292,11 @@ class MultiArray< 4, Element, Device, Index > : public Array< Element, Device, I bool setDimensions( const Index l, const Index k, const Index j, const Index iSize ); - bool setDimensions( const Vectors::StaticVector< 4, Index >& dimensions ); + bool setDimensions( const Containers::StaticVector< 4, Index >& dimensions ); __cuda_callable__ void getDimensions( Index& l, Index& k, Index& j, Index& iSize ) const; - __cuda_callable__ const Vectors::StaticVector< 4, Index >& getDimensions() const; + __cuda_callable__ const Containers::StaticVector< 4, Index >& getDimensions() const; //! Set dimensions of the array using another array as a template template< typename MultiArrayT > @@ -347,7 +347,7 @@ class MultiArray< 4, Element, Device, Index > : public Array< Element, Device, I protected: - Vectors::StaticVector< 4, Index > dimensions; + Containers::StaticVector< 4, Index > dimensions; }; template< typename Element, typename device, typename Index > @@ -362,16 +362,16 @@ std::ostream& operator << ( std::ostream& str, const MultiArray< 3, Element, dev template< typename Element, typename device, typename Index > std::ostream& operator << ( std::ostream& str, const MultiArray< 4, Element, device, Index >& array ); -} // namespace Arrays +} // namespace Containers } // namespace TNL -#include <TNL/Arrays/MultiArray1D_impl.h> -#include <TNL/Arrays/MultiArray2D_impl.h> -#include <TNL/Arrays/MultiArray3D_impl.h> -#include <TNL/Arrays/MultiArray4D_impl.h> +#include <TNL/Containers/MultiArray1D_impl.h> +#include <TNL/Containers/MultiArray2D_impl.h> +#include <TNL/Containers/MultiArray3D_impl.h> +#include <TNL/Containers/MultiArray4D_impl.h> namespace TNL { -namespace Arrays { +namespace Containers { #ifdef TEMPLATE_EXPLICIT_INSTANTIATION @@ -456,5 +456,5 @@ extern template class MultiArray< 4, double, Devices::Cuda, long int >;*/ #endif -} // namespace Arrays +} // namespace Containers } // namespace TNL diff --git a/src/TNL/Arrays/MultiArray1D_impl.h b/src/TNL/Containers/MultiArray1D_impl.h similarity index 96% rename from src/TNL/Arrays/MultiArray1D_impl.h rename to src/TNL/Containers/MultiArray1D_impl.h index 6f3ddddcc64c85c2c8ddd8f4f0499d7ac34b63f8..3a75633a99e3f37e9fead7af0489bd057738a462 100644 --- a/src/TNL/Arrays/MultiArray1D_impl.h +++ b/src/TNL/Containers/MultiArray1D_impl.h @@ -11,7 +11,7 @@ #pragma once namespace TNL { -namespace Arrays { +namespace Containers { template< typename Element, typename Device, typename Index > MultiArray< 1, Element, Device, Index > :: MultiArray() @@ -21,7 +21,7 @@ MultiArray< 1, Element, Device, Index > :: MultiArray() template< typename Element, typename Device, typename Index > String MultiArray< 1, Element, Device, Index > :: getType() { - return String( "MultiArray< ") + + return String( "Containers::MultiArray< ") + String( Dimensions ) + String( ", " ) + String( TNL::getType< Element >() ) + @@ -66,7 +66,7 @@ bool MultiArray< 1, Element, Device, Index > :: setDimensions( const Index iSize } template< typename Element, typename Device, typename Index > -bool MultiArray< 1, Element, Device, Index > :: setDimensions( const Vectors::StaticVector< 1, Index >& dimensions ) +bool MultiArray< 1, Element, Device, Index > :: setDimensions( const Containers::StaticVector< 1, Index >& dimensions ) { Assert( dimensions[ 0 ] > 0, std::cerr << " dimensions[ 0 ] = " << dimensions[ 0 ] ); @@ -84,7 +84,7 @@ bool MultiArray< 1, Element, Device, Index > :: setLike( const MultiArrayT& mult template< typename Element, typename Device, typename Index > void MultiArray< 1, Element, Device, Index >::reset() { - this->dimensions = Vectors::StaticVector< 1, Index >( ( Index ) 0 ); + this->dimensions = Containers::StaticVector< 1, Index >( ( Index ) 0 ); Array< Element, Device, Index >::reset(); } @@ -97,7 +97,7 @@ void MultiArray< 1, Element, Device, Index > :: getDimensions( Index& xSize ) co template< typename Element, typename Device, typename Index > __cuda_callable__ -const Vectors::StaticVector< 1, Index >& MultiArray< 1, Element, Device, Index > :: getDimensions() const +const Containers::StaticVector< 1, Index >& MultiArray< 1, Element, Device, Index > :: getDimensions() const { return this->dimensions; } @@ -237,5 +237,5 @@ std::ostream& operator << ( std::ostream& str, const MultiArray< 1, Element, Dev return str; } -} // namespace Arrays +} // namespace Containers } // namespace TNL diff --git a/src/TNL/Arrays/MultiArray2D_impl.h b/src/TNL/Containers/MultiArray2D_impl.h similarity index 96% rename from src/TNL/Arrays/MultiArray2D_impl.h rename to src/TNL/Containers/MultiArray2D_impl.h index ce401b5061117e9c7afd32cc02f5c6e7cf611f7f..83dca39ffb41b69887716c12020d0b5b20663753 100644 --- a/src/TNL/Arrays/MultiArray2D_impl.h +++ b/src/TNL/Containers/MultiArray2D_impl.h @@ -11,7 +11,7 @@ #pragma once namespace TNL { -namespace Arrays { +namespace Containers { template< typename Element, typename Device, typename Index > MultiArray< 2, Element, Device, Index > :: MultiArray() @@ -21,7 +21,7 @@ MultiArray< 2, Element, Device, Index > :: MultiArray() template< typename Element, typename Device, typename Index > String MultiArray< 2, Element, Device, Index > :: getType() { - return String( "MultiArray< ") + + return String( "Containers::MultiArray< ") + String( Dimensions ) + String( ", " ) + String( TNL::getType< Element >() ) + @@ -70,7 +70,7 @@ bool MultiArray< 2, Element, Device, Index > :: setDimensions( const Index jSize } template< typename Element, typename Device, typename Index > -bool MultiArray< 2, Element, Device, Index > :: setDimensions( const Vectors::StaticVector< 2, Index >& dimensions ) +bool MultiArray< 2, Element, Device, Index > :: setDimensions( const Containers::StaticVector< 2, Index >& dimensions ) { Assert( dimensions[ 0 ] > 0 && dimensions[ 1 ] > 0, std::cerr << "dimensions = " << dimensions ); @@ -92,7 +92,7 @@ bool MultiArray< 2, Element, Device, Index > :: setLike( const MultiArrayT& mult template< typename Element, typename Device, typename Index > void MultiArray< 2, Element, Device, Index >::reset() { - this->dimensions = Vectors::StaticVector< 2, Index >( ( Index ) 0 ); + this->dimensions = Containers::StaticVector< 2, Index >( ( Index ) 0 ); Array< Element, Device, Index >::reset(); } @@ -106,7 +106,7 @@ void MultiArray< 2, Element, Device, Index > :: getDimensions( Index& jSize, Ind template< typename Element, typename Device, typename Index > __cuda_callable__ -const Vectors::StaticVector< 2, Index >& MultiArray< 2, Element, Device, Index > :: getDimensions() const +const Containers::StaticVector< 2, Index >& MultiArray< 2, Element, Device, Index > :: getDimensions() const { return this->dimensions; } @@ -251,5 +251,5 @@ std::ostream& operator << ( std::ostream& str, const MultiArray< 2, Element, Dev return str; } -} // namespace Arrays +} // namespace Containers } // namespace TNL diff --git a/src/TNL/Arrays/MultiArray3D_impl.h b/src/TNL/Containers/MultiArray3D_impl.h similarity index 96% rename from src/TNL/Arrays/MultiArray3D_impl.h rename to src/TNL/Containers/MultiArray3D_impl.h index 881d7423652bb1a859af82026f35da9af76e2b47..fe7dd87412a8ed493b12b3265836f38da0c4a2d1 100644 --- a/src/TNL/Arrays/MultiArray3D_impl.h +++ b/src/TNL/Containers/MultiArray3D_impl.h @@ -11,7 +11,7 @@ #pragma once namespace TNL { -namespace Arrays { +namespace Containers { template< typename Element, typename Device, typename Index > MultiArray< 3, Element, Device, Index > :: MultiArray() @@ -21,7 +21,7 @@ MultiArray< 3, Element, Device, Index > :: MultiArray() template< typename Element, typename Device, typename Index > String MultiArray< 3, Element, Device, Index > :: getType() { - return String( "MultiArray< ") + + return String( "Containers::MultiArray< ") + String( Dimensions ) + String( ", " ) + String( TNL::getType< Element >() ) + @@ -73,7 +73,7 @@ bool MultiArray< 3, Element, Device, Index > :: setDimensions( const Index kSize } template< typename Element, typename Device, typename Index > -bool MultiArray< 3, Element, Device, Index > :: setDimensions( const Vectors::StaticVector< 3, Index >& dimensions ) +bool MultiArray< 3, Element, Device, Index > :: setDimensions( const Containers::StaticVector< 3, Index >& dimensions ) { Assert( dimensions[ 0 ] > 0 && dimensions[ 1 ] > 0 && dimensions[ 2 ], std::cerr << "dimensions = " << dimensions ); @@ -98,7 +98,7 @@ bool MultiArray< 3, Element, Device, Index > :: setLike( const MultiArrayT& mult template< typename Element, typename Device, typename Index > void MultiArray< 3, Element, Device, Index >::reset() { - this->dimensions = Vectors::StaticVector< 3, Index >( ( Index ) 0 ); + this->dimensions = Containers::StaticVector< 3, Index >( ( Index ) 0 ); Array< Element, Device, Index >::reset(); } @@ -115,7 +115,7 @@ void MultiArray< 3, Element, Device, Index > :: getDimensions( Index& kSize, template< typename Element, typename Device, typename Index > __cuda_callable__ -const Vectors::StaticVector< 3, Index >& MultiArray< 3, Element, Device, Index > :: getDimensions() const +const Containers::StaticVector< 3, Index >& MultiArray< 3, Element, Device, Index > :: getDimensions() const { return this->dimensions; } @@ -267,5 +267,5 @@ std::ostream& operator << ( std::ostream& str, const MultiArray< 3, Element, Dev return str; } -} // namespace Arrays +} // namespace Containers } // namespace TNL diff --git a/src/TNL/Arrays/MultiArray4D_impl.h b/src/TNL/Containers/MultiArray4D_impl.h similarity index 97% rename from src/TNL/Arrays/MultiArray4D_impl.h rename to src/TNL/Containers/MultiArray4D_impl.h index 262785249a43a9712ae35778f373c3e089f2c10b..7bcf10917dcb53ac5e047f6de0fd75bc872769ee 100644 --- a/src/TNL/Arrays/MultiArray4D_impl.h +++ b/src/TNL/Containers/MultiArray4D_impl.h @@ -11,7 +11,7 @@ #pragma once namespace TNL { -namespace Arrays { +namespace Containers { template< typename Element, typename Device, typename Index > @@ -22,7 +22,7 @@ MultiArray< 4, Element, Device, Index > :: MultiArray() template< typename Element, typename Device, typename Index > String MultiArray< 4, Element, Device, Index > :: getType() { - return String( "MultiArray< ") + + return String( "Containers::MultiArray< ") + String( Dimensions ) + String( ", " ) + String( TNL::getType< Element >() ) + @@ -77,7 +77,7 @@ bool MultiArray< 4, Element, Device, Index > :: setDimensions( const Index lSize } template< typename Element, typename Device, typename Index > -bool MultiArray< 4, Element, Device, Index > :: setDimensions( const Vectors::StaticVector< 4, Index >& dimensions ) +bool MultiArray< 4, Element, Device, Index > :: setDimensions( const Containers::StaticVector< 4, Index >& dimensions ) { Assert( dimensions[ 0 ] > 0 && dimensions[ 1 ] > 0 && dimensions[ 2 ] && dimensions[ 3 ] > 0, std::cerr << "dimensions = " << dimensions ); @@ -104,7 +104,7 @@ bool MultiArray< 4, Element, Device, Index > :: setLike( const MultiArrayT& mult template< typename Element, typename Device, typename Index > void MultiArray< 4, Element, Device, Index >::reset() { - this->dimensions = Vectors::StaticVector< 4, Index >( ( Index ) 0 ); + this->dimensions = Containers::StaticVector< 4, Index >( ( Index ) 0 ); Array< Element, Device, Index >::reset(); } @@ -123,7 +123,7 @@ void MultiArray< 4, Element, Device, Index > :: getDimensions( Index& lSize, template< typename Element, typename Device, typename Index > __cuda_callable__ -const Vectors::StaticVector< 4, Index >& MultiArray< 4, Element, Device, Index > :: getDimensions() const +const Containers::StaticVector< 4, Index >& MultiArray< 4, Element, Device, Index > :: getDimensions() const { return this->dimensions; } @@ -286,5 +286,5 @@ std::ostream& operator << ( std::ostream& str, const MultiArray< 4, Element, Dev return str; } -} // namespace Arrays +} // namespace Containers } // namespace TNL diff --git a/src/TNL/Arrays/MultiArray_impl.cpp b/src/TNL/Containers/MultiArray_impl.cpp similarity index 97% rename from src/TNL/Arrays/MultiArray_impl.cpp rename to src/TNL/Containers/MultiArray_impl.cpp index 87903cecffdc975b1783d9dfcf026683dd39687b..392c89cb8802233041f5f644e6b3275063fb1c0e 100644 --- a/src/TNL/Arrays/MultiArray_impl.cpp +++ b/src/TNL/Containers/MultiArray_impl.cpp @@ -8,10 +8,10 @@ /* See Copyright Notice in tnl/Copyright */ -#include <TNL/Arrays/MultiArray.h> +#include <TNL/Containers/MultiArray.h> namespace TNL { -namespace Arrays { +namespace Containers { #ifdef TEMPLATE_EXPLICIT_INSTANTIATION @@ -109,7 +109,7 @@ template class MultiArray< 4, double, Devices::Cuda, long int >; #endif -} // namespace Arrays +} // namespace Containers } // namespace TNL diff --git a/src/TNL/Arrays/MultiArray_impl.cu b/src/TNL/Containers/MultiArray_impl.cu similarity index 100% rename from src/TNL/Arrays/MultiArray_impl.cu rename to src/TNL/Containers/MultiArray_impl.cu diff --git a/src/TNL/Vectors/MultiVector.h b/src/TNL/Containers/MultiVector.h similarity index 97% rename from src/TNL/Vectors/MultiVector.h rename to src/TNL/Containers/MultiVector.h index f02c43924f9cc3d82180bbc103588f4c806a225a..ecd64f69f3fcb94e5058e9c124cfc6c56a7435dd 100644 --- a/src/TNL/Vectors/MultiVector.h +++ b/src/TNL/Containers/MultiVector.h @@ -10,12 +10,12 @@ #pragma once -#include <TNL/Vectors/Vector.h> -#include <TNL/Vectors/StaticVector.h> +#include <TNL/Containers/Vector.h> +#include <TNL/Containers/StaticVector.h> #include <TNL/Assert.h> namespace TNL { -namespace Vectors { +namespace Containers { template< int Dimensions, typename Real = double, typename Device = Devices::Host, typename Index = int > class MultiVector : public Vector< Real, Device, Index > @@ -360,10 +360,10 @@ std::ostream& operator << ( std::ostream& str, const MultiVector< 3, Real, devic template< typename Real, typename device, typename Index > std::ostream& operator << ( std::ostream& str, const MultiVector< 4, Real, device, Index >& Vector ); -} // namespace Vectors +} // namespace Containers } // namespace TNL -#include <TNL/Vectors/MultiVector1D_impl.h> -#include <TNL/Vectors/MultiVector2D_impl.h> -#include <TNL/Vectors/MultiVector3D_impl.h> -#include <TNL/Vectors/MultiVector4D_impl.h> +#include <TNL/Containers/MultiVector1D_impl.h> +#include <TNL/Containers/MultiVector2D_impl.h> +#include <TNL/Containers/MultiVector3D_impl.h> +#include <TNL/Containers/MultiVector4D_impl.h> diff --git a/src/TNL/Vectors/MultiVector1D_impl.h b/src/TNL/Containers/MultiVector1D_impl.h similarity index 98% rename from src/TNL/Vectors/MultiVector1D_impl.h rename to src/TNL/Containers/MultiVector1D_impl.h index dae95003f3e1110a1de47534c10296c84bea0437..3fc35fee6cde0af4599dfe609b33d2bb589a7529 100644 --- a/src/TNL/Vectors/MultiVector1D_impl.h +++ b/src/TNL/Containers/MultiVector1D_impl.h @@ -11,7 +11,7 @@ #pragma once namespace TNL { -namespace Vectors { +namespace Containers { template< typename Real, typename Device, typename Index > MultiVector< 1, Real, Device, Index > :: MultiVector() @@ -21,7 +21,7 @@ MultiVector< 1, Real, Device, Index > :: MultiVector() template< typename Real, typename Device, typename Index > String MultiVector< 1, Real, Device, Index > :: getType() { - return String( "MultiVector< ") + + return String( "Containers::MultiVector< ") + String( Dimensions ) + String( ", " ) + String( TNL::getType< Real >() ) + @@ -255,5 +255,5 @@ extern template class MultiVector< 1, double, Devices::Cuda, long int >; #endif -} // namespace Vectors +} // namespace Containers } // namespace TNL diff --git a/src/TNL/Vectors/MultiVector2D_impl.h b/src/TNL/Containers/MultiVector2D_impl.h similarity index 98% rename from src/TNL/Vectors/MultiVector2D_impl.h rename to src/TNL/Containers/MultiVector2D_impl.h index bf02c62143238f8bb383ce8dc7a88ad0b5d1fbb5..dd95fdb28ae65eccc65dc70852bc059889255ed6 100644 --- a/src/TNL/Vectors/MultiVector2D_impl.h +++ b/src/TNL/Containers/MultiVector2D_impl.h @@ -11,7 +11,7 @@ #pragma once namespace TNL { -namespace Vectors { +namespace Containers { template< typename Real, typename Device, typename Index > MultiVector< 2, Real, Device, Index > :: MultiVector() @@ -21,7 +21,7 @@ MultiVector< 2, Real, Device, Index > :: MultiVector() template< typename Real, typename Device, typename Index > String MultiVector< 2, Real, Device, Index > :: getType() { - return String( "MultiVector< ") + + return String( "Containers::MultiVector< ") + String( Dimensions ) + String( ", " ) + String( TNL::getType< Real >() ) + @@ -266,5 +266,5 @@ extern template class MultiVector< 2, double, Devices::Cuda, long int >; #endif -} // namespace Vectors +} // namespace Containers } // namespace TNL diff --git a/src/TNL/Vectors/MultiVector3D_impl.h b/src/TNL/Containers/MultiVector3D_impl.h similarity index 99% rename from src/TNL/Vectors/MultiVector3D_impl.h rename to src/TNL/Containers/MultiVector3D_impl.h index da050468b81c3bd31d5fa4ad0fa8008157aecdd4..7d551b923b766ffe27e105c0e58dc707ea832419 100644 --- a/src/TNL/Vectors/MultiVector3D_impl.h +++ b/src/TNL/Containers/MultiVector3D_impl.h @@ -11,7 +11,7 @@ #pragma once namespace TNL { -namespace Vectors { +namespace Containers { template< typename Real, typename Device, typename Index > MultiVector< 3, Real, Device, Index > :: MultiVector() @@ -21,7 +21,7 @@ MultiVector< 3, Real, Device, Index > :: MultiVector() template< typename Real, typename Device, typename Index > String MultiVector< 3, Real, Device, Index > :: getType() { - return String( "MultiVector< ") + + return String( "Containers::MultiVector< ") + String( Dimensions ) + String( ", " ) + String( TNL::getType< Real >() ) + @@ -290,5 +290,5 @@ extern template class MultiVector< 3, double, Devices::Cuda, long int >; #endif -} // namespace Vectors +} // namespace Containers } // namespace TNL diff --git a/src/TNL/Vectors/MultiVector4D_impl.h b/src/TNL/Containers/MultiVector4D_impl.h similarity index 99% rename from src/TNL/Vectors/MultiVector4D_impl.h rename to src/TNL/Containers/MultiVector4D_impl.h index dea14ad4991a268983fd39769f2b887205c7bf35..a4ad6262b5e296c6239327c5ea055835aa55a71d 100644 --- a/src/TNL/Vectors/MultiVector4D_impl.h +++ b/src/TNL/Containers/MultiVector4D_impl.h @@ -11,7 +11,7 @@ #pragma once namespace TNL { -namespace Vectors { +namespace Containers { template< typename Real, typename Device, typename Index > MultiVector< 4, Real, Device, Index > :: MultiVector() @@ -21,7 +21,7 @@ MultiVector< 4, Real, Device, Index > :: MultiVector() template< typename Real, typename Device, typename Index > String MultiVector< 4, Real, Device, Index > :: getType() { - return String( "MultiVector< ") + + return String( "Containers::MultiVector< ") + String( Dimensions ) + String( ", " ) + String( TNL::getType< Real >() ) + @@ -311,5 +311,5 @@ extern template class MultiVector< 4, double, Devices::Cuda, long int >; #endif -} // namespace Vectors +} // namespace Containers } // namespace TNL diff --git a/src/TNL/Vectors/MultiVector_impl.cpp b/src/TNL/Containers/MultiVector_impl.cpp similarity index 97% rename from src/TNL/Vectors/MultiVector_impl.cpp rename to src/TNL/Containers/MultiVector_impl.cpp index 71bb42460a532060012ba890952a52ae317b4e4a..0f26bf4c255281389838ba49ebf45900c53d358d 100644 --- a/src/TNL/Vectors/MultiVector_impl.cpp +++ b/src/TNL/Containers/MultiVector_impl.cpp @@ -8,10 +8,10 @@ /* See Copyright Notice in tnl/Copyright */ -#include <TNL/Vectors/MultiVector.h> +#include <TNL/Containers/MultiVector.h> namespace TNL { -namespace Vectors { +namespace Containers { #ifdef TEMPLATE_EXPLICIT_INSTANTIATION @@ -105,7 +105,7 @@ template class MultiVector< 4, double, Devices::Cuda, long int >; #endif #endif -} // namespace Vectors +} // namespace Containers } // namespace TNL diff --git a/src/TNL/Arrays/SharedArray.h b/src/TNL/Containers/SharedArray.h similarity index 97% rename from src/TNL/Arrays/SharedArray.h rename to src/TNL/Containers/SharedArray.h index d28d77420d744311fac856b30f12347ac6f3c62c..0c4684830b9addd29e55a8d37fcbf34ceda9aafe 100644 --- a/src/TNL/Arrays/SharedArray.h +++ b/src/TNL/Containers/SharedArray.h @@ -22,7 +22,7 @@ namespace Devices { class Cuda; } -namespace Arrays { +namespace Containers { template< typename Element, typename Device, typename Index > @@ -152,7 +152,7 @@ class SharedArray : public Object template< typename Element, typename Device, typename Index > std::ostream& operator << ( std::ostream& str, const SharedArray< Element, Device, Index >& v ); -} // namespace Arrays +} // namespace Containers } // namespace TNL -#include <TNL/Arrays/SharedArray_impl.h> +#include <TNL/Containers/SharedArray_impl.h> diff --git a/src/TNL/Arrays/SharedArray_impl.cpp b/src/TNL/Containers/SharedArray_impl.cpp similarity index 94% rename from src/TNL/Arrays/SharedArray_impl.cpp rename to src/TNL/Containers/SharedArray_impl.cpp index 9af61c3f461cdd4756a04bc805005b00e77ae52f..fb12eda8f7180ed3a90571793dd3fafbc5c77a27 100644 --- a/src/TNL/Arrays/SharedArray_impl.cpp +++ b/src/TNL/Containers/SharedArray_impl.cpp @@ -8,10 +8,10 @@ /* See Copyright Notice in tnl/Copyright */ -#include <TNL/Arrays/SharedArray.h> +#include <TNL/Containers/SharedArray.h> namespace TNL { -namespace Arrays { +namespace Containers { #ifdef TEMPLATE_EXPLICIT_INSTANTIATION @@ -55,7 +55,7 @@ template class SharedArray< long double, Devices::Cuda, long int >; #endif -} // namespace Arrays +} // namespace Containers } // namespace TNL diff --git a/src/TNL/Arrays/SharedArray_impl.cu b/src/TNL/Containers/SharedArray_impl.cu similarity index 100% rename from src/TNL/Arrays/SharedArray_impl.cu rename to src/TNL/Containers/SharedArray_impl.cu diff --git a/src/TNL/Arrays/SharedArray_impl.h b/src/TNL/Containers/SharedArray_impl.h similarity index 97% rename from src/TNL/Arrays/SharedArray_impl.h rename to src/TNL/Containers/SharedArray_impl.h index fad8b53d13609a70c366533e1ad539bac1b260e7..6f3638180f00e24a2fba6119d513ed7f8197c619 100644 --- a/src/TNL/Arrays/SharedArray_impl.h +++ b/src/TNL/Containers/SharedArray_impl.h @@ -12,14 +12,14 @@ #include <iostream> #include <TNL/File.h> -#include <TNL/Arrays/Array.h> -#include <TNL/Arrays/StaticArray.h> -#include <TNL/Arrays/ArrayOperations.h> +#include <TNL/Containers/Array.h> +#include <TNL/Containers/StaticArray.h> +#include <TNL/Containers/ArrayOperations.h> #include <TNL/core/mfuncs.h> #include <TNL/core/param-types.h> namespace TNL { -namespace Arrays { +namespace Containers { template< typename Element, typename Device, @@ -63,7 +63,7 @@ template< typename Element, typename Index > String SharedArray< Element, Device, Index > :: getType() { - return String( "SharedArray< " ) + ", " + + return String( "Containers::SharedArray< " ) + ", " + TNL::getType< Element >() + ", " + Device::getDeviceType() + ", " + TNL::getType< Index >() + " >"; @@ -80,15 +80,19 @@ String SharedArray< Element, Device, Index > :: getTypeVirtual() const template< typename Element, typename Device, typename Index > -String SharedArray< Element, Device, Index > :: getSerializationType() +String +SharedArray< Element, Device, Index >:: +getSerializationType() { - return Array< Element, Device, Index >::getSerializationType(); + return HostType::getType(); }; template< typename Element, typename Device, typename Index > -String SharedArray< Element, Device, Index > :: getSerializationTypeVirtual() const +String +SharedArray< Element, Device, Index >:: +getSerializationTypeVirtual() const { return this->getSerializationType(); }; @@ -462,5 +466,5 @@ extern template class SharedArray< double, Devices::Cuda, long int >;*/ #endif -} // namespace Arrays +} // namespace Containers } // namespace TNL diff --git a/src/TNL/Vectors/SharedVector.h b/src/TNL/Containers/SharedVector.h similarity index 94% rename from src/TNL/Vectors/SharedVector.h rename to src/TNL/Containers/SharedVector.h index c6f5e662109363a18e7ed979bd071fa77accf41d..c4a22ded20ba860502c408c3ddd038966146064c 100644 --- a/src/TNL/Vectors/SharedVector.h +++ b/src/TNL/Containers/SharedVector.h @@ -10,8 +10,8 @@ #pragma once -#include <TNL/Arrays/SharedArray.h> -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/SharedArray.h> +#include <TNL/Containers/Vector.h> #include <TNL/Functions/Domain.h> namespace TNL { @@ -21,14 +21,14 @@ namespace Devices class Host; } -namespace Vectors { +namespace Containers { template< typename Real = double, typename Device= Devices::Host, typename Index = int > -class SharedVector : public Arrays::SharedArray< Real, Device, Index > +class SharedVector : public Containers::SharedArray< Real, Device, Index > { public: @@ -152,8 +152,8 @@ class SharedVector : public Arrays::SharedArray< Real, Device, Index > }; -} // namespace Vectors +} // namespace Containers } // namespace TNL -#include <TNL/Vectors/SharedVector_impl.h> +#include <TNL/Containers/SharedVector_impl.h> diff --git a/src/TNL/Vectors/SharedVector_impl.cpp b/src/TNL/Containers/SharedVector_impl.cpp similarity index 94% rename from src/TNL/Vectors/SharedVector_impl.cpp rename to src/TNL/Containers/SharedVector_impl.cpp index bbc0fa5aa99ea04294490ff4eff86dc947fc0b47..cb9915a8378b1e1aabcbe4a0969e358f0aa8dd05 100644 --- a/src/TNL/Vectors/SharedVector_impl.cpp +++ b/src/TNL/Containers/SharedVector_impl.cpp @@ -8,10 +8,10 @@ /* See Copyright Notice in tnl/Copyright */ -#include <TNL/Vectors/SharedVector.h> +#include <TNL/Containers/SharedVector.h> namespace TNL { -namespace Vectors { +namespace Containers { #ifdef TEMPLATE_EXPLICIT_INSTANTIATION @@ -55,6 +55,6 @@ template class SharedVector< long double, Devices::Cuda, long int >; #endif -} // namespace Vectors +} // namespace Containers } // namespace TNL diff --git a/src/TNL/Vectors/SharedVector_impl.h b/src/TNL/Containers/SharedVector_impl.h similarity index 94% rename from src/TNL/Vectors/SharedVector_impl.h rename to src/TNL/Containers/SharedVector_impl.h index 99ceb34c7615243704c01065b72483d2749950e4..d086bfc6426a2d6e6ceffda40c73beeb67ad7613 100644 --- a/src/TNL/Vectors/SharedVector_impl.h +++ b/src/TNL/Containers/SharedVector_impl.h @@ -10,10 +10,10 @@ #pragma once -#include <TNL/Vectors/VectorOperations.h> +#include <TNL/Containers/VectorOperations.h> namespace TNL { -namespace Vectors { +namespace Containers { template< typename Real, typename Device, @@ -29,7 +29,7 @@ template< typename Real, __cuda_callable__ SharedVector< Real, Device, Index >::SharedVector( Real* data, const Index size ) -: Arrays::SharedArray< Real, Device, Index >( data, size ) +: Containers::SharedArray< Real, Device, Index >( data, size ) { } @@ -38,7 +38,7 @@ template< typename Real, typename Index > __cuda_callable__ SharedVector< Real, Device, Index >::SharedVector( Vector< Real, Device, Index >& vector ) -: Arrays::SharedArray< Real, Device, Index >( vector ) +: Containers::SharedArray< Real, Device, Index >( vector ) { } @@ -47,7 +47,7 @@ template< typename Real, typename Index > __cuda_callable__ SharedVector< Real, Device, Index >::SharedVector( SharedVector< Real, Device, Index >& vector ) -: Arrays::SharedArray< Real, Device, Index >( vector ) +: Containers::SharedArray< Real, Device, Index >( vector ) { } @@ -56,7 +56,7 @@ template< typename Real, typename Index > String SharedVector< Real, Device, Index > :: getType() { - return String( "SharedVector< " ) + + return String( "Containers::SharedVector< " ) + TNL::getType< Real >() + ", " + Device :: getDeviceType() + ", " + TNL::getType< Index >() + " >"; @@ -111,7 +111,7 @@ template< typename Real, SharedVector< Real, Device, Index >& SharedVector< Real, Device, Index > :: operator = ( const SharedVector< Real, Device, Index >& vector ) { - Arrays::SharedArray< Real, Device, Index > :: operator = ( vector ); + Containers::SharedArray< Real, Device, Index > :: operator = ( vector ); return ( *this ); }; @@ -122,7 +122,7 @@ template< typename Real, SharedVector< Real, Device, Index >& SharedVector< Real, Device, Index > :: operator = ( const Vector& vector ) { - Arrays::SharedArray< Real, Device, Index > :: operator = ( vector ); + Containers::SharedArray< Real, Device, Index > :: operator = ( vector ); return ( *this ); }; @@ -132,7 +132,7 @@ template< typename Real, template< typename Vector > bool SharedVector< Real, Device, Index > :: operator == ( const Vector& vector ) const { - return Arrays::SharedArray< Real, Device, Index > :: operator == ( vector ); + return Containers::SharedArray< Real, Device, Index > :: operator == ( vector ); } template< typename Real, @@ -141,7 +141,7 @@ template< typename Real, template< typename Vector > bool SharedVector< Real, Device, Index > :: operator != ( const Vector& vector ) const { - return Arrays::SharedArray< Real, Device, Index > :: operator != ( vector ); + return Containers::SharedArray< Real, Device, Index > :: operator != ( vector ); } template< typename Real, @@ -412,5 +412,5 @@ extern template class SharedVector< long double, Devices::Cuda, long int >; #endif -} // namespace Vectors +} // namespace Containers } // namespace TNL diff --git a/src/TNL/Arrays/StaticArray.h b/src/TNL/Containers/StaticArray.h similarity index 97% rename from src/TNL/Arrays/StaticArray.h rename to src/TNL/Containers/StaticArray.h index f1731fc53c3993251b3c52c2d576d93d631eccc5..63ac6be40399a2ccec1948fc54bfaf5a32181ade 100644 --- a/src/TNL/Arrays/StaticArray.h +++ b/src/TNL/Containers/StaticArray.h @@ -14,7 +14,7 @@ #include <TNL/File.h> namespace TNL { -namespace Arrays { +namespace Containers { //! Aliases for the coordinates // TODO: Remove this - it is here only because of some legact code @@ -371,11 +371,11 @@ class StaticArray< 3, Element > template< int Size, typename Element > std::ostream& operator << ( std::ostream& str, const StaticArray< Size, Element >& a ); -} // namespace Arrays +} // namespace Containers } // namespace TNL -#include <TNL/Arrays/StaticArray_impl.h> -#include <TNL/Arrays/StaticArray1D_impl.h> -#include <TNL/Arrays/StaticArray2D_impl.h> -#include <TNL/Arrays/StaticArray3D_impl.h> +#include <TNL/Containers/StaticArray_impl.h> +#include <TNL/Containers/StaticArray1D_impl.h> +#include <TNL/Containers/StaticArray2D_impl.h> +#include <TNL/Containers/StaticArray3D_impl.h> diff --git a/src/TNL/Arrays/StaticArray1D_impl.h b/src/TNL/Containers/StaticArray1D_impl.h similarity index 98% rename from src/TNL/Arrays/StaticArray1D_impl.h rename to src/TNL/Containers/StaticArray1D_impl.h index f4a3388496b04cbe24cc95607bdce04f5755cf50..3caf71991dc0c571b538034c40bfb27418e5ec02 100644 --- a/src/TNL/Arrays/StaticArray1D_impl.h +++ b/src/TNL/Containers/StaticArray1D_impl.h @@ -13,7 +13,7 @@ #include <TNL/core/param-types.h> namespace TNL { -namespace Arrays { +namespace Containers { template< typename Element > __cuda_callable__ @@ -45,7 +45,7 @@ inline StaticArray< 1, Element >::StaticArray( const StaticArray< size, Element template< typename Element > String StaticArray< 1, Element >::getType() { - return String( "StaticArray< " ) + + return String( "Containers::StaticArray< " ) + String( size ) + String( ", " ) + TNL::getType< Element >() + @@ -216,5 +216,5 @@ extern template class StaticArray< 1, long double >; #endif -} // namespace Arrays +} // namespace Containers } // namespace TNL diff --git a/src/TNL/Arrays/StaticArray2D_impl.h b/src/TNL/Containers/StaticArray2D_impl.h similarity index 98% rename from src/TNL/Arrays/StaticArray2D_impl.h rename to src/TNL/Containers/StaticArray2D_impl.h index a4c1ced102321b68ac015d614125c9e0e916dae1..06a606108c70ab33f8d63c93095dcdcbc811444c 100644 --- a/src/TNL/Arrays/StaticArray2D_impl.h +++ b/src/TNL/Containers/StaticArray2D_impl.h @@ -14,7 +14,7 @@ #include <TNL/core/mfuncs.h> namespace TNL { -namespace Arrays { +namespace Containers { template< typename Element > __cuda_callable__ @@ -57,7 +57,7 @@ inline StaticArray< 2, Element >::StaticArray( const StaticArray< size, Element template< typename Element > String StaticArray< 2, Element >::getType() { - return String( "StaticArray< " ) + + return String( "Containers::StaticArray< " ) + String( size ) + String( ", " ) + TNL::getType< Element >() + @@ -244,5 +244,5 @@ extern template class StaticArray< 2, long double >; #endif -} // namespace Arrays +} // namespace Containers } // namespace TNL diff --git a/src/TNL/Arrays/StaticArray3D_impl.h b/src/TNL/Containers/StaticArray3D_impl.h similarity index 98% rename from src/TNL/Arrays/StaticArray3D_impl.h rename to src/TNL/Containers/StaticArray3D_impl.h index d8bcbd0d91bc4daaf4323ea75dd6a4d886976db6..187b8b7cff3e7ac7baa28e0b194e38ef25c309b1 100644 --- a/src/TNL/Arrays/StaticArray3D_impl.h +++ b/src/TNL/Containers/StaticArray3D_impl.h @@ -13,7 +13,7 @@ #include <TNL/core/param-types.h> namespace TNL { -namespace Arrays { +namespace Containers { template< typename Element > __cuda_callable__ @@ -60,7 +60,7 @@ inline StaticArray< 3, Element >::StaticArray( const StaticArray< size, Element template< typename Element > String StaticArray< 3, Element >::getType() { - return String( "StaticArray< " ) + + return String( "Containers::StaticArray< " ) + String( size ) + String( ", " ) + TNL::getType< Element >() + @@ -271,5 +271,5 @@ extern template class StaticArray< 3, long double >; #endif -} // namespace Arrays +} // namespace Containers } // namespace TNL diff --git a/src/TNL/Arrays/StaticArray_impl.cpp b/src/TNL/Containers/StaticArray_impl.cpp similarity index 95% rename from src/TNL/Arrays/StaticArray_impl.cpp rename to src/TNL/Containers/StaticArray_impl.cpp index 8144a7c90d3d84e7016dbfd51d0dfbdb9dd2dcf9..1da438f8404e1cfc3605bb103bc2c649596ee6b7 100644 --- a/src/TNL/Arrays/StaticArray_impl.cpp +++ b/src/TNL/Containers/StaticArray_impl.cpp @@ -8,10 +8,10 @@ /* See Copyright Notice in tnl/Copyright */ -#include <TNL/Arrays/StaticArray.h> +#include <TNL/Containers/StaticArray.h> namespace TNL { -namespace Arrays { +namespace Containers { #ifndef HAVE_CUDA #ifdef UNDEF //TEMPLATE_EXPLICIT_INSTANTIATION @@ -71,6 +71,6 @@ template class StaticArray< 4, long double >; #endif #endif -} // namespace Arrays +} // namespace Containers } // namespace TNL diff --git a/src/TNL/Arrays/StaticArray_impl.cu b/src/TNL/Containers/StaticArray_impl.cu similarity index 100% rename from src/TNL/Arrays/StaticArray_impl.cu rename to src/TNL/Containers/StaticArray_impl.cu diff --git a/src/TNL/Arrays/StaticArray_impl.h b/src/TNL/Containers/StaticArray_impl.h similarity index 98% rename from src/TNL/Arrays/StaticArray_impl.h rename to src/TNL/Containers/StaticArray_impl.h index 39fd83a407d15107cdf8d4613e6c8b896399926b..c0dd93c9f16d4346bdbe2a90ffbd9904a9ba33b6 100644 --- a/src/TNL/Arrays/StaticArray_impl.h +++ b/src/TNL/Containers/StaticArray_impl.h @@ -14,7 +14,7 @@ #include <TNL/core/mfuncs.h> namespace TNL { -namespace Arrays { +namespace Containers { template< int Size, typename Element > __cuda_callable__ @@ -49,7 +49,7 @@ inline StaticArray< Size, Element >::StaticArray( const StaticArray< Size, Eleme template< int Size, typename Element > String StaticArray< Size, Element >::getType() { - return String( "StaticArray< " ) + + return String( "Containers::StaticArray< " ) + String( Size ) + String( ", " ) + TNL::getType< Element >() + @@ -233,5 +233,5 @@ extern template class StaticArray< 4, long double >; #endif -} // namespace Arrays +} // namespace Containers } // namespace TNL diff --git a/src/TNL/Vectors/StaticVector.h b/src/TNL/Containers/StaticVector.h similarity index 93% rename from src/TNL/Vectors/StaticVector.h rename to src/TNL/Containers/StaticVector.h index 55a978f907cac29828ecbdde42f015ba724760b3..c600fe4a5c9c659c7bbd13dce9b74f1aed6402f1 100644 --- a/src/TNL/Vectors/StaticVector.h +++ b/src/TNL/Containers/StaticVector.h @@ -10,13 +10,13 @@ #pragma once -#include <TNL/Arrays/StaticArray.h> +#include <TNL/Containers/StaticArray.h> namespace TNL { -namespace Vectors { +namespace Containers { template< int Size, typename Real = double > -class StaticVector : public Arrays::StaticArray< Size, Real > +class StaticVector : public Containers::StaticArray< Size, Real > { public: typedef Real RealType; @@ -88,7 +88,7 @@ class StaticVector : public Arrays::StaticArray< Size, Real > }; template< typename Real > -class StaticVector< 1, Real > : public Arrays::StaticArray< 1, Real > +class StaticVector< 1, Real > : public Containers::StaticArray< 1, Real > { public: typedef Real RealType; @@ -157,7 +157,7 @@ class StaticVector< 1, Real > : public Arrays::StaticArray< 1, Real > }; template< typename Real > -class StaticVector< 2, Real > : public Arrays::StaticArray< 2, Real > +class StaticVector< 2, Real > : public Containers::StaticArray< 2, Real > { public: typedef Real RealType; @@ -232,7 +232,7 @@ class StaticVector< 2, Real > : public Arrays::StaticArray< 2, Real > }; template< typename Real > -class StaticVector< 3, Real > : public Arrays::StaticArray< 3, Real > +class StaticVector< 3, Real > : public Containers::StaticArray< 3, Real > { public: typedef Real RealType; @@ -312,17 +312,17 @@ StaticVector< Size, Real > operator * ( const Real& c, const StaticVector< Size, template< int Size, typename Real > StaticVector< Size, Real > abs( const StaticVector< Size, Real >& u ) { return u.abs(); }; -} // namespace Vectors +} // namespace Containers } // namespace TNL -#include <TNL/Vectors/StaticVector_impl.h> -#include <TNL/Vectors/StaticVector1D_impl.h> -#include <TNL/Vectors/StaticVector2D_impl.h> -#include <TNL/Vectors/StaticVector3D_impl.h> +#include <TNL/Containers/StaticVector_impl.h> +#include <TNL/Containers/StaticVector1D_impl.h> +#include <TNL/Containers/StaticVector2D_impl.h> +#include <TNL/Containers/StaticVector3D_impl.h> namespace TNL { -namespace Vectors { +namespace Containers { // TODO: move to some other source file template< typename Real > @@ -384,5 +384,5 @@ Real tnlTriangleArea( const StaticVector< 3, Real >& a, return 0.5 * ::sqrt( tnlScalarProduct( v, v ) ); }; -} // namespace Vectors +} // namespace Containers } // namespace TNL diff --git a/src/TNL/Vectors/StaticVector1D_impl.h b/src/TNL/Containers/StaticVector1D_impl.h similarity index 95% rename from src/TNL/Vectors/StaticVector1D_impl.h rename to src/TNL/Containers/StaticVector1D_impl.h index 265827eb87fe5af7921ce995266762353862f94d..a8e4151a352a71b455f7404977d3e347874a46d2 100644 --- a/src/TNL/Vectors/StaticVector1D_impl.h +++ b/src/TNL/Containers/StaticVector1D_impl.h @@ -11,7 +11,7 @@ #pragma once namespace TNL { -namespace Vectors { +namespace Containers { template< typename Real > __cuda_callable__ @@ -22,21 +22,21 @@ StaticVector< 1, Real >::StaticVector() template< typename Real > __cuda_callable__ StaticVector< 1, Real >::StaticVector( const Real& v ) -: Arrays::StaticArray< 1, Real >( v ) +: Containers::StaticArray< 1, Real >( v ) { } template< typename Real > __cuda_callable__ StaticVector< 1, Real >::StaticVector( const StaticVector< 1, Real >& v ) -: Arrays::StaticArray< 1, Real >( v ) +: Containers::StaticArray< 1, Real >( v ) { } template< typename Real > String StaticVector< 1, Real >::getType() { - return String( "StaticVector< " ) + + return String( "Containers::StaticVector< " ) + String( 1 ) + String( ", " ) + TNL::getType< Real >() + @@ -163,5 +163,5 @@ extern template class StaticVector< 1, long double >; #endif -} // namespace Vectors +} // namespace Containers } // namespace TNL diff --git a/src/TNL/Vectors/StaticVector2D_impl.h b/src/TNL/Containers/StaticVector2D_impl.h similarity index 94% rename from src/TNL/Vectors/StaticVector2D_impl.h rename to src/TNL/Containers/StaticVector2D_impl.h index d536a52e67dc2d8314c3471f247ad5972d6bb885..e343c91d027de6b0e0701872271fecd475a07571 100644 --- a/src/TNL/Vectors/StaticVector2D_impl.h +++ b/src/TNL/Containers/StaticVector2D_impl.h @@ -13,7 +13,7 @@ #include <TNL/core/mfuncs.h> namespace TNL { -namespace Vectors { +namespace Containers { template< typename Real > __cuda_callable__ @@ -24,35 +24,35 @@ StaticVector< 2, Real >::StaticVector() template< typename Real > __cuda_callable__ StaticVector< 2, Real >::StaticVector( const Real v[ 2 ] ) -: Arrays::StaticArray< 2, Real >( v ) +: Containers::StaticArray< 2, Real >( v ) { } template< typename Real > __cuda_callable__ StaticVector< 2, Real >::StaticVector( const Real& v ) -: Arrays::StaticArray< 2, Real >( v ) +: Containers::StaticArray< 2, Real >( v ) { } template< typename Real > __cuda_callable__ StaticVector< 2, Real >::StaticVector( const Real& v1, const Real& v2 ) -: Arrays::StaticArray< 2, Real >( v1, v2 ) +: Containers::StaticArray< 2, Real >( v1, v2 ) { } template< typename Real > __cuda_callable__ StaticVector< 2, Real >::StaticVector( const StaticVector< 2, Real >& v ) -: Arrays::StaticArray< 2, Real >( v ) +: Containers::StaticArray< 2, Real >( v ) { } template< typename Real > String StaticVector< 2, Real >::getType() { - return String( "StaticVector< " ) + + return String( "Containers::StaticVector< " ) + String( 2 ) + String( ", " ) + TNL::getType< Real >() + @@ -193,5 +193,5 @@ extern template class StaticVector< 2, long double >; #endif -} // namespace Vectors +} // namespace Containers } // namespace TNL diff --git a/src/TNL/Vectors/StaticVector3D_impl.h b/src/TNL/Containers/StaticVector3D_impl.h similarity index 94% rename from src/TNL/Vectors/StaticVector3D_impl.h rename to src/TNL/Containers/StaticVector3D_impl.h index 6e5997920e93023fbc345c9623b52b288874fd35..91de4c92266453c7b5660b64644c6e5a89f3e049 100644 --- a/src/TNL/Vectors/StaticVector3D_impl.h +++ b/src/TNL/Containers/StaticVector3D_impl.h @@ -11,7 +11,7 @@ #pragma once namespace TNL { -namespace Vectors { +namespace Containers { template< typename Real > __cuda_callable__ @@ -22,35 +22,35 @@ StaticVector< 3, Real >::StaticVector() template< typename Real > __cuda_callable__ StaticVector< 3, Real >::StaticVector( const Real v[ 3 ] ) -: Arrays::StaticArray< 3, Real >( v ) +: Containers::StaticArray< 3, Real >( v ) { } template< typename Real > __cuda_callable__ StaticVector< 3, Real >::StaticVector( const Real& v ) -: Arrays::StaticArray< 3, Real >( v ) +: Containers::StaticArray< 3, Real >( v ) { } template< typename Real > __cuda_callable__ StaticVector< 3, Real >::StaticVector( const Real& v1, const Real& v2, const Real& v3 ) -: Arrays::StaticArray< 3, Real >( v1, v2, v3 ) +: Containers::StaticArray< 3, Real >( v1, v2, v3 ) { } template< typename Real > __cuda_callable__ StaticVector< 3, Real >::StaticVector( const StaticVector< 3, Real >& v ) -: Arrays::StaticArray< 3, Real >( v ) +: Containers::StaticArray< 3, Real >( v ) { } template< typename Real > String StaticVector< 3, Real >::getType() { - return String( "StaticVector< " ) + + return String( "Containers::StaticVector< " ) + String( 3 ) + String( ", " ) + TNL::getType< Real >() + @@ -203,5 +203,5 @@ extern template class StaticVector< 3, long double >; #endif -} // namespace Vectors +} // namespace Containers } // namespace TNL diff --git a/src/TNL/Vectors/StaticVector_impl.cpp b/src/TNL/Containers/StaticVector_impl.cpp similarity index 93% rename from src/TNL/Vectors/StaticVector_impl.cpp rename to src/TNL/Containers/StaticVector_impl.cpp index f109f0af86730ebb860f2cccbcea7c4edcba3cfd..e503d09669d8eb3d2fd0fe606bbda98aafb8bb2e 100644 --- a/src/TNL/Vectors/StaticVector_impl.cpp +++ b/src/TNL/Containers/StaticVector_impl.cpp @@ -8,10 +8,10 @@ /* See Copyright Notice in tnl/Copyright */ -#include <TNL/Vectors/StaticVector.h> +#include <TNL/Containers/StaticVector.h> namespace TNL { -namespace Vectors { +namespace Containers { #ifndef HAVE_CUDA #ifdef UNDEF //TEMPLATE_EXPLICIT_INSTANTIATION @@ -51,5 +51,5 @@ template class StaticVector< 4, long double >; #endif #endif -} // namespace Vectors +} // namespace Containers } // namespace TNL diff --git a/src/TNL/Vectors/StaticVector_impl.cu b/src/TNL/Containers/StaticVector_impl.cu similarity index 100% rename from src/TNL/Vectors/StaticVector_impl.cu rename to src/TNL/Containers/StaticVector_impl.cu diff --git a/src/TNL/Vectors/StaticVector_impl.h b/src/TNL/Containers/StaticVector_impl.h similarity index 95% rename from src/TNL/Vectors/StaticVector_impl.h rename to src/TNL/Containers/StaticVector_impl.h index 4c5d044b21e1c2172bf58bb5de338403ba2c559e..251c1e7369e6c20e141ef3fa2fb675d217be4654 100644 --- a/src/TNL/Vectors/StaticVector_impl.h +++ b/src/TNL/Containers/StaticVector_impl.h @@ -11,7 +11,7 @@ #pragma once namespace TNL { -namespace Vectors { +namespace Containers { template< int Size, typename Real > __cuda_callable__ @@ -22,28 +22,28 @@ StaticVector< Size, Real >::StaticVector() template< int Size, typename Real > __cuda_callable__ StaticVector< Size, Real >::StaticVector( const Real v[ Size ] ) -: Arrays::StaticArray< Size, Real >( v ) +: Containers::StaticArray< Size, Real >( v ) { } template< int Size, typename Real > __cuda_callable__ StaticVector< Size, Real >::StaticVector( const Real& v ) -: Arrays::StaticArray< Size, Real >( v ) +: Containers::StaticArray< Size, Real >( v ) { } template< int Size, typename Real > __cuda_callable__ StaticVector< Size, Real >::StaticVector( const StaticVector< Size, Real >& v ) -: Arrays::StaticArray< Size, Real >( v ) +: Containers::StaticArray< Size, Real >( v ) { } template< int Size, typename Real > String StaticVector< Size, Real >::getType() { - return String( "StaticVector< " ) + + return String( "Containers::StaticVector< " ) + String( Size ) + String( ", " ) + TNL::getType< Real >() + @@ -202,5 +202,5 @@ extern template class StaticVector< 4, long double >; #endif -} // namespace Vectors +} // namespace Containers } // namespace TNL diff --git a/src/TNL/Vectors/Vector.h b/src/TNL/Containers/Vector.h similarity index 95% rename from src/TNL/Vectors/Vector.h rename to src/TNL/Containers/Vector.h index 3636884fe94876f77d96a91168fc8555cdcb14f6..0a73dd6988a0ecf687f0a2d6194d329b0cf7b7b9 100644 --- a/src/TNL/Vectors/Vector.h +++ b/src/TNL/Containers/Vector.h @@ -10,7 +10,7 @@ #pragma once -#include <TNL/Arrays/Array.h> +#include <TNL/Containers/Array.h> #include <TNL/Functions/Domain.h> namespace TNL { @@ -20,14 +20,14 @@ namespace Devices class Host; } -namespace Vectors { +namespace Containers { template< typename Real = double, typename Device = Devices::Host, typename Index = int > -class Vector : public Arrays::Array< Real, Device, Index > +class Vector : public Containers::Array< Real, Device, Index > { public: @@ -137,7 +137,7 @@ class Vector : public Arrays::Array< Real, Device, Index > void computeExclusivePrefixSum( const IndexType begin, const IndexType end ); }; -} // namespace Vectors +} // namespace Containers } // namespace TNL -#include <TNL/Vectors/Vector_impl.h> +#include <TNL/Containers/Vector_impl.h> diff --git a/src/TNL/Vectors/VectorOperations.h b/src/TNL/Containers/VectorOperations.h similarity index 98% rename from src/TNL/Vectors/VectorOperations.h rename to src/TNL/Containers/VectorOperations.h index 1f5b40576b7096ee439cbd691b66df0f3473db74..e3fbdd14bb1df88ca5dcb2974e03d9f86ed847cc 100644 --- a/src/TNL/Vectors/VectorOperations.h +++ b/src/TNL/Containers/VectorOperations.h @@ -16,7 +16,7 @@ #include <TNL/Devices/Cuda.h> namespace TNL { -namespace Vectors { +namespace Containers { template< typename Device > class VectorOperations{}; @@ -238,9 +238,9 @@ class VectorOperations< Devices::Cuda > const typename Vector::IndexType end ); }; -} // namespace Vectors +} // namespace Containers } // namespace TNL -#include <TNL/Vectors/VectorOperationsHost_impl.h> -#include <TNL/Vectors/VectorOperationsCuda_impl.h> +#include <TNL/Containers/VectorOperationsHost_impl.h> +#include <TNL/Containers/VectorOperationsCuda_impl.h> diff --git a/src/TNL/Vectors/VectorOperationsCuda_impl.cpp b/src/TNL/Containers/VectorOperationsCuda_impl.cpp similarity index 99% rename from src/TNL/Vectors/VectorOperationsCuda_impl.cpp rename to src/TNL/Containers/VectorOperationsCuda_impl.cpp index d3573da7a5d7bef6c06c3ebdccd76d790580a3cd..7263405cfdea5e465604044fe33060341029908f 100644 --- a/src/TNL/Vectors/VectorOperationsCuda_impl.cpp +++ b/src/TNL/Containers/VectorOperationsCuda_impl.cpp @@ -8,10 +8,10 @@ /* See Copyright Notice in tnl/Copyright */ -#include <TNL/Vectors/VectorOperations.h> +#include <TNL/Containers/VectorOperations.h> namespace TNL { -namespace Vectors { +namespace Containers { #ifdef TEMPLATE_EXPLICIT_INSTANTIATION @@ -321,5 +321,5 @@ template long double VectorOperations< Devices::Cuda >::getVectorDifferenceAbsMi #endif -} // namespace Vectors +} // namespace Containers } // namespace TNL \ No newline at end of file diff --git a/src/TNL/Vectors/VectorOperationsCuda_impl.cu b/src/TNL/Containers/VectorOperationsCuda_impl.cu similarity index 100% rename from src/TNL/Vectors/VectorOperationsCuda_impl.cu rename to src/TNL/Containers/VectorOperationsCuda_impl.cu diff --git a/src/TNL/Vectors/VectorOperationsCuda_impl.h b/src/TNL/Containers/VectorOperationsCuda_impl.h similarity index 99% rename from src/TNL/Vectors/VectorOperationsCuda_impl.h rename to src/TNL/Containers/VectorOperationsCuda_impl.h index b88f6de1c365b86746259fb3f0f5fb974e0f1f98..7318e92151569c63987b2c954aadd9ecb5ea38e5 100644 --- a/src/TNL/Vectors/VectorOperationsCuda_impl.h +++ b/src/TNL/Containers/VectorOperationsCuda_impl.h @@ -15,7 +15,7 @@ #include <TNL/core/cuda/tnlCublasWrapper.h> namespace TNL { -namespace Vectors { +namespace Containers { template< typename Vector > void VectorOperations< Devices::Cuda >::addElement( Vector& v, @@ -615,15 +615,15 @@ void VectorOperations< Devices::Cuda >::computeExclusivePrefixSum( Vector& v, #endif } -} // namespace Vectors +} // namespace Containers } // namespace TNL #ifdef TEMPLATE_EXPLICIT_INSTANTIATION -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> namespace TNL { -namespace Vectors { +namespace Containers { /**** * Max @@ -875,7 +875,7 @@ extern template long double VectorOperations< Devices::Cuda >::getVectorDifferen #endif #endif -} // namespace Vectors +} // namespace Containers } // namespace TNL #endif diff --git a/src/TNL/Vectors/VectorOperationsHost_impl.cpp b/src/TNL/Containers/VectorOperationsHost_impl.cpp similarity index 99% rename from src/TNL/Vectors/VectorOperationsHost_impl.cpp rename to src/TNL/Containers/VectorOperationsHost_impl.cpp index f1f63d5c7ccf41b27a7ec1fd056ce63060c8408b..9803167c6d5cc257fb215840af3f39d1a32e3d23 100644 --- a/src/TNL/Vectors/VectorOperationsHost_impl.cpp +++ b/src/TNL/Containers/VectorOperationsHost_impl.cpp @@ -8,10 +8,10 @@ /* See Copyright Notice in tnl/Copyright */ -#include <TNL/Vectors/VectorOperations.h> +#include <TNL/Containers/VectorOperations.h> namespace TNL { -namespace Vectors { +namespace Containers { #ifdef TEMPLATE_EXPLICIT_INSTANTIATION @@ -321,5 +321,5 @@ template long double VectorOperations< Devices::Host >::getVectorDifferenceAbsMi #endif -} // namespace Vectors +} // namespace Containers } // namespace TNL diff --git a/src/TNL/Vectors/VectorOperationsHost_impl.h b/src/TNL/Containers/VectorOperationsHost_impl.h similarity index 99% rename from src/TNL/Vectors/VectorOperationsHost_impl.h rename to src/TNL/Containers/VectorOperationsHost_impl.h index 62f6b2cb2887f22db2df8ca6ca2cde282c4ae0d7..235655fcf30fd1ba10a437e31ab04e4bcf09bafa 100644 --- a/src/TNL/Vectors/VectorOperationsHost_impl.h +++ b/src/TNL/Containers/VectorOperationsHost_impl.h @@ -11,7 +11,7 @@ #pragma once namespace TNL { -namespace Vectors { +namespace Containers { static const int OpenMPVectorOperationsThreshold = 65536; // TODO: check this threshold @@ -477,15 +477,15 @@ void VectorOperations< Devices::Host >::computeExclusivePrefixSum( Vector& v, } } -} // namespace Vectors +} // namespace Containers } //namespace TNL #ifdef TEMPLATE_EXPLICIT_INSTANTIATION -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> namespace TNL { -namespace Vectors { +namespace Containers { /**** * Max @@ -738,7 +738,7 @@ extern template long double VectorOperations< Devices::Host >::getVectorDifferen #endif #endif -} // namespace Vectors +} // namespace Containers } // namespace TNL #endif diff --git a/src/TNL/Vectors/Vector_impl.cpp b/src/TNL/Containers/Vector_impl.cpp similarity index 93% rename from src/TNL/Vectors/Vector_impl.cpp rename to src/TNL/Containers/Vector_impl.cpp index 2b550c874b7e0cc6fb34c311561007c5c27aeb9a..6fe0deff839453394ff5c806ad3e9766dfa705d8 100644 --- a/src/TNL/Vectors/Vector_impl.cpp +++ b/src/TNL/Containers/Vector_impl.cpp @@ -8,10 +8,10 @@ /* See Copyright Notice in tnl/Copyright */ -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> namespace TNL { -namespace Vectors { +namespace Containers { #ifdef UNDEF //TEMPLATE_EXPLICIT_INSTANTIATION @@ -37,6 +37,6 @@ template class Vector< long double, Devices::Host, long int >; #endif -} // namespace Vectors +} // namespace Containers } // namespace TNL diff --git a/src/TNL/Vectors/Vector_impl.cu b/src/TNL/Containers/Vector_impl.cu similarity index 100% rename from src/TNL/Vectors/Vector_impl.cu rename to src/TNL/Containers/Vector_impl.cu diff --git a/src/TNL/Vectors/Vector_impl.h b/src/TNL/Containers/Vector_impl.h similarity index 96% rename from src/TNL/Vectors/Vector_impl.h rename to src/TNL/Containers/Vector_impl.h index 381782684619d52becb0e512a4b47e0d14643398..b602d003204f3de8417c323f90bfe50ac71b06fc 100644 --- a/src/TNL/Vectors/Vector_impl.h +++ b/src/TNL/Containers/Vector_impl.h @@ -10,10 +10,10 @@ #pragma once -#include <TNL/Vectors/VectorOperations.h> +#include <TNL/Containers/VectorOperations.h> namespace TNL { -namespace Vectors { +namespace Containers { template< typename Real, typename Device, @@ -37,7 +37,7 @@ template< typename Real, typename Index > String Vector< Real, Device, Index >::getType() { - return String( "Vector< " ) + + return String( "Containers::Vector< " ) + TNL::getType< Real >() + ", " + Device::getDeviceType() + ", " + TNL::getType< Index >() + " >"; @@ -92,7 +92,7 @@ template< typename Real, Vector< Real, Device, Index >& Vector< Real, Device, Index >::operator = ( const Vector< Real, Device, Index >& vector ) { - Arrays::Array< Real, Device, Index >::operator = ( vector ); + Containers::Array< Real, Device, Index >::operator = ( vector ); return ( *this ); }; @@ -103,7 +103,7 @@ template< typename Real, Vector< Real, Device, Index >& Vector< Real, Device, Index >::operator = ( const VectorT& vector ) { - Arrays::Array< Real, Device, Index >::operator = ( vector ); + Containers::Array< Real, Device, Index >::operator = ( vector ); return ( *this ); }; @@ -113,7 +113,7 @@ template< typename Real, template< typename VectorT > bool Vector< Real, Device, Index >::operator == ( const VectorT& vector ) const { - return Arrays::Array< Real, Device, Index >::operator == ( vector ); + return Containers::Array< Real, Device, Index >::operator == ( vector ); } template< typename Real, @@ -122,7 +122,7 @@ template< typename Real, template< typename VectorT > bool Vector< Real, Device, Index >::operator != ( const VectorT& vector ) const { - return Arrays::Array< Real, Device, Index >::operator != ( vector ); + return Containers::Array< Real, Device, Index >::operator != ( vector ); } template< typename Real, @@ -396,5 +396,5 @@ extern template class Vector< long double, Devices::Cuda, long int >; #endif -} // namespace Vectors +} // namespace Containers } // namespace TNL diff --git a/src/TNL/Functions/Analytic/Blob.h b/src/TNL/Functions/Analytic/Blob.h index 1002ae51420f6419a037385568195fb5a706b2ab..56c6e22b7eab001f03b45137b23ba6f2582d4798 100644 --- a/src/TNL/Functions/Analytic/Blob.h +++ b/src/TNL/Functions/Analytic/Blob.h @@ -11,7 +11,7 @@ #pragma once #include <TNL/Config/ParameterContainer.h> -#include <TNL/Vectors/StaticVector.h> +#include <TNL/Containers/StaticVector.h> #include <TNL/Functions/Domain.h> #include <TNL/Devices/Cuda.h> @@ -48,7 +48,7 @@ class Blob< 1, Real > : public BlobBase< Real, 1 > enum { Dimensions = 1 }; typedef Real RealType; - typedef Vectors::StaticVector< Dimensions, Real > VertexType; + typedef Containers::StaticVector< Dimensions, Real > VertexType; static String getType(); @@ -79,7 +79,7 @@ class Blob< 2, Real > : public BlobBase< Real, 2 > enum { Dimensions = 2 }; typedef Real RealType; - typedef Vectors::StaticVector< Dimensions, Real > VertexType; + typedef Containers::StaticVector< Dimensions, Real > VertexType; static String getType(); @@ -111,7 +111,7 @@ class Blob< 3, Real > : public BlobBase< Real, 3 > enum { Dimensions = 3 }; typedef Real RealType; - typedef Vectors::StaticVector< Dimensions, Real > VertexType; + typedef Containers::StaticVector< Dimensions, Real > VertexType; static String getType(); diff --git a/src/TNL/Functions/Analytic/Blob_impl.h b/src/TNL/Functions/Analytic/Blob_impl.h index d7a56ef2ce7ee5cefd72216997f9cec970d5b03f..c6d969d38527cfab69858a39f3d2fac3b340287e 100644 --- a/src/TNL/Functions/Analytic/Blob_impl.h +++ b/src/TNL/Functions/Analytic/Blob_impl.h @@ -36,7 +36,7 @@ template< typename Real > String Blob< 1, Real >::getType() { - return "Blob< 1, " + TNL::getType< Real >() + String( " >" ); + return "Functions::Analytic::Blob< 1, " + TNL::getType< Real >() + String( " >" ); } template< typename Real > @@ -79,7 +79,7 @@ template< typename Real > String Blob< 2, Real >::getType() { - return String( "Blob< 2, " ) + TNL::getType< Real >() + " >"; + return String( "Functions::Analytic::Blob< 2, " ) + TNL::getType< Real >() + " >"; } template< typename Real > @@ -123,7 +123,7 @@ template< typename Real > String Blob< 3, Real >::getType() { - return String( "Blob< 3, " ) + TNL::getType< Real >() + " >"; + return String( "Functions::Analytic::Blob< 3, " ) + TNL::getType< Real >() + " >"; } template< typename Real > diff --git a/src/TNL/Functions/Analytic/Constant.h b/src/TNL/Functions/Analytic/Constant.h index 4c85799d5a273497da46b43ea398e21f3f390c56..dc12be876f6adc50d423940d1c13c194adb26563 100644 --- a/src/TNL/Functions/Analytic/Constant.h +++ b/src/TNL/Functions/Analytic/Constant.h @@ -11,7 +11,7 @@ #pragma once #include <iostream> -#include <TNL/Vectors/StaticVector.h> +#include <TNL/Containers/StaticVector.h> #include <TNL/Functions/Domain.h> namespace TNL { @@ -25,7 +25,7 @@ class Constant : public Domain< dimensions, NonspaceDomain > public: typedef Real RealType; - typedef Vectors::StaticVector< dimensions, RealType > VertexType; + typedef Containers::StaticVector< dimensions, RealType > VertexType; Constant(); diff --git a/src/TNL/Functions/Analytic/Cylinder.h b/src/TNL/Functions/Analytic/Cylinder.h index ad0305c677d5deb28867fdb2b6f147a419c577b1..bdfde9bd8d144bb187b333c638a653241be38c80 100644 --- a/src/TNL/Functions/Analytic/Cylinder.h +++ b/src/TNL/Functions/Analytic/Cylinder.h @@ -11,7 +11,7 @@ #pragma once #include <TNL/Config/ParameterContainer.h> -#include <TNL/Vectors/StaticVector.h> +#include <TNL/Containers/StaticVector.h> #include <TNL/Functions/Domain.h> #include <TNL/Devices/Cuda.h> @@ -52,7 +52,7 @@ class Cylinder< 1, Real > : public CylinderBase< Real, 1 > enum { Dimensions = 1 }; typedef Real RealType; - typedef Vectors::StaticVector< Dimensions, Real > VertexType; + typedef Containers::StaticVector< Dimensions, Real > VertexType; static String getType(); @@ -86,7 +86,7 @@ class Cylinder< 2, Real > : public CylinderBase< Real, 2 > enum { Dimensions = 2 }; typedef Real RealType; - typedef Vectors::StaticVector< Dimensions, Real > VertexType; + typedef Containers::StaticVector< Dimensions, Real > VertexType; static String getType(); @@ -120,7 +120,7 @@ class Cylinder< 3, Real > : public CylinderBase< Real, 3 > enum { Dimensions = 3 }; typedef Real RealType; - typedef Vectors::StaticVector< Dimensions, Real > VertexType; + typedef Containers::StaticVector< Dimensions, Real > VertexType; static String getType(); diff --git a/src/TNL/Functions/Analytic/Cylinder_impl.h b/src/TNL/Functions/Analytic/Cylinder_impl.h index a79aae139c08c205bf100b454198e40bc8eb0634..56a27935db2c7e3d198536babb64a4c1a956f4c4 100644 --- a/src/TNL/Functions/Analytic/Cylinder_impl.h +++ b/src/TNL/Functions/Analytic/Cylinder_impl.h @@ -51,7 +51,7 @@ template< typename Real > String Cylinder< 1, Real >::getType() { - return "Cylinder< 1, " + TNL::getType< Real >() + String( " >" ); + return "Functions::Analytic::Cylinder< 1, " + TNL::getType< Real >() + String( " >" ); } template< typename Real > @@ -95,7 +95,7 @@ template< typename Real > String Cylinder< 2, Real >::getType() { - return String( "Cylinder< 2, " ) + TNL::getType< Real >() + " >"; + return String( "Functions::Analytic::Cylinder< 2, " ) + TNL::getType< Real >() + " >"; } template< typename Real > @@ -142,7 +142,7 @@ template< typename Real > String Cylinder< 3, Real >::getType() { - return String( "Cylinder< 3, " ) + TNL::getType< Real >() + " >"; + return String( "Functions::Analytic::Cylinder< 3, " ) + TNL::getType< Real >() + " >"; } template< typename Real > diff --git a/src/TNL/Functions/Analytic/ExpBump.h b/src/TNL/Functions/Analytic/ExpBump.h index 54897eafc5fc9b523a48b29a104ad082dcab2954..9b8e40a8220c8bf36de4fc0515b962183d3b1fa1 100644 --- a/src/TNL/Functions/Analytic/ExpBump.h +++ b/src/TNL/Functions/Analytic/ExpBump.h @@ -11,7 +11,7 @@ #pragma once #include <TNL/Config/ParameterContainer.h> -#include <TNL/Vectors/StaticVector.h> +#include <TNL/Containers/StaticVector.h> #include <TNL/Functions/Domain.h> namespace TNL { @@ -56,7 +56,7 @@ class ExpBump< 1, Real > : public ExpBumpBase< 1, Real > public: typedef Real RealType; - typedef Vectors::StaticVector< 1, RealType > VertexType; + typedef Containers::StaticVector< 1, RealType > VertexType; static String getType(); @@ -86,7 +86,7 @@ class ExpBump< 2, Real > : public ExpBumpBase< 2, Real > public: typedef Real RealType; - typedef Vectors::StaticVector< 2, RealType > VertexType; + typedef Containers::StaticVector< 2, RealType > VertexType; static String getType(); @@ -116,7 +116,7 @@ class ExpBump< 3, Real > : public ExpBumpBase< 3, Real > public: typedef Real RealType; - typedef Vectors::StaticVector< 3, RealType > VertexType; + typedef Containers::StaticVector< 3, RealType > VertexType; static String getType(); diff --git a/src/TNL/Functions/Analytic/ExpBump_impl.h b/src/TNL/Functions/Analytic/ExpBump_impl.h index fb2f11506e58a5a200eb5bd8f0baeec62382e4ad..10e0c85528112934db051f51cf8d684e5d14707f 100644 --- a/src/TNL/Functions/Analytic/ExpBump_impl.h +++ b/src/TNL/Functions/Analytic/ExpBump_impl.h @@ -67,7 +67,7 @@ template< typename Real > String ExpBump< 1, Real >::getType() { - return "ExpBump< 1, " + TNL::getType< Real >() + String( " >" ); + return "Functions::Analytic::ExpBump< 1, " + TNL::getType< Real >() + String( " >" ); } template< typename Real > @@ -117,7 +117,7 @@ template< typename Real > String ExpBump< 2, Real >::getType() { - return String( "ExpBump< 2, " ) + TNL::getType< Real >() + " >"; + return String( "Functions::Analytic::ExpBump< 2, " ) + TNL::getType< Real >() + " >"; } template< typename Real > @@ -172,7 +172,7 @@ template< typename Real > String ExpBump< 3, Real >::getType() { - return String( "ExpBump< 3, " ) + TNL::getType< Real >() + " >"; + return String( "Functions::Analytic::ExpBump< 3, " ) + TNL::getType< Real >() + " >"; } template< typename Real > diff --git a/src/TNL/Functions/Analytic/Flowerpot.h b/src/TNL/Functions/Analytic/Flowerpot.h index cea103b383410c1408cf31e9d65c271b73815cdf..c8df009b7e42c7b955775c2b4486a423529d0252 100644 --- a/src/TNL/Functions/Analytic/Flowerpot.h +++ b/src/TNL/Functions/Analytic/Flowerpot.h @@ -11,7 +11,7 @@ #pragma once #include <TNL/Config/ParameterContainer.h> -#include <TNL/Vectors/StaticVector.h> +#include <TNL/Containers/StaticVector.h> #include <TNL/Functions/Domain.h> #include <TNL/Devices/Cuda.h> @@ -52,7 +52,7 @@ class Flowerpot< 1, Real > : public FlowerpotBase< Real, 1 > enum { Dimensions = 1 }; typedef Real RealType; - typedef Vectors::StaticVector< Dimensions, Real > VertexType; + typedef Containers::StaticVector< Dimensions, Real > VertexType; static String getType(); @@ -86,7 +86,7 @@ class Flowerpot< 2, Real > : public FlowerpotBase< Real, 2 > enum { Dimensions = 2 }; typedef Real RealType; - typedef Vectors::StaticVector< Dimensions, Real > VertexType; + typedef Containers::StaticVector< Dimensions, Real > VertexType; static String getType(); @@ -120,7 +120,7 @@ class Flowerpot< 3, Real > : public FlowerpotBase< Real, 3 > enum { Dimensions = 3 }; typedef Real RealType; - typedef Vectors::StaticVector< Dimensions, Real > VertexType; + typedef Containers::StaticVector< Dimensions, Real > VertexType; static String getType(); diff --git a/src/TNL/Functions/Analytic/Flowerpot_impl.h b/src/TNL/Functions/Analytic/Flowerpot_impl.h index 30fa08c8571ab7e35e584e4e919824473e2e7918..a3da8b4d2ae38d0972861cf49e77081240c1781c 100644 --- a/src/TNL/Functions/Analytic/Flowerpot_impl.h +++ b/src/TNL/Functions/Analytic/Flowerpot_impl.h @@ -49,7 +49,7 @@ template< typename Real > String Flowerpot< 1, Real >::getType() { - return "Flowerpot< 1, " + TNL::getType< Real >() + String( " >" ); + return "Functions::Analytic::Flowerpot< 1, " + TNL::getType< Real >() + String( " >" ); } template< typename Real > @@ -93,7 +93,7 @@ template< typename Real > String Flowerpot< 2, Real >::getType() { - return String( "Flowerpot< 2, " ) + TNL::getType< Real >() + " >"; + return String( "Functions::Analytic::Flowerpot< 2, " ) + TNL::getType< Real >() + " >"; } template< typename Real > @@ -140,7 +140,7 @@ template< typename Real > String Flowerpot< 3, Real >::getType() { - return String( "Flowerpot< 3, " ) + TNL::getType< Real >() + " >"; + return String( "Functions::Analytic::Flowerpot< 3, " ) + TNL::getType< Real >() + " >"; } template< typename Real > diff --git a/src/TNL/Functions/Analytic/PseudoSquare.h b/src/TNL/Functions/Analytic/PseudoSquare.h index 811f158762593ca5de5e87c81f8478b49c6a6704..26d3086f23b1fa855acec067dc0b72a5ba878e1e 100644 --- a/src/TNL/Functions/Analytic/PseudoSquare.h +++ b/src/TNL/Functions/Analytic/PseudoSquare.h @@ -11,7 +11,7 @@ #pragma once #include <TNL/Config/ParameterContainer.h> -#include <TNL/Vectors/StaticVector.h> +#include <TNL/Containers/StaticVector.h> #include <TNL/Functions/Domain.h> #include <TNL/Devices/Cuda.h> @@ -48,7 +48,7 @@ class PseudoSquare< 1, Real > : public PseudoSquareBase< Real, 1 > enum { Dimensions = 1 }; typedef Real RealType; - typedef Vectors::StaticVector< Dimensions, Real > VertexType; + typedef Containers::StaticVector< Dimensions, Real > VertexType; static String getType(); @@ -79,7 +79,7 @@ class PseudoSquare< 2, Real > : public PseudoSquareBase< Real, 2 > enum { Dimensions = 2 }; typedef Real RealType; - typedef Vectors::StaticVector< Dimensions, Real > VertexType; + typedef Containers::StaticVector< Dimensions, Real > VertexType; static String getType(); @@ -110,7 +110,7 @@ class PseudoSquare< 3, Real > : public PseudoSquareBase< Real, 3 > enum { Dimensions = 3 }; typedef Real RealType; - typedef Vectors::StaticVector< Dimensions, Real > VertexType; + typedef Containers::StaticVector< Dimensions, Real > VertexType; static String getType(); diff --git a/src/TNL/Functions/Analytic/PseudoSquare_impl.h b/src/TNL/Functions/Analytic/PseudoSquare_impl.h index 169de20838d14f1659edefd69afa9095cbe86cce..378e11ac11c720b573a46d922b4d66cdb63ee66b 100644 --- a/src/TNL/Functions/Analytic/PseudoSquare_impl.h +++ b/src/TNL/Functions/Analytic/PseudoSquare_impl.h @@ -37,7 +37,7 @@ template< typename Real > String PseudoSquare< 1, Real >::getType() { - return "PseudoSquare< 1, " + TNL::getType< Real >() + String( " >" ); + return "Functions::Analytic::PseudoSquare< 1, " + TNL::getType< Real >() + String( " >" ); } template< typename Real > @@ -80,7 +80,7 @@ template< typename Real > String PseudoSquare< 2, Real >::getType() { - return String( "PseudoSquare< 2, " ) + TNL::getType< Real >() + " >"; + return String( "Functions::Analytic::PseudoSquare< 2, " ) + TNL::getType< Real >() + " >"; } template< typename Real > @@ -124,7 +124,7 @@ template< typename Real > String PseudoSquare< 3, Real >::getType() { - return String( "PseudoSquare< 3, " ) + TNL::getType< Real >() + " >"; + return String( "Functions::Analytic::PseudoSquare< 3, " ) + TNL::getType< Real >() + " >"; } template< typename Real > diff --git a/src/TNL/Functions/Analytic/SinBumps.h b/src/TNL/Functions/Analytic/SinBumps.h index e82aaa50d189cf901494a1e0d3a70733910b7f0e..d3cc0434582e8b0c6df273f3063f382d1bef3ebb 100644 --- a/src/TNL/Functions/Analytic/SinBumps.h +++ b/src/TNL/Functions/Analytic/SinBumps.h @@ -11,7 +11,7 @@ #pragma once #include <TNL/Config/ParameterContainer.h> -#include <TNL/Vectors/StaticVector.h> +#include <TNL/Containers/StaticVector.h> #include <TNL/Functions/Domain.h> namespace TNL { @@ -52,12 +52,12 @@ class SinBumps }; template< typename Real > -class SinBumps< 1, Real > : public SinBumpsBase< Vectors::StaticVector< 1, Real > > +class SinBumps< 1, Real > : public SinBumpsBase< Containers::StaticVector< 1, Real > > { public: typedef Real RealType; - typedef Vectors::StaticVector< 1, RealType > VertexType; + typedef Containers::StaticVector< 1, RealType > VertexType; SinBumps(); @@ -85,12 +85,12 @@ class SinBumps< 1, Real > : public SinBumpsBase< Vectors::StaticVector< 1, Real }; template< typename Real > -class SinBumps< 2, Real > : public SinBumpsBase< Vectors::StaticVector< 2, Real > > +class SinBumps< 2, Real > : public SinBumpsBase< Containers::StaticVector< 2, Real > > { public: typedef Real RealType; - typedef Vectors::StaticVector< 2, RealType > VertexType; + typedef Containers::StaticVector< 2, RealType > VertexType; SinBumps(); @@ -118,12 +118,12 @@ class SinBumps< 2, Real > : public SinBumpsBase< Vectors::StaticVector< 2, Real }; template< typename Real > -class SinBumps< 3, Real > : public SinBumpsBase< Vectors::StaticVector< 3, Real > > +class SinBumps< 3, Real > : public SinBumpsBase< Containers::StaticVector< 3, Real > > { public: typedef Real RealType; - typedef Vectors::StaticVector< 3, RealType > VertexType; + typedef Containers::StaticVector< 3, RealType > VertexType; SinBumps(); diff --git a/src/TNL/Functions/Analytic/SinWave.h b/src/TNL/Functions/Analytic/SinWave.h index 660e93fc3b00fcccd90735fa1ab3aba2300c4740..98c8cdddc6e8f9d0a0433fca653ade91d5d85665 100644 --- a/src/TNL/Functions/Analytic/SinWave.h +++ b/src/TNL/Functions/Analytic/SinWave.h @@ -11,7 +11,7 @@ #pragma once #include <TNL/Config/ParameterContainer.h> -#include <TNL/Vectors/StaticVector.h> +#include <TNL/Containers/StaticVector.h> #include <TNL/Functions/Domain.h> namespace TNL { @@ -57,7 +57,7 @@ class SinWave< 1, Real > : public SinWaveBase< 1, Real > public: typedef Real RealType; - typedef Vectors::StaticVector< 1, RealType > VertexType; + typedef Containers::StaticVector< 1, RealType > VertexType; #ifdef HAVE_NOT_CXX11 template< int XDiffOrder, @@ -84,7 +84,7 @@ class SinWave< 2, Real > : public SinWaveBase< 2, Real > public: typedef Real RealType; - typedef Vectors::StaticVector< 2, RealType > VertexType; + typedef Containers::StaticVector< 2, RealType > VertexType; #ifdef HAVE_NOT_CXX11 template< int XDiffOrder, @@ -111,7 +111,7 @@ class SinWave< 3, Real > : public SinWaveBase< 3, Real > public: typedef Real RealType; - typedef Vectors::StaticVector< 3, RealType > VertexType; + typedef Containers::StaticVector< 3, RealType > VertexType; diff --git a/src/TNL/Functions/Analytic/Twins.h b/src/TNL/Functions/Analytic/Twins.h index 458dd11dfba4f5e54fbd37d1d9014f20ca453c12..ebdb507ac79e84681396715254ff4d4e30ff1b9e 100644 --- a/src/TNL/Functions/Analytic/Twins.h +++ b/src/TNL/Functions/Analytic/Twins.h @@ -11,7 +11,7 @@ #pragma once #include <TNL/Config/ParameterContainer.h> -#include <TNL/Vectors/StaticVector.h> +#include <TNL/Containers/StaticVector.h> #include <TNL/Functions/Domain.h> #include <TNL/Devices/Cuda.h> @@ -44,7 +44,7 @@ class Twins< 1, Real > : public TwinsBase< Real, 1 > enum { Dimensions = 1 }; typedef Real RealType; - typedef Vectors::StaticVector< Dimensions, Real > VertexType; + typedef Containers::StaticVector< Dimensions, Real > VertexType; static String getType(); @@ -78,7 +78,7 @@ class Twins< 2, Real > : public TwinsBase< Real, 2 > enum { Dimensions = 2 }; typedef Real RealType; - typedef Vectors::StaticVector< Dimensions, Real > VertexType; + typedef Containers::StaticVector< Dimensions, Real > VertexType; static String getType(); @@ -112,7 +112,7 @@ class Twins< 3, Real > : public TwinsBase< Real, 3 > enum { Dimensions = 3 }; typedef Real RealType; - typedef Vectors::StaticVector< Dimensions, Real > VertexType; + typedef Containers::StaticVector< Dimensions, Real > VertexType; static String getType(); diff --git a/src/TNL/Functions/Analytic/Twins_impl.h b/src/TNL/Functions/Analytic/Twins_impl.h index 46025d5de2321f96cbdbc2e893bf509d089a54ab..222f9a452adf289bcc9282c75cf2014ecc23c289 100644 --- a/src/TNL/Functions/Analytic/Twins_impl.h +++ b/src/TNL/Functions/Analytic/Twins_impl.h @@ -35,7 +35,7 @@ template< typename Real > String Twins< 1, Real >::getType() { - return "Twins< 1, " + TNL::getType< Real >() + String( " >" ); + return "Functions::Analytic::Twins< 1, " + TNL::getType< Real >() + String( " >" ); } template< typename Real > @@ -79,7 +79,7 @@ template< typename Real > String Twins< 2, Real >::getType() { - return String( "Twins< 2, " ) + TNL::getType< Real >() + " >"; + return String( "Functions::Analytic::Twins< 2, " ) + TNL::getType< Real >() + " >"; } template< typename Real > @@ -125,7 +125,7 @@ template< typename Real > String Twins< 3, Real >::getType() { - return String( "Twins< 3, " ) + TNL::getType< Real >() + " >"; + return String( "Functions::Analytic::Twins< 3, " ) + TNL::getType< Real >() + " >"; } template< typename Real > diff --git a/src/TNL/Functions/MeshFunction.h b/src/TNL/Functions/MeshFunction.h index 48969d8732d068bd23da25f24d0a9669159d610e..d120a061873fd3cfd7404ea819b18fd9bdd5a7d7 100644 --- a/src/TNL/Functions/MeshFunction.h +++ b/src/TNL/Functions/MeshFunction.h @@ -35,7 +35,7 @@ class MeshFunction : typedef typename MeshType::DeviceType DeviceType; typedef typename MeshType::IndexType IndexType; typedef Real RealType; - typedef Vectors::Vector< RealType, DeviceType, IndexType > VectorType; + typedef Containers::Vector< RealType, DeviceType, IndexType > VectorType; typedef Functions::MeshFunction< Mesh, MeshEntityDimensions, Real > ThisType; static constexpr int getEntitiesDimensions() { return MeshEntityDimensions; }; diff --git a/src/TNL/Functions/MeshFunction_impl.h b/src/TNL/Functions/MeshFunction_impl.h index b79b428c01023379d36fb335e672a97b09caa6cc..bf627cafc051d741f10c616816a27b484c89badd 100644 --- a/src/TNL/Functions/MeshFunction_impl.h +++ b/src/TNL/Functions/MeshFunction_impl.h @@ -66,7 +66,7 @@ String MeshFunction< Mesh, MeshEntityDimensions, Real >:: getType() { - return String( "MeshFunction< " ) + + return String( "Functions::MeshFunction< " ) + Mesh::getType() + ", " + String( MeshEntityDimensions ) + ", " + TNL::getType< Real >() + diff --git a/src/TNL/Functions/TestFunction.h b/src/TNL/Functions/TestFunction.h index b839c63f525c0e8e84f5fe33bbc2757fee8a0ab8..55e50c4f9df42f064590b06a62fd8622e5ba0492 100644 --- a/src/TNL/Functions/TestFunction.h +++ b/src/TNL/Functions/TestFunction.h @@ -11,7 +11,7 @@ #pragma once #include <TNL/Devices/Host.h> -#include <TNL/Vectors/StaticVector.h> +#include <TNL/Containers/StaticVector.h> #include <TNL/Config/ConfigDescription.h> #include <TNL/Config/ParameterContainer.h> #include <TNL/Functions/Domain.h> @@ -45,7 +45,7 @@ class TestFunction : public Domain< FunctionDimensions, SpaceDomain > enum{ Dimensions = FunctionDimensions }; typedef Real RealType; - typedef Vectors::StaticVector< Dimensions, Real > VertexType; + typedef Containers::StaticVector< Dimensions, Real > VertexType; TestFunction(); diff --git a/src/TNL/Images/DicomSeries.h b/src/TNL/Images/DicomSeries.h index eb79a6cf0f91ad220de21fc03a1a9155de1ce163..40054e4a4f90decc79ab202ac20a51cb5dc9158c 100644 --- a/src/TNL/Images/DicomSeries.h +++ b/src/TNL/Images/DicomSeries.h @@ -14,7 +14,7 @@ #pragma once -#include <TNL/Arrays/Array.h> +#include <TNL/Containers/Array.h> #include <TNL/List.h> #include <TNL/String.h> #include <TNL/core/param-types.h> @@ -106,7 +106,7 @@ class DicomSeries : public tnlImage< int > List< String > fileList; - Arrays::Array<DicomHeader *,Devices::Host,int> dicomSeriesHeaders; + Containers::Array<DicomHeader *,Devices::Host,int> dicomSeriesHeaders; bool isLoaded; diff --git a/src/TNL/Matrices/CSR.h b/src/TNL/Matrices/CSR.h index dd1385c0af6910d4d325b0ed1b583bff236e5c9c..e42fca6b73990d05e1d5312d61b7022ecc6f2b49 100644 --- a/src/TNL/Matrices/CSR.h +++ b/src/TNL/Matrices/CSR.h @@ -11,7 +11,7 @@ #pragma once #include <TNL/Matrices/Sparse.h> -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> namespace TNL { namespace Matrices { @@ -200,7 +200,7 @@ class CSR : public Sparse< Real, Device, Index > protected: - Vectors::Vector< Index, Device, Index > rowPointers; + Containers::Vector< Index, Device, Index > rowPointers; SPMVCudaKernel spmvCudaKernel; diff --git a/src/TNL/Matrices/CSR_impl.h b/src/TNL/Matrices/CSR_impl.h index 2725a9a48ede048ea7815a7a36e1d341b6b155c3..587b0999f7acd1ad0cbdee7b90878cc46969e446 100644 --- a/src/TNL/Matrices/CSR_impl.h +++ b/src/TNL/Matrices/CSR_impl.h @@ -11,8 +11,8 @@ #pragma once #include <TNL/Matrices/CSR.h> -#include <TNL/Vectors/Vector.h> -#include <TNL/Vectors/SharedVector.h> +#include <TNL/Containers/Vector.h> +#include <TNL/Containers/SharedVector.h> #include <TNL/core/mfuncs.h> #ifdef HAVE_CUSPARSE @@ -43,7 +43,7 @@ template< typename Real, typename Index > String CSR< Real, Device, Index >::getType() { - return String( "CSR< ") + + return String( "Matrices::CSR< ") + String( TNL::getType< Real>() ) + String( ", " ) + Device :: getDeviceType() + @@ -84,7 +84,7 @@ bool CSR< Real, Device, Index >::setCompressedRowsLengths( const CompressedRowsL */ Assert( this->getRows() > 0, ); Assert( this->getColumns() > 0, ); - Vectors::SharedVector< IndexType, DeviceType, IndexType > rowPtrs; + Containers::SharedVector< IndexType, DeviceType, IndexType > rowPtrs; rowPtrs.bind( this->rowPointers.getData(), this->getRows() ); rowPtrs = rowLengths; this->rowPointers.setElement( this->rows, 0 ); diff --git a/src/TNL/Matrices/ChunkedEllpack.h b/src/TNL/Matrices/ChunkedEllpack.h index e4f967dfa89d47a968ce0f25d36d4f8e9576e753..a6a1d96f712fe6ba5b619f1a8ee4de9428fa6ad3 100644 --- a/src/TNL/Matrices/ChunkedEllpack.h +++ b/src/TNL/Matrices/ChunkedEllpack.h @@ -23,7 +23,7 @@ #pragma once #include <TNL/Matrices/Sparse.h> -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> namespace TNL { namespace Matrices { @@ -230,7 +230,7 @@ class ChunkedEllpack : public Sparse< Real, Device, Index > protected: - void resolveSliceSizes( const Vectors::Vector< Index, Devices::Host, Index >& rowLengths ); + void resolveSliceSizes( const Containers::Vector< Index, Devices::Host, Index >& rowLengths ); bool setSlice( const CompressedRowsLengthsVector& rowLengths, const IndexType sliceIdx, @@ -303,9 +303,9 @@ class ChunkedEllpack : public Sparse< Real, Device, Index > IndexType chunksInSlice, desiredChunkSize; - Vectors::Vector< Index, Device, Index > rowToChunkMapping, rowToSliceMapping, rowPointers; + Containers::Vector< Index, Device, Index > rowToChunkMapping, rowToSliceMapping, rowPointers; - Arrays::Array< ChunkedEllpackSliceInfo, Device, Index > slices; + Containers::Array< ChunkedEllpackSliceInfo, Device, Index > slices; IndexType numberOfSlices; diff --git a/src/TNL/Matrices/ChunkedEllpack_impl.h b/src/TNL/Matrices/ChunkedEllpack_impl.h index 0ccc7176f66ae7c6cdf58aa66570156edec515cb..fd4e67a5a7e6daef5e6fb31fbe560918d0612390 100644 --- a/src/TNL/Matrices/ChunkedEllpack_impl.h +++ b/src/TNL/Matrices/ChunkedEllpack_impl.h @@ -11,7 +11,7 @@ #pragma once #include <TNL/Matrices/ChunkedEllpack.h> -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #include <TNL/core/mfuncs.h> #ifdef HAVE_CUDA @@ -44,7 +44,7 @@ template< typename Real, typename Index > String ChunkedEllpack< Real, Device, Index >::getType() { - return String( "ChunkedEllpack< ") + + return String( "Matrices::ChunkedEllpack< ") + String( TNL::getType< Real >() ) + String( ", " ) + Device :: getDeviceType() + @@ -86,7 +86,7 @@ bool ChunkedEllpack< Real, Device, Index >::setDimensions( const IndexType rows, template< typename Real, typename Device, typename Index > -void ChunkedEllpack< Real, Device, Index >::resolveSliceSizes( const Vectors::Vector< Index, Devices::Host, Index >& rowLengths ) +void ChunkedEllpack< Real, Device, Index >::resolveSliceSizes( const Containers::Vector< Index, Devices::Host, Index >& rowLengths ) { /**** * Iterate over rows and allocate slices so that each slice has @@ -226,7 +226,7 @@ bool ChunkedEllpack< Real, Device, Index >::setCompressedRowsLengths( const Comp { ChunkedEllpack< RealType, Devices::Host, IndexType > hostMatrix; hostMatrix.setDimensions( this->getRows(), this->getColumns() ); - Vectors::Vector< IndexType, Devices::Host, IndexType > hostCompressedRowsLengths; + Containers::Vector< IndexType, Devices::Host, IndexType > hostCompressedRowsLengths; hostCompressedRowsLengths.setLike( rowLengths); hostCompressedRowsLengths = rowLengths; hostMatrix.setNumberOfChunksInSlice( this->chunksInSlice ); diff --git a/src/TNL/Matrices/Dense.h b/src/TNL/Matrices/Dense.h index 6292bd068be2be5829099682d3bb0cb631920adf..f95c4b626e70d64c4fb41e3cc012fde5a04e6b43 100644 --- a/src/TNL/Matrices/Dense.h +++ b/src/TNL/Matrices/Dense.h @@ -13,7 +13,7 @@ #include <TNL/Devices/Host.h> #include <TNL/Matrices/Matrix.h> #include <TNL/Matrices/DenseRow.h> -#include <TNL/Arrays/Array.h> +#include <TNL/Containers/Array.h> namespace TNL { namespace Matrices { diff --git a/src/TNL/Matrices/Dense_impl.h b/src/TNL/Matrices/Dense_impl.h index 7b946542cf96e0d0f261bbdd001056b75fdc0d1b..aba3ee1c59f05121ffbf37eae32996c383bca598 100644 --- a/src/TNL/Matrices/Dense_impl.h +++ b/src/TNL/Matrices/Dense_impl.h @@ -32,7 +32,7 @@ template< typename Real, typename Index > String Dense< Real, Device, Index >::getType() { - return String( "Dense< " ) + + return String( "Matrices::Dense< " ) + String( TNL::getType< RealType >() ) + ", " + String( Device :: getDeviceType() ) + ", " + String( TNL::getType< IndexType >() ) + " >"; diff --git a/src/TNL/Matrices/Ellpack.h b/src/TNL/Matrices/Ellpack.h index 5f3954f564a00693ba118246a54b24dedb9c0c2b..f7d0b9cca03beb9c60e5d5c860e76789d1f97c07 100644 --- a/src/TNL/Matrices/Ellpack.h +++ b/src/TNL/Matrices/Ellpack.h @@ -11,7 +11,7 @@ #pragma once #include <TNL/Matrices/Sparse.h> -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> namespace TNL { namespace Matrices { diff --git a/src/TNL/Matrices/Ellpack_impl.h b/src/TNL/Matrices/Ellpack_impl.h index 08dac04983abde585b13ab3eba72e043b23992ac..d86bbd07df130a55b5f65066d67ea77ae1a958da 100644 --- a/src/TNL/Matrices/Ellpack_impl.h +++ b/src/TNL/Matrices/Ellpack_impl.h @@ -11,7 +11,7 @@ #pragma once #include <TNL/Matrices/Ellpack.h> -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #include <TNL/core/mfuncs.h> namespace TNL { @@ -30,7 +30,7 @@ template< typename Real, typename Index > String Ellpack< Real, Device, Index > :: getType() { - return String( "Ellpack< ") + + return String( "Matrices::Ellpack< ") + String( TNL::getType< Real >() ) + String( ", " ) + Device :: getDeviceType() + diff --git a/src/TNL/Matrices/Matrix.h b/src/TNL/Matrices/Matrix.h index e747e4b86cb557d873fba587efa5ef9f849bb45f..57e95defa1219fd27eb79b24e954df3a4ee1defa 100644 --- a/src/TNL/Matrices/Matrix.h +++ b/src/TNL/Matrices/Matrix.h @@ -12,7 +12,7 @@ #include <TNL/Object.h> #include <TNL/Devices/Host.h> -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> namespace TNL { namespace Matrices { @@ -27,8 +27,8 @@ class Matrix : public virtual Object typedef Real RealType; typedef Device DeviceType; typedef Index IndexType; - typedef Vectors::Vector< IndexType, DeviceType, IndexType > CompressedRowsLengthsVector; - typedef Vectors::Vector< RealType, DeviceType, IndexType > ValuesVector; + typedef Containers::Vector< IndexType, DeviceType, IndexType > CompressedRowsLengthsVector; + typedef Containers::Vector< RealType, DeviceType, IndexType > ValuesVector; Matrix(); @@ -39,7 +39,7 @@ class Matrix : public virtual Object virtual IndexType getRowLength( const IndexType row ) const = 0; - virtual void getCompressedRowsLengths( Vectors::Vector< IndexType, DeviceType, IndexType >& rowLengths ) const; + virtual void getCompressedRowsLengths( Containers::Vector< IndexType, DeviceType, IndexType >& rowLengths ) const; template< typename Real2, typename Device2, typename Index2 > bool setLike( const Matrix< Real2, Device2, Index2 >& matrix ); diff --git a/src/TNL/Matrices/MatrixReader.h b/src/TNL/Matrices/MatrixReader.h index 1a0b9e5d9ef74451096c7d625d8054efdfc0dfbb..1bcb88842a65455b9e93bf4620af9a9748cbdbfb 100644 --- a/src/TNL/Matrices/MatrixReader.h +++ b/src/TNL/Matrices/MatrixReader.h @@ -12,7 +12,7 @@ #include <istream> #include <TNL/String.h> -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> namespace TNL { namespace Matrices { @@ -64,7 +64,7 @@ class MatrixReader bool verbose ); static bool computeCompressedRowsLengthsFromMtxFile( std::istream& file, - Vectors::Vector< int, Devices::Host, int >& rowLengths, + Containers::Vector< int, Devices::Host, int >& rowLengths, const int columns, const int rows, bool symmetricMatrix, diff --git a/src/TNL/Matrices/MatrixReader_impl.h b/src/TNL/Matrices/MatrixReader_impl.h index daa50d6d48ceeeb0b09b03dbcfa91b2856d33018..1c51d3a424db2987291274059b861006a733ae5c 100644 --- a/src/TNL/Matrices/MatrixReader_impl.h +++ b/src/TNL/Matrices/MatrixReader_impl.h @@ -13,7 +13,7 @@ #include <iomanip> #include <TNL/List.h> #include <TNL/String.h> -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #include <TNL/TimerRT.h> namespace TNL { @@ -252,7 +252,7 @@ bool MatrixReader< Matrix >::readMtxHeader( std::istream& file, template< typename Matrix > bool MatrixReader< Matrix >::computeCompressedRowsLengthsFromMtxFile( std::istream& file, - Vectors::Vector< int, Devices::Host, int >& rowLengths, + Containers::Vector< int, Devices::Host, int >& rowLengths, const int columns, const int rows, bool symmetricMatrix, diff --git a/src/TNL/Matrices/Matrix_impl.h b/src/TNL/Matrices/Matrix_impl.h index 3425c7d706bb62567a75a79bfb86dc58cd422e1b..f4dc2a12d997e2eac4abb8d893b437d5e5cf08b0 100644 --- a/src/TNL/Matrices/Matrix_impl.h +++ b/src/TNL/Matrices/Matrix_impl.h @@ -41,7 +41,7 @@ template< typename Real, template< typename Real, typename Device, typename Index > -void Matrix< Real, Device, Index >::getCompressedRowsLengths( Vectors::Vector< IndexType, DeviceType, IndexType >& rowLengths ) const +void Matrix< Real, Device, Index >::getCompressedRowsLengths( Containers::Vector< IndexType, DeviceType, IndexType >& rowLengths ) const { rowLengths.setSize( this->getRows() ); for( IndexType row = 0; row < this->getRows(); row++ ) @@ -99,8 +99,8 @@ bool Matrix< Real, Device, Index >::copyFrom( const MatrixT& matrix, this->setLike( matrix ); if( ! this->setCompressedRowsLengths( rowLengths ) ) return false; - Vectors::Vector< RealType, Devices::Host, IndexType > values; - Vectors::Vector< IndexType, Devices::Host, IndexType > columns; + Containers::Vector< RealType, Devices::Host, IndexType > values; + Containers::Vector< IndexType, Devices::Host, IndexType > columns; if( ! values.setSize( this->getColumns() ) || ! columns.setSize( this->getColumns() ) ) return false; @@ -121,12 +121,12 @@ Matrix< Real, Device, Index >& Matrix< Real, Device, Index >::operator = ( const { this->setLike( m ); - Vectors::Vector< IndexType, DeviceType, IndexType > rowLengths; + Containers::Vector< IndexType, DeviceType, IndexType > rowLengths; m.getCompressedRowsLengths( rowLengths ); this->setCompressedRowsLengths( rowLengths ); - Vectors::Vector< RealType, DeviceType, IndexType > rowValues; - Vectors::Vector< IndexType, DeviceType, IndexType > rowColumns; + Containers::Vector< RealType, DeviceType, IndexType > rowValues; + Containers::Vector< IndexType, DeviceType, IndexType > rowColumns; const IndexType maxRowLength = rowLengths.max(); rowValues.setSize( maxRowLength ); rowColumns.setSize( maxRowLength ); diff --git a/src/TNL/Matrices/Multidiagonal.h b/src/TNL/Matrices/Multidiagonal.h index d1b0f9519d16523dbd7ea05175e6c5f373708def..407178fe29c4840e5694e1ff4db3adf73c9ab482 100644 --- a/src/TNL/Matrices/Multidiagonal.h +++ b/src/TNL/Matrices/Multidiagonal.h @@ -11,7 +11,7 @@ #pragma once #include <TNL/Matrices/Matrix.h> -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #include <TNL/Matrices/MultidiagonalRow.h> namespace TNL { @@ -54,7 +54,7 @@ class Multidiagonal : public Matrix< Real, Device, Index > template< typename Vector > bool setDiagonals( const Vector& diagonals ); - const Vectors::Vector< Index, Device, Index >& getDiagonals() const; + const Containers::Vector< Index, Device, Index >& getDiagonals() const; template< typename Real2, typename Device2, typename Index2 > bool setLike( const Multidiagonal< Real2, Device2, Index2 >& matrix ); @@ -189,9 +189,9 @@ class Multidiagonal : public Matrix< Real, Device, Index > const IndexType column, IndexType& index ) const; - Vectors::Vector< Real, Device, Index > values; + Containers::Vector< Real, Device, Index > values; - Vectors::Vector< Index, Device, Index > diagonalsShift; + Containers::Vector< Index, Device, Index > diagonalsShift; typedef MultidiagonalDeviceDependentCode< DeviceType > DeviceDependentCode; friend class MultidiagonalDeviceDependentCode< DeviceType >; diff --git a/src/TNL/Matrices/MultidiagonalMatrixSetter_impl.h b/src/TNL/Matrices/MultidiagonalMatrixSetter_impl.h index 234e797a7eba977ae4886512f05d116be6adcead..c126162caf8d128aa473cc1896ab75059a6d130d 100644 --- a/src/TNL/Matrices/MultidiagonalMatrixSetter_impl.h +++ b/src/TNL/Matrices/MultidiagonalMatrixSetter_impl.h @@ -28,7 +28,7 @@ setupMatrix( const MeshType& mesh, const Index dofs = mesh.template getEntitiesCount< typename MeshType::Cell >(); matrix.setDimensions( dofs, dofs ); CoordinatesType centerCell( stencilSize ); - Vectors::Vector< Index, Device, Index > diagonals; + Containers::Vector< Index, Device, Index > diagonals; if( ! diagonals.setSize( 3 ) ) return false; Index centerCellIndex = mesh.getCellIndex( CoordinatesType( stencilSize ) ); @@ -54,7 +54,7 @@ setupMatrix( const MeshType& mesh, const Index dofs = mesh.template getEntitiesCount< typename MeshType::Cell >(); matrix.setDimensions( dofs, dofs ); CoordinatesType centerCell( stencilSize ); - Vectors::Vector< Index, Device, Index > diagonals; + Containers::Vector< Index, Device, Index > diagonals; if( ! diagonals.setSize( 5 ) ) return false; Index centerCellIndex = mesh.getCellIndex( CoordinatesType( stencilSize, stencilSize ) ); @@ -82,7 +82,7 @@ setupMatrix( const MeshType& mesh, const Index dofs = mesh.template getEntitiesCount< typename MeshType::Cell >(); matrix.setDimensions( dofs, dofs ); CoordinatesType centerCell( stencilSize ); - Vectors::Vector< Index, Device, Index > diagonals; + Containers::Vector< Index, Device, Index > diagonals; if( ! diagonals.setSize( 7 ) ) return false; Index centerCellIndex = mesh.getCellIndex( CoordinatesType( stencilSize, stencilSize, stencilSize ) ); diff --git a/src/TNL/Matrices/Multidiagonal_impl.h b/src/TNL/Matrices/Multidiagonal_impl.h index 379a2a56c58a9bd5d8ec51ea16ae59f6228b5c80..e4d60504d8ba66f6f3fab1a818614d1432fe74b8 100644 --- a/src/TNL/Matrices/Multidiagonal_impl.h +++ b/src/TNL/Matrices/Multidiagonal_impl.h @@ -11,7 +11,7 @@ #pragma once #include <TNL/Matrices/Multidiagonal.h> -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #include <TNL/core/mfuncs.h> namespace TNL { @@ -32,7 +32,7 @@ template< typename Real, typename Index > String Multidiagonal< Real, Device, Index > :: getType() { - return String( "Multidiagonal< ") + + return String( "Matrices::Multidiagonal< ") + String( TNL::getType< Real >() ) + String( ", " ) + Device :: getDeviceType() + @@ -125,7 +125,7 @@ bool Multidiagonal< Real, Device, Index > :: setDiagonals( const Vector& diagon template< typename Real, typename Device, typename Index > -const Vectors::Vector< Index, Device, Index >& Multidiagonal< Real, Device, Index > :: getDiagonals() const +const Containers::Vector< Index, Device, Index >& Multidiagonal< Real, Device, Index > :: getDiagonals() const { return this->diagonalsShift; } @@ -533,7 +533,7 @@ template< typename Real, void Multidiagonal< Real, Device, Index >::getTransposition( const Multidiagonal< Real2, Device, Index2 >& matrix, const RealType& matrixMultiplicator ) { - Vectors::Vector< Index > auxDiagonals; + Containers::Vector< Index > auxDiagonals; auxDiagonals.setLike( matrix.getDiagonals() ); const Index numberOfDiagonals = matrix.getDiagonals().getSize(); for( Index i = 0; i < numberOfDiagonals; i++ ) diff --git a/src/TNL/Matrices/SlicedEllpack.h b/src/TNL/Matrices/SlicedEllpack.h index 6671359c7957d4d999a3de694515c63085d017da..a496f544ebad6d77f8420425a821e777c9f25612 100644 --- a/src/TNL/Matrices/SlicedEllpack.h +++ b/src/TNL/Matrices/SlicedEllpack.h @@ -22,7 +22,7 @@ #pragma once #include <TNL/Matrices/Sparse.h> -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> namespace TNL { namespace Matrices { @@ -189,7 +189,7 @@ class SlicedEllpack : public Sparse< Real, Device, Index > protected: - Vectors::Vector< Index, Device, Index > slicePointers, sliceCompressedRowsLengths; + Containers::Vector< Index, Device, Index > slicePointers, sliceCompressedRowsLengths; typedef SlicedEllpackDeviceDependentCode< DeviceType > DeviceDependentCode; friend class SlicedEllpackDeviceDependentCode< DeviceType >; diff --git a/src/TNL/Matrices/SlicedEllpack_impl.h b/src/TNL/Matrices/SlicedEllpack_impl.h index fb501cab0ffa45cc2756aa237ff1d4b407deb326..d2c0554e93b07b7a86d79dcd5b7da9eecf73646d 100644 --- a/src/TNL/Matrices/SlicedEllpack_impl.h +++ b/src/TNL/Matrices/SlicedEllpack_impl.h @@ -11,7 +11,7 @@ #pragma once #include <TNL/Matrices/SlicedEllpack.h> -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #include <TNL/core/mfuncs.h> namespace TNL { @@ -31,7 +31,7 @@ template< typename Real, int SliceSize > String SlicedEllpack< Real, Device, Index, SliceSize >::getType() { - return String( "SlicedEllpack< ") + + return String( "Matrices::SlicedEllpack< ") + String( TNL::getType< Real >() ) + String( ", " ) + Device :: getDeviceType() + diff --git a/src/TNL/Matrices/Sparse.h b/src/TNL/Matrices/Sparse.h index cdf4efac6d524e39f9c083ce8703c7c518badc59..27a021f038eab6553924792aec2739d080253960 100644 --- a/src/TNL/Matrices/Sparse.h +++ b/src/TNL/Matrices/Sparse.h @@ -28,7 +28,7 @@ class Sparse : public Matrix< Real, Device, Index > typedef Index IndexType; typedef typename Matrix< RealType, DeviceType, IndexType >::CompressedRowsLengthsVector CompressedRowsLengthsVector; typedef typename Matrix< RealType, DeviceType, IndexType >::ValuesVector ValuesVector; - typedef Vectors::Vector< IndexType, DeviceType, IndexType > ColumnIndexesVector; + typedef Containers::Vector< IndexType, DeviceType, IndexType > ColumnIndexesVector; typedef Matrix< Real, Device, Index > BaseType; typedef SparseRow< RealType, IndexType > MatrixRow; @@ -60,7 +60,7 @@ class Sparse : public Matrix< Real, Device, Index > bool allocateMatrixElements( const IndexType& numberOfMatrixElements ); - Vectors::Vector< Index, Device, Index > columnIndexes; + Containers::Vector< Index, Device, Index > columnIndexes; Index maxRowLength; }; diff --git a/src/TNL/Matrices/Tridiagonal.h b/src/TNL/Matrices/Tridiagonal.h index 19b173ff7b40b925dc091833faee50ae8b0ab58f..5457f12f18053bc869640966958d703c31f99a4c 100644 --- a/src/TNL/Matrices/Tridiagonal.h +++ b/src/TNL/Matrices/Tridiagonal.h @@ -11,7 +11,7 @@ #pragma once #include <TNL/Matrices/Matrix.h> -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #include <TNL/Matrices/TridiagonalRow.h> namespace TNL { @@ -181,7 +181,7 @@ class Tridiagonal : public Matrix< Real, Device, Index > IndexType getElementIndex( const IndexType row, const IndexType column ) const; - Vectors::Vector< RealType, DeviceType, IndexType > values; + Containers::Vector< RealType, DeviceType, IndexType > values; typedef TridiagonalDeviceDependentCode< DeviceType > DeviceDependentCode; friend class TridiagonalDeviceDependentCode< DeviceType >; diff --git a/src/TNL/Matrices/Tridiagonal_impl.h b/src/TNL/Matrices/Tridiagonal_impl.h index 911e6a863faad58f8bdd209c748f3d8253db3d33..e766d78b15e19e393f39949ed9cae37411896693 100644 --- a/src/TNL/Matrices/Tridiagonal_impl.h +++ b/src/TNL/Matrices/Tridiagonal_impl.h @@ -31,7 +31,7 @@ template< typename Real, typename Index > String Tridiagonal< Real, Device, Index >::getType() { - return String( "Tridiagonal< " ) + + return String( "Matrices::Tridiagonal< " ) + String( TNL::getType< RealType >() ) + ", " + String( Device :: getDeviceType() ) + ", " + String( TNL::getType< IndexType >() ) + " >"; diff --git a/src/TNL/Meshes/Grid.h b/src/TNL/Meshes/Grid.h index a82dfa44953cc67c8a9946f322d4996b038a342b..d5966b033e582c32633d03c4aa0a4a05ae870155 100644 --- a/src/TNL/Meshes/Grid.h +++ b/src/TNL/Meshes/Grid.h @@ -12,8 +12,8 @@ #include <TNL/Object.h> #include <TNL/Devices/Host.h> -#include <TNL/Vectors/StaticVector.h> -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/StaticVector.h> +#include <TNL/Containers/Vector.h> namespace TNL { namespace Meshes { diff --git a/src/TNL/Meshes/GridDetails/GnuplotWriter.h b/src/TNL/Meshes/GridDetails/GnuplotWriter.h index 4f62c2c5732fe41c22e62a10df512ec81877b9e0..6901b699babb5ab3e28d7fbd71cf7f051dad2a8f 100644 --- a/src/TNL/Meshes/GridDetails/GnuplotWriter.h +++ b/src/TNL/Meshes/GridDetails/GnuplotWriter.h @@ -11,7 +11,7 @@ #pragma once #include <ostream> -#include <TNL/Vectors/StaticVector.h> +#include <TNL/Containers/StaticVector.h> namespace TNL { namespace Meshes { @@ -29,21 +29,21 @@ class GnuplotWriter template< typename Real > static void write( std::ostream& str, - const Vectors::StaticVector< 1, Real >& d ) + const Containers::StaticVector< 1, Real >& d ) { str << d.x() << " "; } template< typename Real > static void write( std::ostream& str, - const Vectors::StaticVector< 2, Real >& d ) + const Containers::StaticVector< 2, Real >& d ) { str << d.x() << " " << d.y() << " "; } template< typename Real > static void write( std::ostream& str, - const Vectors::StaticVector< 3, Real >& d ) + const Containers::StaticVector< 3, Real >& d ) { str << d.x() << " " << d.y() << " " << d. z() << " "; } diff --git a/src/TNL/Meshes/GridDetails/Grid1D.h b/src/TNL/Meshes/GridDetails/Grid1D.h index 062079277eab7f38cd55bf58e58c83137a9b3d36..cc45515d9712fc3476d5972c75bf3c175738d7b8 100644 --- a/src/TNL/Meshes/GridDetails/Grid1D.h +++ b/src/TNL/Meshes/GridDetails/Grid1D.h @@ -31,8 +31,8 @@ class Grid< 1, Real, Device, Index > : public Object typedef Real RealType; typedef Device DeviceType; typedef Index IndexType; - typedef Vectors::StaticVector< 1, Real > VertexType; - typedef Vectors::StaticVector< 1, Index > CoordinatesType; + typedef Containers::StaticVector< 1, Real > VertexType; + typedef Containers::StaticVector< 1, Index > CoordinatesType; typedef Grid< 1, Real, Devices::Host, Index > HostType; typedef Grid< 1, Real, Devices::Cuda, Index > CudaType; typedef Grid< 1, Real, Device, Index > ThisType; diff --git a/src/TNL/Meshes/GridDetails/Grid1D_impl.h b/src/TNL/Meshes/GridDetails/Grid1D_impl.h index 82632468835af815cee85f876060a7b2ad519d33..e2acdfa90a4489c94705e0db235c61cd2db5ce04 100644 --- a/src/TNL/Meshes/GridDetails/Grid1D_impl.h +++ b/src/TNL/Meshes/GridDetails/Grid1D_impl.h @@ -37,7 +37,7 @@ template< typename Real, typename Index > String Grid< 1, Real, Device, Index >::getType() { - return String( "Grid< " ) + + return String( "Meshes::Grid< " ) + String( getMeshDimensions() ) + ", " + String( TNL::getType< RealType >() ) + ", " + String( Device::getDeviceType() ) + ", " + diff --git a/src/TNL/Meshes/GridDetails/Grid2D.h b/src/TNL/Meshes/GridDetails/Grid2D.h index a7b2f6ea7045a748563d563a011de6bdd956bcbf..f146652d1933d96a74093f4034a63ef83373d2b3 100644 --- a/src/TNL/Meshes/GridDetails/Grid2D.h +++ b/src/TNL/Meshes/GridDetails/Grid2D.h @@ -28,8 +28,8 @@ class Grid< 2, Real, Device, Index > : public Object typedef Real RealType; typedef Device DeviceType; typedef Index IndexType; - typedef Vectors::StaticVector< 2, Real > VertexType; - typedef Vectors::StaticVector< 2, Index > CoordinatesType; + typedef Containers::StaticVector< 2, Real > VertexType; + typedef Containers::StaticVector< 2, Index > CoordinatesType; typedef Grid< 2, Real, Devices::Host, Index > HostType; typedef Grid< 2, Real, Devices::Cuda, Index > CudaType; typedef Grid< 2, Real, Device, Index > ThisType; diff --git a/src/TNL/Meshes/GridDetails/Grid2D_impl.h b/src/TNL/Meshes/GridDetails/Grid2D_impl.h index dc654fc25f9a0acff0b0e713b652a60ae6183b28..021fce3e29d15a93a9c296f1f56c0f9c73a6298f 100644 --- a/src/TNL/Meshes/GridDetails/Grid2D_impl.h +++ b/src/TNL/Meshes/GridDetails/Grid2D_impl.h @@ -38,7 +38,7 @@ template< typename Real, typename Index > String Grid< 2, Real, Device, Index > :: getType() { - return String( "Grid< " ) + + return String( "Meshes::Grid< " ) + String( getMeshDimensions() ) + ", " + String( TNL::getType< RealType >() ) + ", " + String( Device :: getDeviceType() ) + ", " + diff --git a/src/TNL/Meshes/GridDetails/Grid3D.h b/src/TNL/Meshes/GridDetails/Grid3D.h index 4420424ed7395045604eb4172ac84de21e4f7b76..de26291a62a282c5e86efe81be502b8eed6fb903 100644 --- a/src/TNL/Meshes/GridDetails/Grid3D.h +++ b/src/TNL/Meshes/GridDetails/Grid3D.h @@ -28,8 +28,8 @@ class Grid< 3, Real, Device, Index > : public Object typedef Real RealType; typedef Device DeviceType; typedef Index IndexType; - typedef Vectors::StaticVector< 3, Real > VertexType; - typedef Vectors::StaticVector< 3, Index > CoordinatesType; + typedef Containers::StaticVector< 3, Real > VertexType; + typedef Containers::StaticVector< 3, Index > CoordinatesType; typedef Grid< 3, Real, Devices::Host, Index > HostType; typedef Grid< 3, Real, Devices::Cuda, Index > CudaType; typedef Grid< 3, Real, Device, Index > ThisType; diff --git a/src/TNL/Meshes/GridDetails/Grid3D_impl.h b/src/TNL/Meshes/GridDetails/Grid3D_impl.h index a3ab3a1680f67d434db1fc334a257fe5187e1bfd..a875d7530020426f867e2cc7038d5281b7beafcf 100644 --- a/src/TNL/Meshes/GridDetails/Grid3D_impl.h +++ b/src/TNL/Meshes/GridDetails/Grid3D_impl.h @@ -44,7 +44,7 @@ template< typename Real, typename Index > String Grid< 3, Real, Device, Index > :: getType() { - return String( "Grid< " ) + + return String( "Meshes::Grid< " ) + String( meshDimensions ) + ", " + String( TNL::getType< RealType >() ) + ", " + String( Device :: getDeviceType() ) + ", " + diff --git a/src/TNL/Meshes/GridEntity.h b/src/TNL/Meshes/GridEntity.h index 14fc95c331f98420037f256952963a4a13fbc494..9d926f57c4a4be7498a7b7213c4754410453d888 100644 --- a/src/TNL/Meshes/GridEntity.h +++ b/src/TNL/Meshes/GridEntity.h @@ -59,8 +59,8 @@ class GridEntity< Meshes::Grid< Dimensions, Real, Device, Index >, EntityDimensi constexpr static int getMeshDimensions() { return meshDimensions; }; - typedef Vectors::StaticVector< meshDimensions, IndexType > EntityOrientationType; - typedef Vectors::StaticVector< meshDimensions, IndexType > EntityBasisType; + typedef Containers::StaticVector< meshDimensions, IndexType > EntityOrientationType; + typedef Containers::StaticVector< meshDimensions, IndexType > EntityBasisType; typedef GridEntity< GridType, entityDimensions, Config > ThisType; typedef typename GridType::VertexType VertexType; @@ -187,8 +187,8 @@ class GridEntity< Meshes::Grid< Dimensions, Real, Device, Index >, Dimensions, C constexpr static int getMeshDimensions() { return meshDimensions; }; - typedef Vectors::StaticVector< meshDimensions, IndexType > EntityOrientationType; - typedef Vectors::StaticVector< meshDimensions, IndexType > EntityBasisType; + typedef Containers::StaticVector< meshDimensions, IndexType > EntityOrientationType; + typedef Containers::StaticVector< meshDimensions, IndexType > EntityBasisType; typedef GridEntity< GridType, entityDimensions, Config > ThisType; typedef NeighbourGridEntitiesStorage< ThisType > NeighbourGridEntitiesStorageType; @@ -313,8 +313,8 @@ class GridEntity< Meshes::Grid< Dimensions, Real, Device, Index >, 0, Config > constexpr static int getMeshDimensions() { return meshDimensions; }; - typedef Vectors::StaticVector< meshDimensions, IndexType > EntityOrientationType; - typedef Vectors::StaticVector< meshDimensions, IndexType > EntityBasisType; + typedef Containers::StaticVector< meshDimensions, IndexType > EntityOrientationType; + typedef Containers::StaticVector< meshDimensions, IndexType > EntityBasisType; typedef GridEntity< GridType, entityDimensions, Config > ThisType; typedef NeighbourGridEntitiesStorage< ThisType > NeighbourGridEntitiesStorageType; diff --git a/src/TNL/Meshes/MeshBuilder.h b/src/TNL/Meshes/MeshBuilder.h index 45700b207d07b7ade8c732646ea4443a16458f0e..b576ffe62a3b67df623c336af3cdb82a76e35e10 100644 --- a/src/TNL/Meshes/MeshBuilder.h +++ b/src/TNL/Meshes/MeshBuilder.h @@ -110,7 +110,7 @@ class MeshBuilder PointArrayType points; CellSeedArrayType cellSeeds; - Arrays::Array< bool, Devices::Host, GlobalIndexType > pointsSet; + Containers::Array< bool, Devices::Host, GlobalIndexType > pointsSet; }; } // namespace Meshes diff --git a/src/TNL/Meshes/MeshDetails/Mesh_impl.h b/src/TNL/Meshes/MeshDetails/Mesh_impl.h index c43d18fba5a9a4c9548a3b164445ec9ba87b3b13..cff4831ee7b50424de181f1a2d38edd07801aeaf 100644 --- a/src/TNL/Meshes/MeshDetails/Mesh_impl.h +++ b/src/TNL/Meshes/MeshDetails/Mesh_impl.h @@ -20,7 +20,7 @@ String Mesh< MeshConfig >:: getType() { - return String( "Mesh< ") + MeshConfig::getType() + " >"; + return String( "Meshes::Mesh< ") + MeshConfig::getType() + " >"; } template< typename MeshConfig > diff --git a/src/TNL/Meshes/MeshDetails/initializer/MeshInitializer.h b/src/TNL/Meshes/MeshDetails/initializer/MeshInitializer.h index 5a987ef8c63801203b208728666cd62fc6f3da1a..c80844f758d5a7d9366bb244457badadfb223784 100644 --- a/src/TNL/Meshes/MeshDetails/initializer/MeshInitializer.h +++ b/src/TNL/Meshes/MeshDetails/initializer/MeshInitializer.h @@ -188,7 +188,7 @@ class MeshInitializerLayer< MeshConfig, typedef MeshInitializer< MeshConfig > InitializerType; typedef MeshEntityInitializer< MeshConfig, EntityTopology > EntityInitializerType; typedef MeshEntityInitializer< MeshConfig, EntityTopology > CellInitializerType; - typedef Arrays::Array< CellInitializerType, Devices::Host, GlobalIndexType > CellInitializerContainerType; + typedef Containers::Array< CellInitializerType, Devices::Host, GlobalIndexType > CellInitializerContainerType; typedef typename MeshTraitsType::CellSeedArrayType CellSeedArrayType; typedef typename MeshTraitsType::LocalIndexType LocalIndexType; typedef typename MeshTraitsType::PointArrayType PointArrayType; @@ -294,7 +294,7 @@ class MeshInitializerLayer< MeshConfig, typedef MeshInitializer< MeshConfig > InitializerType; typedef MeshEntityInitializer< MeshConfig, EntityTopology > EntityInitializerType; typedef MeshEntityInitializer< MeshConfig, EntityTopology > CellInitializerType; - typedef Arrays::Array< CellInitializerType, Devices::Host, GlobalIndexType > CellInitializerContainerType; + typedef Containers::Array< CellInitializerType, Devices::Host, GlobalIndexType > CellInitializerContainerType; typedef typename EntityTraitsType::SeedArrayType EntitySeedArrayType; typedef typename MeshTraitsType::CellSeedArrayType CellSeedArrayType; typedef typename MeshTraitsType::LocalIndexType LocalIndexType; @@ -406,7 +406,7 @@ class MeshInitializerLayer< MeshConfig, typedef MeshInitializer< MeshConfig > InitializerType; typedef MeshEntityInitializer< MeshConfig, CellTopology > CellInitializerType; typedef MeshEntityInitializer< MeshConfig, EntityTopology > EntityInitializerType; - typedef Arrays::Array< EntityInitializerType, Devices::Host, GlobalIndexType > EntityInitializerContainerType; + typedef Containers::Array< EntityInitializerType, Devices::Host, GlobalIndexType > EntityInitializerContainerType; typedef typename MeshTraitsType::CellSeedArrayType CellSeedArrayType; typedef typename MeshTraitsType::LocalIndexType LocalIndexType; typedef typename MeshTraitsType::PointArrayType PointArrayType; @@ -552,7 +552,7 @@ class MeshInitializerLayer< MeshConfig, typedef MeshInitializer< MeshConfig > InitializerType; typedef MeshEntityInitializer< MeshConfig, CellTopology > CellInitializerType; typedef MeshEntityInitializer< MeshConfig, EntityTopology > VertexInitializerType; - typedef Arrays::Array< VertexInitializerType, Devices::Host, GlobalIndexType > VertexInitializerContainerType; + typedef Containers::Array< VertexInitializerType, Devices::Host, GlobalIndexType > VertexInitializerContainerType; typedef typename MeshTraits< MeshConfig >::CellSeedArrayType CellSeedArrayType; typedef typename MeshTraits< MeshConfig >::LocalIndexType LocalIndexType; typedef typename MeshTraits< MeshConfig >::PointArrayType PointArrayType; diff --git a/src/TNL/Meshes/MeshDetails/traits/MeshEntityTraits.h b/src/TNL/Meshes/MeshDetails/traits/MeshEntityTraits.h index 36da8394c2e5b7ab85a33ec5a35917f1f7d516ed..0ca53a18bf6a0139dd7a445ae3ac1e2b6417c239 100644 --- a/src/TNL/Meshes/MeshDetails/traits/MeshEntityTraits.h +++ b/src/TNL/Meshes/MeshDetails/traits/MeshEntityTraits.h @@ -10,10 +10,10 @@ #pragma once -#include <TNL/Vectors/StaticVector.h> -#include <TNL/Arrays/Array.h> -#include <TNL/Arrays/SharedArray.h> -#include <TNL/Arrays/ConstSharedArray.h> +#include <TNL/Containers/StaticVector.h> +#include <TNL/Containers/Array.h> +#include <TNL/Containers/SharedArray.h> +#include <TNL/Containers/ConstSharedArray.h> #include <TNL/core/tnlIndexedSet.h> #include <TNL/Meshes/Topologies/MeshEntityTopology.h> #include <TNL/Meshes/MeshConfigBase.h> @@ -73,14 +73,14 @@ class MeshEntityTraits typedef MeshEntitySeedKey< MeshConfig, EntityTopology > Key; - typedef Arrays::Array< EntityType, Devices::Host, GlobalIndexType > StorageArrayType; - typedef Arrays::SharedArray< EntityType, Devices::Host, GlobalIndexType > AccessArrayType; + typedef Containers::Array< EntityType, Devices::Host, GlobalIndexType > StorageArrayType; + typedef Containers::SharedArray< EntityType, Devices::Host, GlobalIndexType > AccessArrayType; typedef tnlIndexedSet< EntityType, GlobalIndexType, Key > UniqueContainerType; typedef tnlIndexedSet< SeedType, GlobalIndexType, Key > SeedIndexedSetType; - typedef Arrays::Array< SeedType, Devices::Host, GlobalIndexType > SeedArrayType; - typedef Arrays::Array< ReferenceOrientationType, Devices::Host, GlobalIndexType > ReferenceOrientationArrayType; + typedef Containers::Array< SeedType, Devices::Host, GlobalIndexType > SeedArrayType; + typedef Containers::Array< ReferenceOrientationType, Devices::Host, GlobalIndexType > ReferenceOrientationArrayType; - typedef Arrays::tnlConstSharedArray< EntityType, Devices::Host, GlobalIndexType > SharedArrayType; + typedef Containers::tnlConstSharedArray< EntityType, Devices::Host, GlobalIndexType > SharedArrayType; }; } // namespace Meshes diff --git a/src/TNL/Meshes/MeshDetails/traits/MeshSubentityTraits.h b/src/TNL/Meshes/MeshDetails/traits/MeshSubentityTraits.h index 7569c8e0589214cb14f383627c486d9718489d00..9ff9103bf4a6cf02920b09e0cbb2067f741bd080 100644 --- a/src/TNL/Meshes/MeshDetails/traits/MeshSubentityTraits.h +++ b/src/TNL/Meshes/MeshDetails/traits/MeshSubentityTraits.h @@ -10,8 +10,8 @@ #pragma once -#include <TNL/Arrays/StaticArray.h> -#include <TNL/Arrays/SharedArray.h> +#include <TNL/Containers/StaticArray.h> +#include <TNL/Containers/SharedArray.h> #include <TNL/Meshes/MeshEntity.h> #include <TNL/Meshes/MeshConfigBase.h> #include <TNL/Meshes/Topologies/MeshEntityTopology.h> @@ -41,15 +41,15 @@ class MeshSubentityTraits static const int count = Subtopology::count; - typedef Arrays::StaticArray< count, GlobalIndexType > StorageArrayType; - typedef Arrays::SharedArray< GlobalIndexType, + typedef Containers::StaticArray< count, GlobalIndexType > StorageArrayType; + typedef Containers::SharedArray< GlobalIndexType, Devices::Host, LocalIndexType > AccessArrayType; - typedef Arrays::StaticArray< count, GlobalIndexType > IdArrayType; - typedef Arrays::StaticArray< count, SubentityType > SubentityContainerType; - typedef Arrays::StaticArray< count, Seed > SeedArrayType; - typedef Arrays::StaticArray< count, Orientation > OrientationArrayType; - typedef Arrays::StaticArray< count, LocalIndexType > IdPermutationArrayType; + typedef Containers::StaticArray< count, GlobalIndexType > IdArrayType; + typedef Containers::StaticArray< count, SubentityType > SubentityContainerType; + typedef Containers::StaticArray< count, Seed > SeedArrayType; + typedef Containers::StaticArray< count, Orientation > OrientationArrayType; + typedef Containers::StaticArray< count, LocalIndexType > IdPermutationArrayType; template< LocalIndexType subentityIndex, LocalIndexType subentityVertexIndex > diff --git a/src/TNL/Meshes/MeshDetails/traits/MeshSuperentityTraits.h b/src/TNL/Meshes/MeshDetails/traits/MeshSuperentityTraits.h index d95645794f539dffc8c28716e62a10d42af9759e..6b396e41e3a80c0bd84fa889f75ccc7057a7a074 100644 --- a/src/TNL/Meshes/MeshDetails/traits/MeshSuperentityTraits.h +++ b/src/TNL/Meshes/MeshDetails/traits/MeshSuperentityTraits.h @@ -10,8 +10,8 @@ #pragma once -#include <TNL/Arrays/Array.h> -#include <TNL/Arrays/ConstSharedArray.h> +#include <TNL/Containers/Array.h> +#include <TNL/Containers/ConstSharedArray.h> #include <TNL/List.h> #include <TNL/Meshes/MeshEntity.h> #include <TNL/Meshes/MeshConfigBase.h> @@ -45,7 +45,7 @@ class MeshSuperentityTraits /**** * Type of container for storing of the superentities indecis. */ - typedef Arrays::Array< GlobalIndexType, Devices::Host, LocalIndexType > StorageArrayType; + typedef Containers::Array< GlobalIndexType, Devices::Host, LocalIndexType > StorageArrayType; typedef tnlEllpackIndexMultimap< GlobalIndexType, Devices::Host > StorageNetworkType; typedef MeshSuperentityAccessor< typename StorageNetworkType::ValuesAccessorType > SuperentityAccessorType; @@ -55,7 +55,7 @@ class MeshSuperentityTraits * method. We introduce it because of the compatibility with the subentities * which are usually stored in static array. */ - typedef Arrays::SharedArray< GlobalIndexType, Devices::Host, LocalIndexType > AccessArrayType; + typedef Containers::SharedArray< GlobalIndexType, Devices::Host, LocalIndexType > AccessArrayType; /**** * This is used by the mesh initializer. diff --git a/src/TNL/Meshes/MeshDetails/traits/MeshTraits.h b/src/TNL/Meshes/MeshDetails/traits/MeshTraits.h index ed2e5783ad265ee9793f2c04afdc0e4fedbb1c1f..8bfca4c14c22ba0ee99ad6a0a80a48bde7446303 100644 --- a/src/TNL/Meshes/MeshDetails/traits/MeshTraits.h +++ b/src/TNL/Meshes/MeshDetails/traits/MeshTraits.h @@ -10,10 +10,10 @@ #pragma once -#include <TNL/Vectors/StaticVector.h> -#include <TNL/Arrays/Array.h> -#include <TNL/Arrays/SharedArray.h> -#include <TNL/Arrays/ConstSharedArray.h> +#include <TNL/Containers/StaticVector.h> +#include <TNL/Containers/Array.h> +#include <TNL/Containers/SharedArray.h> +#include <TNL/Containers/ConstSharedArray.h> #include <TNL/Meshes/MeshDimensionsTag.h> namespace TNL { @@ -42,14 +42,14 @@ class MeshTraits typedef typename MeshConfig::CellTopology CellTopology; typedef MeshEntity< MeshConfig, CellTopology > CellType; typedef MeshEntity< MeshConfig, MeshVertexTopology > VertexType; - typedef Vectors::StaticVector< worldDimensions, typename MeshConfig::RealType > PointType; + typedef Containers::StaticVector< worldDimensions, typename MeshConfig::RealType > PointType; typedef MeshEntitySeed< MeshConfig, CellTopology > CellSeedType; - typedef Arrays::Array< PointType, Devices::Host, GlobalIndexType > PointArrayType; - typedef Arrays::Array< CellSeedType, Devices::Host, GlobalIndexType > CellSeedArrayType; - typedef Arrays::Array< GlobalIndexType, Devices::Host, GlobalIndexType > GlobalIdArrayType; - typedef Arrays::tnlConstSharedArray< GlobalIndexType, Devices::Host, LocalIndexType > IdArrayAccessorType; - typedef Arrays::tnlConstSharedArray< LocalIndexType, Devices::Host, LocalIndexType > IdPermutationArrayAccessorType; + typedef Containers::Array< PointType, Devices::Host, GlobalIndexType > PointArrayType; + typedef Containers::Array< CellSeedType, Devices::Host, GlobalIndexType > CellSeedArrayType; + typedef Containers::Array< GlobalIndexType, Devices::Host, GlobalIndexType > GlobalIdArrayType; + typedef Containers::tnlConstSharedArray< GlobalIndexType, Devices::Host, LocalIndexType > IdArrayAccessorType; + typedef Containers::tnlConstSharedArray< LocalIndexType, Devices::Host, LocalIndexType > IdPermutationArrayAccessorType; template< int Dimensions > using EntityTraits = MeshEntityTraits< MeshConfig, Dimensions >; diff --git a/src/TNL/Object.cpp b/src/TNL/Object.cpp index 9a15743a94c92e8113386e7a98cd0ab1d9a0dc42..caecb03ed5550ec98f4c6e39f6ce6b23f8e588fb 100644 --- a/src/TNL/Object.cpp +++ b/src/TNL/Object.cpp @@ -21,6 +21,11 @@ namespace TNL { const char magic_number[] = "TNLMN"; +Object::Object() +: deprecatedReadMode( false ) +{ +} + String Object :: getType() { return String( "Object" ); @@ -61,7 +66,10 @@ bool Object :: load( File& file ) if( objectType != this->getSerializationTypeVirtual() ) { std::cerr << "Given file contains instance of " << objectType << " but " << getSerializationTypeVirtual() << " is expected." << std::endl; - return false; + if( this->deprecatedReadMode ) + std::cerr << "Loading is forced by the deprecated read mode..." << std::endl; + else + return false; } return true; } @@ -125,6 +133,11 @@ bool Object :: boundLoad( const String& fileName ) return true; } +void Object::setDeprecatedReadMode() +{ + this->deprecatedReadMode = true; +} + bool getObjectType( File& file, String& type ) { diff --git a/src/TNL/Object.h b/src/TNL/Object.h index 7cbe2394b39d00088b7c65b0d8941a6b95fde821..d8808ca40f8b9f1a3564e89993648c96b2f8a5d5 100644 --- a/src/TNL/Object.h +++ b/src/TNL/Object.h @@ -34,47 +34,56 @@ class Object { public: - //! Basic constructor - __cuda_callable__ - Object() {}; + //! Basic constructor + __cuda_callable__ + Object(); - /**** - * Type getter. This returns the type in C++ style - for example the returned value - * may look as follows: "Vector< double, Devices::Cuda >". - */ - static String getType(); + /**** + * Type getter. This returns the type in C++ style - for example the returned value + * may look as follows: "Vector< double, Devices::Cuda >". + */ - virtual String getTypeVirtual() const; + static String getType(); - /**** - * This is used for load and save methods. - * Each object is saved as if it was stored on Devices::Host. So even Vector< double, Devices::Cuda > - * is saved as Vector< double, Devices::Host >. - */ - static String getSerializationType(); + virtual String getTypeVirtual() const; - virtual String getSerializationTypeVirtual() const; + /**** + * This is used for load and save methods. + * Each object is saved as if it was stored on Devices::Host. So even Vector< double, Devices::Cuda > + * is saved as Vector< double, Devices::Host >. + */ + static String getSerializationType(); - //! Method for saving the object to a file as a binary data - virtual bool save( File& file ) const; + virtual String getSerializationTypeVirtual() const; - //! Method for restoring the object from a file - virtual bool load( File& file ); - - //! Method for restoring the object from a file - virtual bool boundLoad( File& file ); + //! Method for saving the object to a file as a binary data + virtual bool save( File& file ) const; - bool save( const String& fileName ) const; + //! Method for restoring the object from a file + virtual bool load( File& file ); - bool load( const String& fileName ); - - bool boundLoad( const String& fileName ); + //! Method for restoring the object from a file + virtual bool boundLoad( File& file ); - //! Destructor - // FIXME: __cuda_callable__ would have to be added to every overriding destructor, - // even if the object's constructor is not __cuda_callable__ -// __cuda_callable__ - virtual ~Object(){}; + bool save( const String& fileName ) const; + + bool load( const String& fileName ); + + bool boundLoad( const String& fileName ); + + void setDeprecatedReadMode(); + + //! Destructor + // FIXME: __cuda_callable__ would have to be added to every overriding destructor, + // even if the object's constructor is not __cuda_callable__ + // __cuda_callable__ + virtual ~Object(){}; + + + protected: + + // This allows to read old TNL files, it will be removed. + bool deprecatedReadMode; }; @@ -85,4 +94,4 @@ bool getObjectType( const String& file_name, String& type ); bool parseObjectType( const String& objectType, List< String >& parsedObjectType ); -} // namespace TNL \ No newline at end of file +} // namespace TNL diff --git a/src/TNL/Operators/DirichletBoundaryConditions.h b/src/TNL/Operators/DirichletBoundaryConditions.h index a021c8109b6b74dbe37d7da25b95306b1d75cbc9..53388c0f0c457d514e2ddd57e12b70604616c6b1 100644 --- a/src/TNL/Operators/DirichletBoundaryConditions.h +++ b/src/TNL/Operators/DirichletBoundaryConditions.h @@ -38,7 +38,7 @@ class DirichletBoundaryConditions typedef typename MeshType::DeviceType DeviceType; typedef Index IndexType; - typedef Vectors::Vector< RealType, DeviceType, IndexType> DofVectorType; + typedef Containers::Vector< RealType, DeviceType, IndexType> DofVectorType; typedef typename MeshType::VertexType VertexType; static constexpr int getMeshDimensions() { return MeshType::meshDimensions; } diff --git a/src/TNL/Operators/NeumannBoundaryConditions.h b/src/TNL/Operators/NeumannBoundaryConditions.h index dcee24a61763cb786740d6dd51ca12da43da851a..230f106c7435c45d655556450498198369024d38 100644 --- a/src/TNL/Operators/NeumannBoundaryConditions.h +++ b/src/TNL/Operators/NeumannBoundaryConditions.h @@ -78,8 +78,8 @@ class NeumannBoundaryConditions< Meshes::Grid< 1, MeshReal, Device, MeshIndex >, typedef Index IndexType; typedef Function FunctionType; - typedef Vectors::Vector< RealType, DeviceType, IndexType> DofVectorType; - typedef Vectors::StaticVector< 1, RealType > VertexType; + typedef Containers::Vector< RealType, DeviceType, IndexType> DofVectorType; + typedef Containers::StaticVector< 1, RealType > VertexType; typedef typename MeshType::CoordinatesType CoordinatesType; typedef NeumannBoundaryConditions< MeshType, Function, Real, Index > ThisType; typedef NeumannBoundaryConditionsBase< Function > BaseType; @@ -171,8 +171,8 @@ class NeumannBoundaryConditions< Meshes::Grid< 2, MeshReal, Device, MeshIndex >, typedef Index IndexType; typedef Function FunctionType; - typedef Vectors::Vector< RealType, DeviceType, IndexType> DofVectorType; - typedef Vectors::StaticVector< 2, RealType > VertexType; + typedef Containers::Vector< RealType, DeviceType, IndexType> DofVectorType; + typedef Containers::StaticVector< 2, RealType > VertexType; typedef typename MeshType::CoordinatesType CoordinatesType; typedef NeumannBoundaryConditions< MeshType, Function, Real, Index > ThisType; typedef NeumannBoundaryConditionsBase< Function > BaseType; @@ -290,8 +290,8 @@ class NeumannBoundaryConditions< Meshes::Grid< 3, MeshReal, Device, MeshIndex >, typedef Index IndexType; typedef Function FunctionType; - typedef Vectors::Vector< RealType, DeviceType, IndexType> DofVectorType; - typedef Vectors::StaticVector< 3, RealType > VertexType; + typedef Containers::Vector< RealType, DeviceType, IndexType> DofVectorType; + typedef Containers::StaticVector< 3, RealType > VertexType; typedef typename MeshType::CoordinatesType CoordinatesType; typedef NeumannBoundaryConditions< MeshType, Function, Real, Index > ThisType; typedef NeumannBoundaryConditionsBase< Function > BaseType; diff --git a/src/TNL/Operators/diffusion/FiniteVolumeNonlinearOperator.h b/src/TNL/Operators/diffusion/FiniteVolumeNonlinearOperator.h index 89aa80e0fbb7a45e55a9c86f88a6103ca7d2d450..6daa0a2de9e8c33622c9525af9c13ffc52d38b54 100644 --- a/src/TNL/Operators/diffusion/FiniteVolumeNonlinearOperator.h +++ b/src/TNL/Operators/diffusion/FiniteVolumeNonlinearOperator.h @@ -9,7 +9,7 @@ #pragma once -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #include <TNL/Meshes/Grid.h> namespace TNL { diff --git a/src/TNL/Operators/diffusion/LinearDiffusion.h b/src/TNL/Operators/diffusion/LinearDiffusion.h index fc3bc7597cfca3afc346fd124f7adf47640a832c..dd38c170daa48b4473c6e08a7a8e775fdc89578d 100644 --- a/src/TNL/Operators/diffusion/LinearDiffusion.h +++ b/src/TNL/Operators/diffusion/LinearDiffusion.h @@ -10,7 +10,7 @@ #pragma once -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #include <TNL/Functions/MeshFunction.h> #include <TNL/Meshes/Grid.h> #include <TNL/Operators/Operator.h> diff --git a/src/TNL/Operators/diffusion/OneSidedNonlinearDiffusion.h b/src/TNL/Operators/diffusion/OneSidedNonlinearDiffusion.h index db6dfdfed98405d05d76b4e7449c551cb8288ad0..652bf8ba1801f0ea17f0c0881bbe277d08e1f546 100644 --- a/src/TNL/Operators/diffusion/OneSidedNonlinearDiffusion.h +++ b/src/TNL/Operators/diffusion/OneSidedNonlinearDiffusion.h @@ -11,7 +11,7 @@ #pragma once -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #include <TNL/Meshes/Grid.h> #include <TNL/Operators/diffusion/ExactNonlinearDiffusion.h> diff --git a/src/TNL/Operators/euler/fvm/LaxFridrichs.h b/src/TNL/Operators/euler/fvm/LaxFridrichs.h index 0a03d43ed32cfdbc7ab1aea27b04cba02cc6d453..9aa009ea1396322065a3032b00871c84f3b68347 100644 --- a/src/TNL/Operators/euler/fvm/LaxFridrichs.h +++ b/src/TNL/Operators/euler/fvm/LaxFridrichs.h @@ -10,7 +10,7 @@ #pragma once -#include <TNL/Vectors/SharedVector.h> +#include <TNL/Containers/SharedVector.h> #include <TNL/Meshes/Grid.h> #include <TNL/Meshes/tnlIdenticalGridGeometry.h> #include <TNL/Operators/gradient/tnlCentralFDMGradient.h> diff --git a/src/TNL/Operators/geometric/ExactGradientNorm.h b/src/TNL/Operators/geometric/ExactGradientNorm.h index 7926966d7f58cb5ea961fbec64b40cf0e1b1331f..0de3d0c6488686fbcc80273e2b8d91284df55d77 100644 --- a/src/TNL/Operators/geometric/ExactGradientNorm.h +++ b/src/TNL/Operators/geometric/ExactGradientNorm.h @@ -10,8 +10,8 @@ #pragma once -#include <TNL/Vectors/Vector.h> -#include <TNL/Vectors/SharedVector.h> +#include <TNL/Containers/Vector.h> +#include <TNL/Containers/SharedVector.h> #include <TNL/Meshes/Grid.h> #include <TNL/Functions/Domain.h> diff --git a/src/TNL/Operators/operator-Q/tnlFiniteVolumeOperatorQ.h b/src/TNL/Operators/operator-Q/tnlFiniteVolumeOperatorQ.h index 8d370fbcc432ab4f25e4660058cf0f03022a2f1b..5cf59f1766f8accd727b173dd1dc134bd166f06b 100644 --- a/src/TNL/Operators/operator-Q/tnlFiniteVolumeOperatorQ.h +++ b/src/TNL/Operators/operator-Q/tnlFiniteVolumeOperatorQ.h @@ -10,8 +10,8 @@ #pragma once -#include <TNL/Vectors/Vector.h> -#include <TNL/Vectors/SharedVector.h> +#include <TNL/Containers/Vector.h> +#include <TNL/Containers/SharedVector.h> #include <TNL/Meshes/Grid.h> namespace TNL { diff --git a/src/TNL/Operators/operator-Q/tnlOneSideDiffOperatorQ.h b/src/TNL/Operators/operator-Q/tnlOneSideDiffOperatorQ.h index 33ecddf0fbc357a049cbc8ddc4824deb4a92f4c0..29b2ac29091f8490adba7dc91c9b6075aea026b3 100644 --- a/src/TNL/Operators/operator-Q/tnlOneSideDiffOperatorQ.h +++ b/src/TNL/Operators/operator-Q/tnlOneSideDiffOperatorQ.h @@ -10,8 +10,8 @@ #pragma once -#include <TNL/Vectors/Vector.h> -#include <TNL/Vectors/SharedVector.h> +#include <TNL/Containers/Vector.h> +#include <TNL/Containers/SharedVector.h> #include <TNL/Meshes/Grid.h> namespace TNL { diff --git a/src/TNL/Operators/operator-curvature/ExactOperatorCurvature.h b/src/TNL/Operators/operator-curvature/ExactOperatorCurvature.h index 748909193766793942c7caa0bbfc7f6f5d6df8b9..68cf12eda4ade12447205891675ec6a86b314b6c 100644 --- a/src/TNL/Operators/operator-curvature/ExactOperatorCurvature.h +++ b/src/TNL/Operators/operator-curvature/ExactOperatorCurvature.h @@ -10,8 +10,8 @@ #pragma once -#include <TNL/Vectors/Vector.h> -#include <TNL/Vectors/SharedVector.h> +#include <TNL/Containers/Vector.h> +#include <TNL/Containers/SharedVector.h> #include <TNL/Meshes/Grid.h> #include <TNL/Functions/tnlFunction.h> diff --git a/src/TNL/Problems/PDEProblem.h b/src/TNL/Problems/PDEProblem.h index f49631dd450298214395dc5cdfdd0be5db899fdd..5a9863ce29d491fb0910b3c0ff6518f9ade520b3 100644 --- a/src/TNL/Problems/PDEProblem.h +++ b/src/TNL/Problems/PDEProblem.h @@ -31,11 +31,11 @@ class PDEProblem : public Problem< Real, Device, Index > typedef Mesh MeshType; typedef SharedPointer< MeshType, DeviceType > MeshPointer; - typedef Vectors::Vector< RealType, DeviceType, IndexType> DofVectorType; + typedef Containers::Vector< RealType, DeviceType, IndexType> DofVectorType; typedef SharedPointer< DofVectorType, DeviceType > DofVectorPointer; typedef Matrices::CSR< RealType, DeviceType, IndexType > MatrixType; typedef SharedPointer< MatrixType, DeviceType > MatrixPointer; - typedef Vectors::Vector< RealType, DeviceType, IndexType > MeshDependentDataType; + typedef Containers::Vector< RealType, DeviceType, IndexType > MeshDependentDataType; /**** * This means that the time stepper will be set from the command line arguments. diff --git a/src/TNL/Problems/cfd/navier-stokes/NavierStokesSolver.h b/src/TNL/Problems/cfd/navier-stokes/NavierStokesSolver.h index 6badfbefa17ad85e9e47800b0fc252f3f4980062..634b1615e21b41f490551ee706fe355225e5730e 100644 --- a/src/TNL/Problems/cfd/navier-stokes/NavierStokesSolver.h +++ b/src/TNL/Problems/cfd/navier-stokes/NavierStokesSolver.h @@ -11,7 +11,7 @@ #pragma once #include <TNL/String.h> -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> namespace TNL { diff --git a/src/TNL/Solvers/DummyProblem.h b/src/TNL/Solvers/DummyProblem.h index 2cb54bdcf7287d728104bf2634bc6e7db1d168c0..6c036bb2dfccc7fd95654c0c577cd96368136df0 100644 --- a/src/TNL/Solvers/DummyProblem.h +++ b/src/TNL/Solvers/DummyProblem.h @@ -11,7 +11,7 @@ #pragma once #include <TNL/Devices/Host.h> -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #include <TNL/Meshes/Grid.h> namespace TNL { @@ -27,7 +27,7 @@ class DummyProblem typedef Real RealType; typedef Device DeviceType; typedef Index IndexType; - typedef Vectors::Vector< Real, Device, Index > DofVectorType; + typedef Containers::Vector< Real, Device, Index > DofVectorType; typedef Meshes::Grid< 1, Real, Device, Index > MeshType; typedef DofVectorType MeshDependentDataType; }; diff --git a/src/TNL/Solvers/Linear/BICGStab.h b/src/TNL/Solvers/Linear/BICGStab.h index 8c305a76b62d6f7ed58d30f9ea223e059b2e7492..6a3f67c01d317e24ba0e5104cd4d599fcf1c638b 100644 --- a/src/TNL/Solvers/Linear/BICGStab.h +++ b/src/TNL/Solvers/Linear/BICGStab.h @@ -12,8 +12,8 @@ #include <math.h> #include <TNL/Object.h> -#include <TNL/Vectors/Vector.h> -#include <TNL/Vectors/SharedVector.h> +#include <TNL/Containers/Vector.h> +#include <TNL/Containers/SharedVector.h> #include <TNL/Solvers/Linear/Preconditioners/Dummy.h> #include <TNL/Solvers/IterativeSolver.h> #include <TNL/Solvers/Linear/LinearResidueGetter.h> @@ -74,7 +74,7 @@ class BICGStab : public Object, bool setSize( IndexType size ); - Vectors::Vector< RealType, DeviceType, IndexType > r, r_ast, r_new, p, s, Ap, As, M_tmp; + Containers::Vector< RealType, DeviceType, IndexType > r, r_ast, r_new, p, s, Ap, As, M_tmp; MatrixPointer matrix; const PreconditionerType* preconditioner; diff --git a/src/TNL/Solvers/Linear/CG.h b/src/TNL/Solvers/Linear/CG.h index c045acaec4da58afe431231b3182437d1fac886b..12dc1cb499b97235e908bbe00a81dd31c8ab2021 100644 --- a/src/TNL/Solvers/Linear/CG.h +++ b/src/TNL/Solvers/Linear/CG.h @@ -12,8 +12,8 @@ #include <math.h> #include <TNL/Object.h> -#include <TNL/Vectors/Vector.h> -#include <TNL/Vectors/SharedVector.h> +#include <TNL/Containers/Vector.h> +#include <TNL/Containers/SharedVector.h> #include <TNL/Solvers/Linear/Preconditioners/Dummy.h> #include <TNL/Solvers/IterativeSolver.h> #include <TNL/Solvers/Linear/LinearResidueGetter.h> @@ -72,7 +72,7 @@ class CG : public Object, bool setSize( IndexType size ); - Vectors::Vector< RealType, DeviceType, IndexType > r, new_r, p, Ap; + Containers::Vector< RealType, DeviceType, IndexType > r, new_r, p, Ap; MatrixPointer matrix; const PreconditionerType* preconditioner; diff --git a/src/TNL/Solvers/Linear/GMRES.h b/src/TNL/Solvers/Linear/GMRES.h index b580329f04c10aa0087b77f24381ca178a9f045b..37f9236ee563433c0e082ebb0d2e77cdbc69cf6b 100644 --- a/src/TNL/Solvers/Linear/GMRES.h +++ b/src/TNL/Solvers/Linear/GMRES.h @@ -12,8 +12,8 @@ #include <math.h> #include <TNL/Object.h> -#include <TNL/Vectors/Vector.h> -#include <TNL/Vectors/SharedVector.h> +#include <TNL/Containers/Vector.h> +#include <TNL/Containers/SharedVector.h> #include <TNL/Solvers/Linear/Preconditioners/Dummy.h> #include <TNL/Solvers/IterativeSolver.h> #include <TNL/Solvers/Linear/LinearResidueGetter.h> @@ -74,9 +74,9 @@ class GMRES : public Object, template< typename VectorT > void update( IndexType k, IndexType m, - const Vectors::Vector< RealType, Devices::Host, IndexType >& H, - const Vectors::Vector< RealType, Devices::Host, IndexType >& s, - Vectors::Vector< RealType, DeviceType, IndexType >& v, + const Containers::Vector< RealType, Devices::Host, IndexType >& H, + const Containers::Vector< RealType, Devices::Host, IndexType >& s, + Containers::Vector< RealType, DeviceType, IndexType >& v, VectorT& x ); void generatePlaneRotation( RealType &dx, @@ -92,8 +92,8 @@ class GMRES : public Object, bool setSize( IndexType _size, IndexType m ); - Vectors::Vector< RealType, DeviceType, IndexType > _r, w, _v, _M_tmp; - Vectors::Vector< RealType, Devices::Host, IndexType > _s, _cs, _sn, _H; + Containers::Vector< RealType, DeviceType, IndexType > _r, w, _v, _M_tmp; + Containers::Vector< RealType, Devices::Host, IndexType > _s, _cs, _sn, _H; IndexType size, restarting; diff --git a/src/TNL/Solvers/Linear/GMRES_impl.h b/src/TNL/Solvers/Linear/GMRES_impl.h index eb884f77a0bd0c0066f482370c908ec37933dae9..69e0600b1908db7d95315947f8cf4d609d57ca1b 100644 --- a/src/TNL/Solvers/Linear/GMRES_impl.h +++ b/src/TNL/Solvers/Linear/GMRES_impl.h @@ -147,7 +147,7 @@ bool GMRES< Matrix, Preconditioner >::solve( const VectorPointer& bPtr, VectorPo this->resetIterations(); this->setResidue( beta / normb ); - Vectors::SharedVector< RealType, DeviceType, IndexType > vi, vk; + Containers::SharedVector< RealType, DeviceType, IndexType > vi, vk; while( this->checkNextIteration() ) { const IndexType m = restarting; @@ -301,12 +301,12 @@ template< typename Matrix, template< typename VectorT > void GMRES< Matrix, Preconditioner > :: update( IndexType k, IndexType m, - const Vectors::Vector< RealType, Devices::Host, IndexType >& H, - const Vectors::Vector< RealType, Devices::Host, IndexType >& s, - Vectors::Vector< RealType, DeviceType, IndexType >& v, + const Containers::Vector< RealType, Devices::Host, IndexType >& H, + const Containers::Vector< RealType, Devices::Host, IndexType >& s, + Containers::Vector< RealType, DeviceType, IndexType >& v, VectorT& x ) { - Vectors::Vector< RealType, Devices::Host, IndexType > y; + Containers::Vector< RealType, Devices::Host, IndexType > y; y. setSize( m + 1 ); IndexType i, j; @@ -322,7 +322,7 @@ void GMRES< Matrix, Preconditioner > :: update( IndexType k, y[ j ] -= H[ j + i * ( m + 1 ) ] * y[ i ]; } - Vectors::SharedVector< RealType, DeviceType, IndexType > vi; + Containers::SharedVector< RealType, DeviceType, IndexType > vi; for( i = 0; i <= k; i++) { vi. bind( &( v. getData()[ i * this->size ] ), x. getSize() ); diff --git a/src/TNL/Solvers/Linear/Preconditioners/Diagonal.h b/src/TNL/Solvers/Linear/Preconditioners/Diagonal.h index 326a0da1d46a635237fb1156a5dc8b619a73432a..1e4fbe49b00780a572afba8f7d905a7497414628 100644 --- a/src/TNL/Solvers/Linear/Preconditioners/Diagonal.h +++ b/src/TNL/Solvers/Linear/Preconditioners/Diagonal.h @@ -2,7 +2,7 @@ #pragma once #include <TNL/Object.h> -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> namespace TNL { namespace Solvers { @@ -16,7 +16,7 @@ class Diagonal typedef Real RealType; typedef Device DeviceType; typedef Index IndexType; - typedef Vectors::Vector< Real, Device, Index > VectorType; + typedef Containers::Vector< Real, Device, Index > VectorType; template< typename Matrix > void update( const Matrix& matrix ); diff --git a/src/TNL/Solvers/Linear/TFQMR.h b/src/TNL/Solvers/Linear/TFQMR.h index b87ba6d944a675d1e9382434c12529e516680847..1726ad81e0dc9124aa027abd6e4e296e251c39cb 100644 --- a/src/TNL/Solvers/Linear/TFQMR.h +++ b/src/TNL/Solvers/Linear/TFQMR.h @@ -12,8 +12,8 @@ #include <math.h> #include <TNL/Object.h> -#include <TNL/Vectors/Vector.h> -#include <TNL/Vectors/SharedVector.h> +#include <TNL/Containers/Vector.h> +#include <TNL/Containers/SharedVector.h> #include <TNL/Solvers/Linear/Preconditioners/Dummy.h> #include <TNL/Solvers/IterativeSolver.h> #include <TNL/Solvers/Linear/LinearResidueGetter.h> @@ -73,7 +73,7 @@ class TFQMR : public Object, bool setSize( IndexType size ); - Vectors::Vector< RealType, DeviceType, IndexType > d, r, w, u, v, r_ast, Au, M_tmp; + Containers::Vector< RealType, DeviceType, IndexType > d, r, w, u, v, r_ast, Au, M_tmp; IndexType size; diff --git a/src/TNL/Solvers/ODE/ExplicitSolver.h b/src/TNL/Solvers/ODE/ExplicitSolver.h index a999b957c2b005081b6e77543ca366f933dd2e6d..0904121439efd3003df644b810950bced105562a 100644 --- a/src/TNL/Solvers/ODE/ExplicitSolver.h +++ b/src/TNL/Solvers/ODE/ExplicitSolver.h @@ -118,7 +118,7 @@ protected: /**** * Auxiliary array for the computation of the solver residue on CUDA device. */ - Vectors::Vector< RealType, DeviceType, IndexType > cudaBlockResidue; + Containers::Vector< RealType, DeviceType, IndexType > cudaBlockResidue; }; } // namespace ODE diff --git a/src/TNL/Solvers/PDE/ExplicitUpdater_impl.h b/src/TNL/Solvers/PDE/ExplicitUpdater_impl.h index 036a33e646a8a04278d2e0b9ac7318cabf186992..fde88e59182661614551c491fc1f6983de7768f7 100644 --- a/src/TNL/Solvers/PDE/ExplicitUpdater_impl.h +++ b/src/TNL/Solvers/PDE/ExplicitUpdater_impl.h @@ -39,7 +39,7 @@ update( const RealType& time, MeshFunctionPointer& fuPointer ) const { static_assert( std::is_same< MeshFunction, - Vectors::Vector< typename MeshFunction::RealType, + Containers::Vector< typename MeshFunction::RealType, typename MeshFunction::DeviceType, typename MeshFunction::IndexType > >::value != true, "Error: I am getting tnlVector instead of MeshFunction or similar object. You might forget to bind DofVector into MeshFunction in you method getExplicitRHS." ); diff --git a/src/TNL/Solvers/PDE/LinearSystemAssembler_impl.h b/src/TNL/Solvers/PDE/LinearSystemAssembler_impl.h index 8b5cca7b104e3c841d2426c1429bfc0994ddad3f..ab4c23b02d9410cf533f9e8f0fcfb8a7df89010d 100644 --- a/src/TNL/Solvers/PDE/LinearSystemAssembler_impl.h +++ b/src/TNL/Solvers/PDE/LinearSystemAssembler_impl.h @@ -41,7 +41,7 @@ assembly( const RealType& time, DofVectorPointer& bPointer ) const { static_assert( std::is_same< MeshFunction, - Vectors::Vector< typename MeshFunction::RealType, + Containers::Vector< typename MeshFunction::RealType, typename MeshFunction::DeviceType, typename MeshFunction::IndexType > >::value != true, "Error: I am getting Vector instead of MeshFunction or similar object. You might forget to bind DofVector into MeshFunction in you method getExplicitRHS." ); diff --git a/src/TNL/Vectors/CMakeLists.txt b/src/TNL/Vectors/CMakeLists.txt deleted file mode 100755 index b284ee53d947ae43f07e1b6621826ab13ea77776..0000000000000000000000000000000000000000 --- a/src/TNL/Vectors/CMakeLists.txt +++ /dev/null @@ -1,45 +0,0 @@ -set( headers Vector.h - Vector_impl.h - MultiVector.h - MultiVector1D_impl.h - MultiVector2D_impl.h - MultiVector3D_impl.h - MultiVector4D_impl.h - VectorOperations.h - VectorOperationsHost_impl.h - VectorOperationsCuda_impl.h - SharedVector.h - SharedVector_impl.h - StaticVector.h - StaticVector_impl.h - StaticVector1D_impl.h - StaticVector2D_impl.h - StaticVector3D_impl.h ) - -SET( CURRENT_DIR ${CMAKE_SOURCE_DIR}/src/TNL/Vectors ) -set( common_SOURCES - ${CURRENT_DIR}/VectorOperationsHost_impl.cpp - ${CURRENT_DIR}/MultiVector_impl.cpp - ${CURRENT_DIR}/SharedVector_impl.cpp - ${CURRENT_DIR}/Vector_impl.cpp - ${CURRENT_DIR}/StaticVector_impl.cpp ) - -IF( BUILD_CUDA ) - set( tnl_vectors_CUDA__SOURCES - ${common_SOURCES} - ${CURRENT_DIR}/VectorOperationsCuda_impl.cu - ${CURRENT_DIR}/Vector_impl.cu - ${CURRENT_DIR}/StaticVector_impl.cu - PARENT_SCOPE ) - set( tnl_vectors_SOURCES - ${common_SOURCES} - PARENT_SCOPE ) -else() - set( tnl_vectors_SOURCES - ${common_SOURCES} - ${CURRENT_DIR}/VectorOperationsCuda_impl.cpp - PARENT_SCOPE ) -ENDIF() - - -INSTALL( FILES ${headers} DESTINATION include/tnl-${tnlVersion}/TNL/Vectors ) \ No newline at end of file diff --git a/src/TNL/core/containers/tnlContainer.h b/src/TNL/core/containers/tnlContainer.h index 70aeed4d74742d704ccbec403276d5f0608f7a3b..bce3fed846ed25a63b07af6552c2088c43d2e28d 100644 --- a/src/TNL/core/containers/tnlContainer.h +++ b/src/TNL/core/containers/tnlContainer.h @@ -11,7 +11,7 @@ #pragma once #include <TNL/Object.h> -#include <TNL/Arrays/Array.h> +#include <TNL/Containers/Array.h> namespace TNL { @@ -50,7 +50,7 @@ class tnlContainer : public Object protected: - Arrays::Array< Element, Device, Index > data; + Containers::Array< Element, Device, Index > data; }; } // namespace TNL diff --git a/src/TNL/core/containers/tnlStaticContainer.h b/src/TNL/core/containers/tnlStaticContainer.h index 197ab492aaa8e7e7eef8eaca4001c0847e6bc724..d61e14cb37ab56d162e729755a1f537a5c8b952a 100644 --- a/src/TNL/core/containers/tnlStaticContainer.h +++ b/src/TNL/core/containers/tnlStaticContainer.h @@ -11,7 +11,7 @@ #pragma once #include <TNL/Object.h> -#include <TNL/Arrays/StaticArray.h> +#include <TNL/Containers/StaticArray.h> namespace TNL { @@ -46,7 +46,7 @@ class tnlStaticContainer : public Object protected: - Arrays::StaticArray< Size, Element > data; + Containers::StaticArray< Size, Element > data; }; } // namespace TNL diff --git a/src/TNL/core/cuda/cuda-reduction_impl.h b/src/TNL/core/cuda/cuda-reduction_impl.h index f3f32e06a55e41334e4d99de8dca3ccd0ddf7080..b693625553906d4cd56c554adf8e06f46a4c00b4 100644 --- a/src/TNL/core/cuda/cuda-reduction_impl.h +++ b/src/TNL/core/cuda/cuda-reduction_impl.h @@ -18,7 +18,7 @@ #include <iostream> #include <TNL/Assert.h> #include <TNL/core/cuda/reduction-operations.h> -#include <TNL/Arrays/ArrayOperations.h> +#include <TNL/Containers/ArrayOperations.h> #include <TNL/core/mfuncs.h> #include <TNL/core/cuda/tnlCudaReductionBuffer.h> #include <TNL/core/cuda/tnlCudaReduction.h> @@ -149,10 +149,10 @@ bool reductionOnCudaDevice( Operation& operation, RealType hostArray2[ minGPUReductionDataSize ]; if( size <= minGPUReductionDataSize ) { - if( ! Arrays::ArrayOperations< Devices::Host, Devices::Cuda >::copyMemory< RealType, RealType, IndexType >( hostArray1, deviceInput1, size ) ) + if( ! Containers::ArrayOperations< Devices::Host, Devices::Cuda >::copyMemory< RealType, RealType, IndexType >( hostArray1, deviceInput1, size ) ) return false; if( deviceInput2 && ! - Arrays::ArrayOperations< Devices::Host, Devices::Cuda >::copyMemory< RealType, RealType, IndexType >( hostArray2, deviceInput2, size ) ) + Containers::ArrayOperations< Devices::Host, Devices::Cuda >::copyMemory< RealType, RealType, IndexType >( hostArray2, deviceInput2, size ) ) return false; result = operation.initialValue(); for( IndexType i = 0; i < size; i ++ ) @@ -186,7 +186,7 @@ bool reductionOnCudaDevice( Operation& operation, * Transfer the reduced data from device to host. */ ResultType resultArray[ minGPUReductionDataSize ]; - if( ! Arrays::ArrayOperations< Devices::Host, Devices::Cuda >::copyMemory< ResultType, ResultType, IndexType >( resultArray, deviceAux1, reducedSize ) ) + if( ! Containers::ArrayOperations< Devices::Host, Devices::Cuda >::copyMemory< ResultType, ResultType, IndexType >( resultArray, deviceAux1, reducedSize ) ) return false; #ifdef CUDA_REDUCTION_PROFILING diff --git a/src/TNL/core/multimaps/tnlEllpackIndexMultimap.h b/src/TNL/core/multimaps/tnlEllpackIndexMultimap.h index 5663c9ac87110fbf0dc0b7e5bab93ecd1c02d77b..269878064acfa78b6126a7ea3c2cc565d47c9b57 100644 --- a/src/TNL/core/multimaps/tnlEllpackIndexMultimap.h +++ b/src/TNL/core/multimaps/tnlEllpackIndexMultimap.h @@ -10,7 +10,7 @@ #pragma once -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> namespace TNL { @@ -32,7 +32,7 @@ class tnlEllpackIndexMultimap typedef Index IndexType; typedef tnlEllpackIndexMultimapValues< IndexType, DeviceType > ValuesAccessorType; typedef tnlEllpackIndexMultimapConstValues< IndexType, DeviceType > ConstValuesAccessorType; - typedef Vectors::Vector< IndexType, DeviceType, IndexType > ValuesAllocationVectorType; + typedef Containers::Vector< IndexType, DeviceType, IndexType > ValuesAllocationVectorType; tnlEllpackIndexMultimap(); @@ -55,7 +55,7 @@ class tnlEllpackIndexMultimap protected: - Vectors::Vector< IndexType, DeviceType, IndexType > values; + Containers::Vector< IndexType, DeviceType, IndexType > values; IndexType keysRange, valuesRange, valuesMaxCount; }; diff --git a/src/TNL/core/tnlCurve.h b/src/TNL/core/tnlCurve.h index e9da88bed74cc3a2019031f7171540e73a42c3a3..4abc7ad0e7c3f4d1a810fe00c8558cb64baefe08 100644 --- a/src/TNL/core/tnlCurve.h +++ b/src/TNL/core/tnlCurve.h @@ -16,7 +16,7 @@ #include <TNL/List.h> #include <TNL/Object.h> #include <TNL/core/mfuncs.h> -#include <TNL/Vectors/StaticVector.h> +#include <TNL/Containers/StaticVector.h> #include <TNL/core/param-types.h> namespace TNL { @@ -88,7 +88,7 @@ template< class T > class tnlCurve : public Object, public List< tnlCurveElement String getType() const { - return String( "tnlCurve< " ) + String( TNL::getType< T >() ) + String( " >" ); + return String( "Curve< " ) + String( TNL::getType< T >() ) + String( " >" ); }; //! Append new point @@ -229,7 +229,7 @@ template< class T > bool Read( tnlCurve< T >& crv, } // Explicit instatiation -template class tnlCurve< Vectors::StaticVector< 2, double > >; +template class tnlCurve< Containers::StaticVector< 2, double > >; } // namespace TNL diff --git a/src/TNL/legacy/core/tnlTuple.h b/src/TNL/legacy/core/tnlTuple.h index 29824124110def3477fa9a2d86874735fa21967d..c62fb2429df819233acb89d3d30e18cefd25b4a8 100644 --- a/src/TNL/legacy/core/tnlTuple.h +++ b/src/TNL/legacy/core/tnlTuple.h @@ -327,7 +327,7 @@ template< int Size, typename Real > #endif String StaticVector< Size, Real > :: getType() { - return String( "StaticVector< " ) + + return String( "Containers::StaticVector< " ) + String( Size ) + String( ", " ) + TNL::getType< Real >() + diff --git a/src/TNL/legacy/matrices/tnlAdaptiveRgCSRMatrix.h b/src/TNL/legacy/matrices/tnlAdaptiveRgCSRMatrix.h index 20351475f671ce10be838f174b2771de49041798..a3ef46b1cf13c597fc394177b7ef64cd1f2d526d 100644 --- a/src/TNL/legacy/matrices/tnlAdaptiveRgCSRMatrix.h +++ b/src/TNL/legacy/matrices/tnlAdaptiveRgCSRMatrix.h @@ -14,7 +14,7 @@ #include <iostream> #include <iomanip> -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #include <TNL/Assert.h> #include <TNL/core/mfuncs.h> #include <TNL/Matrices/CSR.h> diff --git a/src/TNL/legacy/matrices/tnlCSRMatrix.h b/src/TNL/legacy/matrices/tnlCSRMatrix.h index 7d3cdc92d8fa6a44ebe93bbb313390ee4cd35ca1..36514897e8f6fc741c83738d5283573adc1c9576 100644 --- a/src/TNL/legacy/matrices/tnlCSRMatrix.h +++ b/src/TNL/legacy/matrices/tnlCSRMatrix.h @@ -15,7 +15,7 @@ #include <iostream> #include <iomanip> -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #include <TNL/Assert.h> #include <TNL/core/mfuncs.h> #include <TNL/Matrices/Matrix.h> diff --git a/src/TNL/legacy/matrices/tnlCusparseCSRMatrix.h b/src/TNL/legacy/matrices/tnlCusparseCSRMatrix.h index 501f83c201a1749aefd8d29fc5396b75a94fe97a..96ea648ae4927c97216e1cebb111bf0222352dd4 100644 --- a/src/TNL/legacy/matrices/tnlCusparseCSRMatrix.h +++ b/src/TNL/legacy/matrices/tnlCusparseCSRMatrix.h @@ -15,7 +15,7 @@ #include <iostream> #include <iomanip> #include <TNL/tnlConfig.h> -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #include <TNL/Assert.h> #include <TNL/core/mfuncs.h> #include <TNL/Matrices/CSR.h> @@ -189,7 +189,7 @@ const String& tnlCusparseCSR< Real, Device, Index > :: getMatrixClass() const template< typename Real, typename Device, typename Index > String tnlCusparseCSR< Real, Device, Index > :: getType() const { - return String( "tnlCusparseCSR< ") + + return String( "Matrices::CusparseCSR< ") + String( getType( Real( 0.0 ) ) ) + String( ", " ) + Device :: getDeviceType() + diff --git a/src/TNL/legacy/matrices/tnlEllpackMatrix.h b/src/TNL/legacy/matrices/tnlEllpackMatrix.h index 158afed9cb5b5dfc2615941172dc7216456b648b..33bcad7049e912fa47607faaa30bd51c8dc5aae9 100644 --- a/src/TNL/legacy/matrices/tnlEllpackMatrix.h +++ b/src/TNL/legacy/matrices/tnlEllpackMatrix.h @@ -13,7 +13,7 @@ #include <iostream> #include <iomanip> -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #include <TNL/Assert.h> #include <TNL/core/mfuncs.h> #include <TNL/Matrices/CSR.h> @@ -118,7 +118,7 @@ const String& Ellpack< Real, Devices::Host, Index > :: getMatrixClass() const template< typename Real, typename Index > String Ellpack< Real, Devices::Host, Index > :: getType() const { - return String( "Ellpack< ") + String( getType( Real( 0.0 ) ) ) + String( ", Devices::Host >" ); + return String( "Matrices::Ellpack< ") + String( getType( Real( 0.0 ) ) ) + String( ", Devices::Host >" ); }; template< typename Real, typename Index > diff --git a/src/TNL/legacy/matrices/tnlEllpackMatrixCUDA.h b/src/TNL/legacy/matrices/tnlEllpackMatrixCUDA.h index 389c191fb0f0bc6f6a4dd7e8fd6620f9288fbda6..80fed31ec0b4addca3cacd2668fb2dd2582945fd 100644 --- a/src/TNL/legacy/matrices/tnlEllpackMatrixCUDA.h +++ b/src/TNL/legacy/matrices/tnlEllpackMatrixCUDA.h @@ -153,7 +153,7 @@ const String& Ellpack< Real, Devices::Cuda, Index > :: getMatrixClass() const template< typename Real, typename Index > String Ellpack< Real, Devices::Cuda, Index > :: getType() const { - return String( "Ellpack< ") + String( getType( Real( 0.0 ) ) ) + String( ", Devices::Cuda >" ); + return String( "Matrices::Ellpack< ") + String( getType( Real( 0.0 ) ) ) + String( ", Devices::Cuda >" ); }; template< typename Real, typename Index > diff --git a/src/TNL/legacy/matrices/tnlFastCSRMatrix.h b/src/TNL/legacy/matrices/tnlFastCSRMatrix.h index 1774f93edf0cf367b52cdf92ba3ef1ddb6406d07..e57113d7f4ffac4c25964d266f39f66c06d441eb 100644 --- a/src/TNL/legacy/matrices/tnlFastCSRMatrix.h +++ b/src/TNL/legacy/matrices/tnlFastCSRMatrix.h @@ -13,7 +13,7 @@ #include <iostream> #include <iomanip> -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #include <TNL/Assert.h> #include <TNL/core/mfuncs.h> #include <TNL/Matrices/Matrix.h> @@ -189,7 +189,7 @@ const String& tnlFastCSR< Real, Devices::Host, Index > :: getMatrixClass() const template< typename Real, typename Index > String tnlFastCSR< Real, Devices::Host, Index > :: getType() const { - return String( "tnlFastCSR< ") + String( getType( Real( 0.0 ) ) ) + String( ", Devices::Host >" ); + return String( "Matrices::FastCSR< ") + String( getType( Real( 0.0 ) ) ) + String( ", Devices::Host >" ); }; template< typename Real, typename Index > diff --git a/src/TNL/legacy/matrices/tnlFastRgCSRMatrix.h b/src/TNL/legacy/matrices/tnlFastRgCSRMatrix.h index 3d402ba55dcfe91af6e74cba2ae321f92f2ef2c8..418047d4173fdfe4ff62f0eee5f455033d17f533 100644 --- a/src/TNL/legacy/matrices/tnlFastRgCSRMatrix.h +++ b/src/TNL/legacy/matrices/tnlFastRgCSRMatrix.h @@ -13,7 +13,7 @@ #include <iostream> #include <iomanip> -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #include <TNL/Assert.h> #include <TNL/core/mfuncs.h> #include <TNL/Matrices/Matrix.h> diff --git a/src/TNL/legacy/matrices/tnlFastRgCSRMatrixCUDA.h b/src/TNL/legacy/matrices/tnlFastRgCSRMatrixCUDA.h index a02f6a241133733c0cd9cc4acb2f98281e68e446..dc4bd0e81f10f258f61dc224d9629f4cda995f6d 100644 --- a/src/TNL/legacy/matrices/tnlFastRgCSRMatrixCUDA.h +++ b/src/TNL/legacy/matrices/tnlFastRgCSRMatrixCUDA.h @@ -13,7 +13,7 @@ #include <iostream> #include <iomanip> -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #include <TNL/Assert.h> #include <TNL/core/mfuncs.h> #include <TNL/Matrices/Matrix.h> diff --git a/src/TNL/legacy/matrices/tnlFullMatrix.h b/src/TNL/legacy/matrices/tnlFullMatrix.h index 9cfb02e3d8eebe7cdb8d408caa5f88c3f7ad2f51..a454f65e83ead302d0bfabf9bb40fe59f69c6b25 100644 --- a/src/TNL/legacy/matrices/tnlFullMatrix.h +++ b/src/TNL/legacy/matrices/tnlFullMatrix.h @@ -11,7 +11,7 @@ #ifndef tnlFullMatrixH #define tnlFullMatrixH -#include <TNL/Arrays/MultiArray.h> +#include <TNL/Containers/MultiArray.h> #include <TNL/Matrices/Matrix.h> const int tnlMaxFullMatrixSize = 65536; diff --git a/src/TNL/legacy/matrices/tnlMatrix.h b/src/TNL/legacy/matrices/tnlMatrix.h index 3759eb36ad71d319e050c56415ff845a2d412d23..115a5cb5a9d0ec81079c81593ef014f6e76c7132 100644 --- a/src/TNL/legacy/matrices/tnlMatrix.h +++ b/src/TNL/legacy/matrices/tnlMatrix.h @@ -18,7 +18,7 @@ #include <TNL/String.h> #include <TNL/List.h> #include <TNL/File.h> -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #include <TNL/debug/tnlDebug.h> using namespace std; diff --git a/src/TNL/legacy/matrices/tnlRgCSRMatrix.h b/src/TNL/legacy/matrices/tnlRgCSRMatrix.h index 874ae092a0de85ed8dc2d1ad59781b5a54c2a2b9..d4afb94acee3b692f11ffc34cd892b038d1aa2e6 100644 --- a/src/TNL/legacy/matrices/tnlRgCSRMatrix.h +++ b/src/TNL/legacy/matrices/tnlRgCSRMatrix.h @@ -14,7 +14,7 @@ #include <iostream> #include <iomanip> -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #include <TNL/Assert.h> #include <TNL/core/mfuncs.h> #include <TNL/Matrices/Matrix.h> diff --git a/src/TNL/legacy/solvers/tnlGMRESSolverOld.h b/src/TNL/legacy/solvers/tnlGMRESSolverOld.h index 82cf8d015332de322ef162b523157c1fa7a96ec6..d17560ee64bfa5c50a84e9149bf1b583ad47e8c3 100644 --- a/src/TNL/legacy/solvers/tnlGMRESSolverOld.h +++ b/src/TNL/legacy/solvers/tnlGMRESSolverOld.h @@ -13,7 +13,7 @@ #include <math.h> -#include <TNL/Vectors/SharedVector.h> +#include <TNL/Containers/SharedVector.h> #include <TNL/legacy/solvers/MatrixSolver.h> template< typename Real, typename Device = Devices::Host, typename Index = int > diff --git a/src/TNL/legacy/tnl-benchmarks.cpp b/src/TNL/legacy/tnl-benchmarks.cpp index 935624426d9739b79094aaaec17c18d56019f763..ff9bfc8628089e6380e34bd71e803e4691c7be3f 100644 --- a/src/TNL/legacy/tnl-benchmarks.cpp +++ b/src/TNL/legacy/tnl-benchmarks.cpp @@ -9,8 +9,8 @@ /* See Copyright Notice in tnl/Copyright */ #include <TNL/TimerRT.h> -#include <TNL/Vectors/Vector.h> -#include <TNL/Vectors/VectorCUDA.h> +#include <TNL/Containers/Vector.h> +#include <TNL/Containers/VectorCUDA.h> #include <TNL/core/tnl-cuda-kernels.cu.h> #include <TNL/tnl-benchmarks.h> diff --git a/tests/benchmarks/array-operations.h b/tests/benchmarks/array-operations.h index 7297bce72f4c1034ce0fbeaccd35441dc7c86b9d..890f9ddc490cec0dee85c9c5b7e607f467b2b8bc 100644 --- a/tests/benchmarks/array-operations.h +++ b/tests/benchmarks/array-operations.h @@ -2,7 +2,7 @@ #include "benchmarks.h" -#include <TNL/Arrays/Array.h> +#include <TNL/Containers/Array.h> namespace TNL { @@ -16,8 +16,8 @@ benchmarkArrayOperations( Benchmark & benchmark, const int & loops, const int & size ) { - typedef Arrays::Array< Real, Devices::Host, Index > HostArray; - typedef Arrays::Array< Real, Devices::Cuda, Index > CudaArray; + typedef Containers::Array< Real, Devices::Host, Index > HostArray; + typedef Containers::Array< Real, Devices::Cuda, Index > CudaArray; using namespace std; double datasetSize = ( double ) ( loops * size ) * sizeof( Real ) / oneGB; diff --git a/tests/benchmarks/heat-equation-benchmark/BenchmarkLaplace.h b/tests/benchmarks/heat-equation-benchmark/BenchmarkLaplace.h index f0d7b7b5a33381d6e05b1004f6f2fa4ab2cd5937..e2bdc8f6ba421f339285fe37e4058cebae8dda99 100644 --- a/tests/benchmarks/heat-equation-benchmark/BenchmarkLaplace.h +++ b/tests/benchmarks/heat-equation-benchmark/BenchmarkLaplace.h @@ -1,7 +1,7 @@ #ifndef BenchmarkLaplace_H #define BenchmarkLaplace_H -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #include <TNL/Meshes/Grid.h> template< typename Mesh, diff --git a/tests/benchmarks/heat-equation-benchmark/TestGridEntity.h b/tests/benchmarks/heat-equation-benchmark/TestGridEntity.h index 6e7f711dab9a87b98349bbe4d4528eb00e20a328..e72140e45871d62fb9ae7926e3aa7a53a9d31642 100644 --- a/tests/benchmarks/heat-equation-benchmark/TestGridEntity.h +++ b/tests/benchmarks/heat-equation-benchmark/TestGridEntity.h @@ -76,8 +76,8 @@ class TestGridEntity< Meshes::Grid< Dimensions, Real, Device, Index >, Dimension constexpr static int getMeshDimensions() { return meshDimensions; }; - typedef Vectors::StaticVector< meshDimensions, IndexType > EntityOrientationType; - typedef Vectors::StaticVector< meshDimensions, IndexType > EntityBasisType; + typedef Containers::StaticVector< meshDimensions, IndexType > EntityOrientationType; + typedef Containers::StaticVector< meshDimensions, IndexType > EntityBasisType; typedef TestGridEntity< GridType, entityDimensions > ThisType; typedef TestNeighbourGridEntitiesStorage< ThisType > NeighbourGridEntitiesStorageType; diff --git a/tests/benchmarks/heat-equation-benchmark/pure-c-rhs.h b/tests/benchmarks/heat-equation-benchmark/pure-c-rhs.h index ca938a056ea0503c07d69c75a723688667f21b1e..1ec3a51fe059d940b51ecc98ff1db76180c1c130 100644 --- a/tests/benchmarks/heat-equation-benchmark/pure-c-rhs.h +++ b/tests/benchmarks/heat-equation-benchmark/pure-c-rhs.h @@ -29,7 +29,7 @@ struct Data { double time, tau; - TNL::Vectors::StaticVector< 2, double > c1, c2, c3, c4; + TNL::Containers::StaticVector< 2, double > c1, c2, c3, c4; TNL::Meshes::Grid< 2, double > grid; }; diff --git a/tests/benchmarks/heat-equation-benchmark/tnl-benchmark-heat-equation.h b/tests/benchmarks/heat-equation-benchmark/tnl-benchmark-heat-equation.h index 5002d7f96f91ccc5644ca135b50e31d5df59a77a..6cacb6a2be3531c981b77b3cfb7ca46be59db374 100644 --- a/tests/benchmarks/heat-equation-benchmark/tnl-benchmark-heat-equation.h +++ b/tests/benchmarks/heat-equation-benchmark/tnl-benchmark-heat-equation.h @@ -62,7 +62,7 @@ class HeatEquationBenchmarkSetter enum { Dimensions = MeshType::getMeshDimensions() }; typedef BenchmarkLaplace< MeshType, Real, Index > ApproximateOperator; typedef HeatEquationBenchmarkRhs< MeshType, Real > RightHandSide; - typedef Vectors::StaticVector < MeshType::getMeshDimensions(), Real > Vertex; + typedef Containers::StaticVector < MeshType::getMeshDimensions(), Real > Vertex; /**** * Resolve the template arguments of your solver here. diff --git a/tests/benchmarks/heat-equation-benchmark/tnl-benchmark-simple-heat-equation.h b/tests/benchmarks/heat-equation-benchmark/tnl-benchmark-simple-heat-equation.h index 3682b4fd148ceedd334aec4f20731f1cdf0ad177..9a6cf7b95e05c2888487802c3bb0f80c03d74e4b 100644 --- a/tests/benchmarks/heat-equation-benchmark/tnl-benchmark-simple-heat-equation.h +++ b/tests/benchmarks/heat-equation-benchmark/tnl-benchmark-simple-heat-equation.h @@ -17,7 +17,7 @@ #include <TNL/Config/ParameterContainer.h> #include <TNL/Timer.h> #include <TNL/Devices/Cuda.h> -#include <TNL/Vectors/StaticVector.h> +#include <TNL/Containers/StaticVector.h> #include <TNL/Meshes/Grid.h> #include <TNL/Functions/MeshFunction.h> #include "pure-c-rhs.h" @@ -303,7 +303,7 @@ bool solveHeatEquationCuda( const Config::ParameterContainer& parameters, std::cerr << "Allocation failed. " << cudaErr << std::endl; return false; } - Vectors::Vector< Real, Devices::Cuda, Index > vecAux; + Containers::Vector< Real, Devices::Cuda, Index > vecAux; vecAux.bind( cuda_aux, gridXSize * gridYSize ); vecAux.setValue( 0.0 ); cudaMemcpy( aux, cuda_u, dofsCount * sizeof( Real ), cudaMemcpyDeviceToHost ); @@ -391,7 +391,7 @@ bool solveHeatEquationCuda( const Config::ParameterContainer& parameters, GridPointer gridPointer; gridPointer->setDimensions( gridXSize, gridYSize ); gridPointer->setDomain( VertexType( 0.0, 0.0 ), VertexType( domainXSize, domainYSize ) ); - Vectors::Vector< Real, Devices::Cuda, Index > vecU; + Containers::Vector< Real, Devices::Cuda, Index > vecU; vecU.bind( cuda_u, gridXSize * gridYSize ); Functions::MeshFunction< GridType > meshFunction; meshFunction.bind( gridPointer, vecU ); @@ -542,7 +542,7 @@ bool solveHeatEquationHost( const Config::ParameterContainer& parameters, SharedPointer< GridType > gridPointer; gridPointer->setDimensions( gridXSize, gridYSize ); gridPointer->setDomain( VertexType( 0.0, 0.0 ), VertexType( domainXSize, domainYSize ) ); - Vectors::Vector< Real, Devices::Host, Index > vecU; + Containers::Vector< Real, Devices::Host, Index > vecU; vecU.bind( u, gridXSize * gridYSize ); Functions::MeshFunction< GridType > meshFunction; meshFunction.bind( gridPointer, vecU ); diff --git a/tests/benchmarks/spmv.h b/tests/benchmarks/spmv.h index 33a1d0cd97dcb73660ad82ef32313fa555ff68b7..c7c9a2fc7d6e823da17a5c72f0865f803c7fa6f8 100644 --- a/tests/benchmarks/spmv.h +++ b/tests/benchmarks/spmv.h @@ -82,7 +82,7 @@ void setCudaTestMatrix( Matrix& matrix, // TODO: rename as benchmark_SpMV_synthetic and move to spmv-synthetic.h template< typename Real, template< typename, typename, typename > class Matrix, - template< typename, typename, typename > class Vector = Vectors::Vector > + template< typename, typename, typename > class Vector = Containers::Vector > bool benchmarkSpMV( Benchmark & benchmark, const int & loops, @@ -91,13 +91,13 @@ benchmarkSpMV( Benchmark & benchmark, { typedef Matrix< Real, Devices::Host, int > HostMatrix; typedef Matrix< Real, Devices::Cuda, int > DeviceMatrix; - typedef Vectors::Vector< Real, Devices::Host, int > HostVector; - typedef Vectors::Vector< Real, Devices::Cuda, int > CudaVector; + typedef Containers::Vector< Real, Devices::Host, int > HostVector; + typedef Containers::Vector< Real, Devices::Cuda, int > CudaVector; HostMatrix hostMatrix; DeviceMatrix deviceMatrix; - Vectors::Vector< int, Devices::Host, int > hostRowLengths; - Vectors::Vector< int, Devices::Cuda, int > deviceRowLengths; + Containers::Vector< int, Devices::Host, int > hostRowLengths; + Containers::Vector< int, Devices::Cuda, int > deviceRowLengths; HostVector hostVector, hostVector2; CudaVector deviceVector, deviceVector2; diff --git a/tests/benchmarks/tnl-benchmark-linear-solvers.h b/tests/benchmarks/tnl-benchmark-linear-solvers.h index d00d899f95591f7834f280061134edfde1016d5e..dcc76b6f2a35bc68bdb1058039d1fed08ae5adfe 100644 --- a/tests/benchmarks/tnl-benchmark-linear-solvers.h +++ b/tests/benchmarks/tnl-benchmark-linear-solvers.h @@ -73,7 +73,7 @@ bool benchmarkSolver( const Config::ParameterContainer& parameters, typedef typename MatrixType::RealType RealType; typedef typename MatrixType::DeviceType DeviceType; typedef typename MatrixType::IndexType IndexType; - typedef Vectors::Vector< RealType, DeviceType, IndexType > VectorType; + typedef Containers::Vector< RealType, DeviceType, IndexType > VectorType; typedef SharedPointer< VectorType > VectorPointer; typedef SharedPointer< MatrixType > MatrixPointer; diff --git a/tests/benchmarks/tnl-benchmark-spmv.h b/tests/benchmarks/tnl-benchmark-spmv.h index 9d426431af220e7ba2dc51786b7b404bbad89697..43deb5ce28d107ef2661bae533d58b9731eca1a0 100644 --- a/tests/benchmarks/tnl-benchmark-spmv.h +++ b/tests/benchmarks/tnl-benchmark-spmv.h @@ -328,20 +328,20 @@ bool setupBenchmark( const Config::ParameterContainer& parameters ) const int rows = csrMatrix.getRows(); const int columns = csrMatrix.getColumns(); const long int nonzeroElements = csrMatrix.getNumberOfMatrixElements(); - Vectors::Vector< int, Devices::Host, int > rowLengthsHost; + Containers::Vector< int, Devices::Host, int > rowLengthsHost; rowLengthsHost.setSize( rows ); for( int row = 0; row < rows; row++ ) rowLengthsHost[ row ] = csrMatrix.getRowLength( row ); - typedef Vectors::Vector< Real, Devices::Host, int > HostVector; + typedef Containers::Vector< Real, Devices::Host, int > HostVector; HostVector hostX, hostB; hostX.setSize( csrMatrix.getColumns() ); hostX.setValue( 1.0 ); hostB.setSize( csrMatrix.getRows() ); #ifdef HAVE_CUDA - typedef Vectors::Vector< Real, Devices::Cuda, int > CudaVector; + typedef Containers::Vector< Real, Devices::Cuda, int > CudaVector; CudaVector cudaX, cudaB; - Vectors::Vector< int, Devices::Cuda, int > rowLengthsCuda; + Containers::Vector< int, Devices::Cuda, int > rowLengthsCuda; cudaX.setSize( csrMatrix.getColumns() ); cudaX.setValue( 1.0 ); cudaB.setSize( csrMatrix.getRows() ); diff --git a/tests/benchmarks/vector-operations.h b/tests/benchmarks/vector-operations.h index 9a33e69bd64df39e7de82f10cc69f4235637e72b..4d0a7e00971d3aae415917888222c586fed48912 100644 --- a/tests/benchmarks/vector-operations.h +++ b/tests/benchmarks/vector-operations.h @@ -2,7 +2,7 @@ #include "benchmarks.h" -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #ifdef HAVE_CUBLAS #include "cublasWrappers.h" @@ -20,8 +20,8 @@ benchmarkVectorOperations( Benchmark & benchmark, const int & loops, const int & size ) { - typedef Vectors::Vector< Real, Devices::Host, Index > HostVector; - typedef Vectors::Vector< Real, Devices::Cuda, Index > CudaVector; + typedef Containers::Vector< Real, Devices::Host, Index > HostVector; + typedef Containers::Vector< Real, Devices::Cuda, Index > CudaVector; using namespace std; double datasetSize = ( double ) ( loops * size ) * sizeof( Real ) / oneGB; diff --git a/tests/long-time-unit-tests/matrix-formats-test.h b/tests/long-time-unit-tests/matrix-formats-test.h index fd84536156daf2252816c8b3010bd618f7c055f3..3815fff32d777f7817ec51ed6dc01fdb58245fbc 100644 --- a/tests/long-time-unit-tests/matrix-formats-test.h +++ b/tests/long-time-unit-tests/matrix-formats-test.h @@ -97,7 +97,7 @@ bool testMatrix( const Config::ParameterContainer& parameters ) } if( parameters.getParameter< bool >( "multiplication-test" ) ) { - Vectors::Vector< RealType, DeviceType, IndexType > x, b; + Containers::Vector< RealType, DeviceType, IndexType > x, b; x.setSize( matrix.getColumns() ); b.setSize( matrix.getRows() ); for( IndexType i = 0; i < x.getSize(); i++ ) diff --git a/tests/unit-tests/core/arrays/tnlArrayOperationsTester.h b/tests/unit-tests/core/arrays/tnlArrayOperationsTester.h index 152926339d12e3243a90fb4e528c665b6a6023bd..40ee9870cb5716aa2cc9230bf359419e89d9dcf2 100644 --- a/tests/unit-tests/core/arrays/tnlArrayOperationsTester.h +++ b/tests/unit-tests/core/arrays/tnlArrayOperationsTester.h @@ -20,7 +20,7 @@ #include <cppunit/TestCase.h> #include <cppunit/Message.h> -#include <TNL/Arrays/ArrayOperations.h> +#include <TNL/Containers/ArrayOperations.h> #include <TNL/Devices/Cuda.h> using namespace TNL; @@ -65,7 +65,7 @@ class ArrayOperationsTester< Element, Devices::Host > : public CppUnit :: TestCa void allocationTest() { - using namespace TNL::Arrays; + using namespace TNL::Containers; Element* data; ArrayOperations< Devices::Host >::allocateMemory( data, getTestSize() ); CPPUNIT_ASSERT( data != 0 ); @@ -75,7 +75,7 @@ class ArrayOperationsTester< Element, Devices::Host > : public CppUnit :: TestCa void memorySetTest() { - using namespace TNL::Arrays; + using namespace TNL::Containers; const int size = 1024; Element *data; ArrayOperations< Devices::Host > :: allocateMemory( data, size ); @@ -87,7 +87,7 @@ class ArrayOperationsTester< Element, Devices::Host > : public CppUnit :: TestCa void copyMemoryTest() { - using namespace TNL::Arrays; + using namespace TNL::Containers; const int size = getTestSize(); Element *data1, *data2; @@ -103,7 +103,7 @@ class ArrayOperationsTester< Element, Devices::Host > : public CppUnit :: TestCa void copyMemoryWithConversionTest() { - using namespace TNL::Arrays; + using namespace TNL::Containers; const int size = getTestSize(); int *data1; float *data2; @@ -120,7 +120,7 @@ class ArrayOperationsTester< Element, Devices::Host > : public CppUnit :: TestCa void compareMemoryTest() { - using namespace TNL::Arrays; + using namespace TNL::Containers; const int size = getTestSize(); int *data1, *data2; ArrayOperations< Devices::Host > :: allocateMemory( data1, size ); @@ -133,7 +133,7 @@ class ArrayOperationsTester< Element, Devices::Host > : public CppUnit :: TestCa void compareMemoryWithConversionTest() { - using namespace TNL::Arrays; + using namespace TNL::Containers; const int size = getTestSize(); int *data1; float *data2; @@ -187,7 +187,7 @@ class ArrayOperationsTester< Element, Devices::Cuda > : public CppUnit :: TestCa void allocationTest() { - using namespace TNL::Arrays; + using namespace TNL::Containers; int* data; ArrayOperations< Devices::Cuda >::allocateMemory( data, getTestSize() ); CPPUNIT_ASSERT( checkCudaDevice ); @@ -199,7 +199,7 @@ class ArrayOperationsTester< Element, Devices::Cuda > : public CppUnit :: TestCa void setMemoryElementTest() { #ifdef HAVE_CUDA - using namespace TNL::Arrays; + using namespace TNL::Containers; const int size( 1024 ); int* data; ArrayOperations< Devices::Cuda >::allocateMemory( data, size ); @@ -222,7 +222,7 @@ class ArrayOperationsTester< Element, Devices::Cuda > : public CppUnit :: TestCa void getMemoryElementTest() { - using namespace TNL::Arrays; + using namespace TNL::Containers; const int size( 1024 ); int* data; ArrayOperations< Devices::Cuda >::allocateMemory( data, size ); @@ -241,7 +241,7 @@ class ArrayOperationsTester< Element, Devices::Cuda > : public CppUnit :: TestCa void smallMemorySetTest() { - using namespace TNL::Arrays; + using namespace TNL::Containers; const int size = 1024; int *hostData, *deviceData; ArrayOperations< Devices::Host >::allocateMemory( hostData, size ); @@ -259,7 +259,7 @@ class ArrayOperationsTester< Element, Devices::Cuda > : public CppUnit :: TestCa void bigMemorySetTest() { - using namespace TNL::Arrays; + using namespace TNL::Containers; const int size( getTestSize() ); int *hostData, *deviceData; ArrayOperations< Devices::Host >::allocateMemory( hostData, size ); @@ -280,7 +280,7 @@ class ArrayOperationsTester< Element, Devices::Cuda > : public CppUnit :: TestCa void copyMemoryTest() { - using namespace TNL::Arrays; + using namespace TNL::Containers; const int size = getTestSize(); int *hostData1, *hostData2, *deviceData; @@ -298,7 +298,7 @@ class ArrayOperationsTester< Element, Devices::Cuda > : public CppUnit :: TestCa void copyMemoryWithConversionHostToCudaTest() { - using namespace TNL::Arrays; + using namespace TNL::Containers; const int size = getTestSize(); int *hostData1; float *hostData2, *deviceData; @@ -317,7 +317,7 @@ class ArrayOperationsTester< Element, Devices::Cuda > : public CppUnit :: TestCa void copyMemoryWithConversionCudaToHostTest() { - using namespace TNL::Arrays; + using namespace TNL::Containers; const int size = getTestSize(); int *hostData1, *deviceData; float *hostData2; @@ -336,7 +336,7 @@ class ArrayOperationsTester< Element, Devices::Cuda > : public CppUnit :: TestCa void copyMemoryWithConversionCudaToCudaTest() { - using namespace TNL::Arrays; + using namespace TNL::Containers; const int size = getTestSize(); int *hostData1, *deviceData1; float *hostData2, *deviceData2; @@ -358,7 +358,7 @@ class ArrayOperationsTester< Element, Devices::Cuda > : public CppUnit :: TestCa void compareMemoryHostCudaTest() { - using namespace TNL::Arrays; + using namespace TNL::Containers; const int size = getTestSize(); int *hostData, *deviceData; ArrayOperations< Devices::Host >::allocateMemory( hostData, size ); @@ -372,7 +372,7 @@ class ArrayOperationsTester< Element, Devices::Cuda > : public CppUnit :: TestCa void compareMemoryWithConversionHostCudaTest() { - using namespace TNL::Arrays; + using namespace TNL::Containers; const int size = getTestSize(); int *hostData; float *deviceData; diff --git a/tests/unit-tests/core/arrays/tnlArrayTester.h b/tests/unit-tests/core/arrays/tnlArrayTester.h index 0ea29cb20cf90fb52ffbb9fb1a291a5b1cdc94a9..00bd0b1dc7d4016316ba40b295a66a0f9cc79456 100644 --- a/tests/unit-tests/core/arrays/tnlArrayTester.h +++ b/tests/unit-tests/core/arrays/tnlArrayTester.h @@ -17,11 +17,11 @@ #include <cppunit/TestCaller.h> #include <cppunit/TestCase.h> #include <cppunit/Message.h> -#include <TNL/Arrays/Array.h> +#include <TNL/Containers/Array.h> #include <TNL/File.h> using namespace TNL; -using namespace TNL::Arrays; +using namespace TNL::Containers; #ifdef HAVE_CUDA template< typename ElementType, typename IndexType > @@ -117,7 +117,7 @@ class ArrayTester : public CppUnit :: TestCase void testSetGetElement() { - using namespace TNL::Arrays; + using namespace TNL::Containers; Array< ElementType, Device, IndexType > u; u. setSize( 10 ); for( int i = 0; i < 10; i ++ ) @@ -147,7 +147,7 @@ class ArrayTester : public CppUnit :: TestCase void testComparisonOperator() { - using namespace TNL::Arrays; + using namespace TNL::Containers; Array< ElementType, Device, IndexType > u; Array< ElementType, Device, IndexType > v; Array< ElementType, Device, IndexType > w; @@ -168,7 +168,7 @@ class ArrayTester : public CppUnit :: TestCase void testAssignmentOperator() { - using namespace TNL::Arrays; + using namespace TNL::Containers; Array< ElementType, Device, IndexType > u; Array< ElementType, Device, IndexType > v; u. setSize( 10 ); @@ -197,7 +197,7 @@ class ArrayTester : public CppUnit :: TestCase void testGetSize() { - using namespace TNL::Arrays; + using namespace TNL::Containers; Array< ElementType, Device, IndexType > u; const int maxSize = 10; for( int i = 0; i < maxSize; i ++ ) @@ -208,7 +208,7 @@ class ArrayTester : public CppUnit :: TestCase void testReset() { - using namespace TNL::Arrays; + using namespace TNL::Containers; Array< ElementType, Device, IndexType > u; u. setSize( 100 ); CPPUNIT_ASSERT( u. getSize() == 100 ); @@ -223,7 +223,7 @@ class ArrayTester : public CppUnit :: TestCase void testSetSizeAndDestructor() { - using namespace TNL::Arrays; + using namespace TNL::Containers; for( int i = 0; i < 100; i ++ ) { Array< ElementType, Device, IndexType > u; @@ -233,7 +233,7 @@ class ArrayTester : public CppUnit :: TestCase void testSaveAndLoad() { - using namespace TNL::Arrays; + using namespace TNL::Containers; Array< ElementType, Device, IndexType > v; v. setSize( 100 ); for( int i = 0; i < 100; i ++ ) @@ -251,7 +251,7 @@ class ArrayTester : public CppUnit :: TestCase void testUnusualStructures() { - using namespace TNL::Arrays; + using namespace TNL::Containers; Array< testingClassForArrayTester >u; }; diff --git a/tests/unit-tests/core/arrays/tnlMultiArrayTester.h b/tests/unit-tests/core/arrays/tnlMultiArrayTester.h index 02eb22fff149db78135e7b997822a05c9c3767f5..03999b7833f623b65ba68210de9f92a7f1dbfdba 100644 --- a/tests/unit-tests/core/arrays/tnlMultiArrayTester.h +++ b/tests/unit-tests/core/arrays/tnlMultiArrayTester.h @@ -18,7 +18,7 @@ #include <cppunit/TestCaller.h> #include <cppunit/TestCase.h> #include <cppunit/Message.h> -#include <TNL/Arrays/MultiArray.h> +#include <TNL/Containers/MultiArray.h> #include <TNL/File.h> using namespace TNL; @@ -81,52 +81,52 @@ class MultiArrayTester : public CppUnit :: TestCase void testConstructorDestructor() { - using namespace TNL::Arrays; + using namespace TNL::Containers; MultiArray< Dimensions, ElementType, Device, IndexType > u; } void testSetSize() { - using namespace TNL::Arrays; + using namespace TNL::Containers; MultiArray< Dimensions, ElementType, Device, IndexType > u, v; u. setDimensions( 10 ); v. setDimensions( 10 ); } - void setDiagonalElement( Arrays::MultiArray< 1, ElementType, Device, IndexType >& u, + void setDiagonalElement( Containers::MultiArray< 1, ElementType, Device, IndexType >& u, const IndexType& i, const ElementType& v ) { u.setElement( i, v ); } - void setDiagonalElement( Arrays::MultiArray< 2, ElementType, Device, IndexType >& u, + void setDiagonalElement( Containers::MultiArray< 2, ElementType, Device, IndexType >& u, const IndexType& i, const ElementType& v ) { u.setElement( i, i, v ); } - void setDiagonalElement( Arrays::MultiArray< 3, ElementType, Device, IndexType >& u, + void setDiagonalElement( Containers::MultiArray< 3, ElementType, Device, IndexType >& u, const IndexType& i, const ElementType& v ) { u.setElement( i, i, i, v ); } - IndexType getDiagonalElement( Arrays::MultiArray< 1, ElementType, Device, IndexType >& u, + IndexType getDiagonalElement( Containers::MultiArray< 1, ElementType, Device, IndexType >& u, const IndexType& i ) { return u.getElement( i ); } - IndexType getDiagonalElement( Arrays::MultiArray< 2, ElementType, Device, IndexType >& u, + IndexType getDiagonalElement( Containers::MultiArray< 2, ElementType, Device, IndexType >& u, const IndexType& i ) { return u.getElement( i, i ); } - IndexType getDiagonalElement( Arrays::MultiArray< 3, ElementType, Device, IndexType >& u, + IndexType getDiagonalElement( Containers::MultiArray< 3, ElementType, Device, IndexType >& u, const IndexType& i ) { return u.getElement( i, i, i ); @@ -135,7 +135,7 @@ class MultiArrayTester : public CppUnit :: TestCase void testSetGetElement() { - using namespace TNL::Arrays; + using namespace TNL::Containers; MultiArray< Dimensions, ElementType, Device, IndexType > u; u. setDimensions( 10 ); if( std::is_same< Device, Devices::Host >::value ) @@ -159,7 +159,7 @@ class MultiArrayTester : public CppUnit :: TestCase void testComparisonOperator() { - using namespace TNL::Arrays; + using namespace TNL::Containers; MultiArray< Dimensions, ElementType, Device, IndexType > u, v, w; u.setDimensions( 10 ); v.setDimensions( 10 ); @@ -181,7 +181,7 @@ class MultiArrayTester : public CppUnit :: TestCase void testEquivalenceOperator() { - using namespace TNL::Arrays; + using namespace TNL::Containers; MultiArray< Dimensions, ElementType, Device, IndexType > u; MultiArray< Dimensions, ElementType, Device, IndexType > v; u. setDimensions( 10 ); @@ -195,7 +195,7 @@ class MultiArrayTester : public CppUnit :: TestCase void testGetSize() { - using namespace TNL::Arrays; + using namespace TNL::Containers; MultiArray< Dimensions, ElementType, Device, IndexType > u; const int maxSize = 10; for( int i = 1; i < maxSize; i ++ ) @@ -206,7 +206,7 @@ class MultiArrayTester : public CppUnit :: TestCase void testReset() { - using namespace TNL::Arrays; + using namespace TNL::Containers; MultiArray< Dimensions, ElementType, Device, IndexType > u; u.setDimensions( 100 ); CPPUNIT_ASSERT( u. getDimensions().x() == 100 ); @@ -221,7 +221,7 @@ class MultiArrayTester : public CppUnit :: TestCase void testSetSizeAndDestructor() { - using namespace TNL::Arrays; + using namespace TNL::Containers; for( int i = 1; i < 100; i ++ ) { MultiArray< Dimensions, ElementType, Device, IndexType > u; @@ -231,7 +231,7 @@ class MultiArrayTester : public CppUnit :: TestCase void testSaveAndLoad() { - using namespace TNL::Arrays; + using namespace TNL::Containers; MultiArray< Dimensions, ElementType, Device, IndexType > v; const int size( 10 ); CPPUNIT_ASSERT( v. setDimensions( size ) ); diff --git a/tests/unit-tests/core/arrays/tnlSharedArrayTester.h b/tests/unit-tests/core/arrays/tnlSharedArrayTester.h index 38bee389dc0b703e5c69a7fbf4fb4696cbb7fba5..dbbb747147239b49e327afbd67eca4c2aaa7ce0a 100644 --- a/tests/unit-tests/core/arrays/tnlSharedArrayTester.h +++ b/tests/unit-tests/core/arrays/tnlSharedArrayTester.h @@ -16,7 +16,7 @@ #include <cppunit/TestCaller.h> #include <cppunit/TestCase.h> #include <cppunit/Message.h> -#include <TNL/Arrays/SharedArray.h> +#include <TNL/Containers/SharedArray.h> #include <TNL/File.h> using namespace TNL; diff --git a/tests/unit-tests/core/arrays/tnlStaticArrayTester.h b/tests/unit-tests/core/arrays/tnlStaticArrayTester.h index d597b3d79607f2c757a2eb293a2ddc1c71b5befe..8599a7c2fe9e4c9927965f1a23b4033f37b382ca 100644 --- a/tests/unit-tests/core/arrays/tnlStaticArrayTester.h +++ b/tests/unit-tests/core/arrays/tnlStaticArrayTester.h @@ -18,12 +18,12 @@ #include <cppunit/TestCaller.h> #include <cppunit/TestCase.h> #include <cppunit/Message.h> -#include <TNL/Arrays/StaticArray.h> -#include <TNL/Arrays/SharedArray.h> -#include <TNL/Arrays/ConstSharedArray.h> +#include <TNL/Containers/StaticArray.h> +#include <TNL/Containers/SharedArray.h> +#include <TNL/Containers/ConstSharedArray.h> using namespace TNL; -using namespace TNL::Arrays; +using namespace TNL::Containers; class testingClassForStaticArrayTester { diff --git a/tests/unit-tests/core/multimaps/tnlIndexMultimapTester.h b/tests/unit-tests/core/multimaps/tnlIndexMultimapTester.h index b41c2add34f79788ca5f96acaebb928938fc93f5..b7951a294bf75c0bf79c899d47dba6a0e1c8a125 100644 --- a/tests/unit-tests/core/multimaps/tnlIndexMultimapTester.h +++ b/tests/unit-tests/core/multimaps/tnlIndexMultimapTester.h @@ -18,7 +18,7 @@ #include <cppunit/TestCase.h> #include <cppunit/Message.h> #include <TNL/File.h> -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> using namespace TNL; diff --git a/tests/unit-tests/core/tnl-cuda-kernels.h b/tests/unit-tests/core/tnl-cuda-kernels.h index 0bcc25d3620e2e4267e6a471f71cac80eaa75d7f..357f52ff4a17f5efc3a6ef895336b0fee8ce2d94 100644 --- a/tests/unit-tests/core/tnl-cuda-kernels.h +++ b/tests/unit-tests/core/tnl-cuda-kernels.h @@ -12,7 +12,7 @@ #define Devices::CudaKERNELS_H_ #include <TNL/Assert.h> -#include <TNL/Vectors/VectorCUDA.h> +#include <TNL/Containers/VectorCUDA.h> #include <TNL/core/low-level/cuda-long-vector-kernels.h> #include <TNL/legacy/core/Devices::CudaSupport.h> diff --git a/tests/unit-tests/core/tnlCUDAKernelsTester.h b/tests/unit-tests/core/tnlCUDAKernelsTester.h index b8510dbee349613afb423f9c8d7b1c572f06ae5c..23160c883edd7d5b51bf466ecb9f02734ca6cc5a 100644 --- a/tests/unit-tests/core/tnlCUDAKernelsTester.h +++ b/tests/unit-tests/core/tnlCUDAKernelsTester.h @@ -17,8 +17,8 @@ #include <cppunit/TestResult.h> #include <cppunit/TestCaller.h> #include <cppunit/TestCase.h> -#include <TNL/Vectors/VectorCUDA.h> -#include <TNL/Vectors/VectorHost.h> +#include <TNL/Containers/VectorCUDA.h> +#include <TNL/Containers/VectorHost.h> #include <TNL/core/mfuncs.h> #ifdef HAVE_CUDA diff --git a/tests/unit-tests/core/tnlUniquePointerTester.h b/tests/unit-tests/core/tnlUniquePointerTester.h index e253670e651afff0fe00ec60e35f91b6eccbe8f6..de77b88d830c40c13652a8342fc0bd4f57a8ffc5 100644 --- a/tests/unit-tests/core/tnlUniquePointerTester.h +++ b/tests/unit-tests/core/tnlUniquePointerTester.h @@ -24,7 +24,7 @@ #include <cppunit/TestCase.h> #include <cppunit/Message.h> #include <TNL/UniquePointer.h> -#include <TNL/Arrays/StaticArray.h> +#include <TNL/Containers/StaticArray.h> using namespace TNL; @@ -51,7 +51,7 @@ class tnlUniquePointerTester : public CppUnit :: TestCase void testConstructor() { - typedef TNL::Arrays::StaticArray< 2, int > TestType; + typedef TNL::Containers::StaticArray< 2, int > TestType; tnlUniquePointer< TestType, Devices::Host > ptr1; diff --git a/tests/unit-tests/core/vectors/tnlSharedVectorTester.h b/tests/unit-tests/core/vectors/tnlSharedVectorTester.h index a30cb0aa4aaa1303c411a99c9f90ec2bd61d2b56..5fa366b3303479f131fcd97267e76551e7836595 100644 --- a/tests/unit-tests/core/vectors/tnlSharedVectorTester.h +++ b/tests/unit-tests/core/vectors/tnlSharedVectorTester.h @@ -16,7 +16,7 @@ #include <cppunit/TestCaller.h> #include <cppunit/TestCase.h> #include <cppunit/Message.h> -#include <TNL/Vectors/SharedVector.h> +#include <TNL/Containers/SharedVector.h> #include <TNL/File.h> using namespace TNL; diff --git a/tests/unit-tests/core/vectors/tnlStaticVectorTester.h b/tests/unit-tests/core/vectors/tnlStaticVectorTester.h index 40c68ffcff004b5acdb29a6afc29de4be4790e2d..7a3702feb0159e777109a5fe83990c93439da647 100644 --- a/tests/unit-tests/core/vectors/tnlStaticVectorTester.h +++ b/tests/unit-tests/core/vectors/tnlStaticVectorTester.h @@ -17,7 +17,7 @@ #include <cppunit/TestCaller.h> #include <cppunit/TestCase.h> #include <cppunit/Message.h> -#include <TNL/Vectors/StaticVector.h> +#include <TNL/Containers/StaticVector.h> using namespace TNL; @@ -44,7 +44,7 @@ class StaticVectorTester : public CppUnit :: TestCase void testOperators() { - Vectors::StaticVector< Size, RealType > u1( 1.0 ), u2( 2.0 ), u3( 3.0 ); + Containers::StaticVector< Size, RealType > u1( 1.0 ), u2( 2.0 ), u3( 3.0 ); u1 += u2; CPPUNIT_ASSERT( u1[ 0 ] == 3.0 ); diff --git a/tests/unit-tests/core/vectors/tnlVectorCUDATester.h b/tests/unit-tests/core/vectors/tnlVectorCUDATester.h index 36ef3181d5263f95ef2ce41237b4568fe8fdfc46..2d2f284b06c50bd93bdbc25eb75910fecb6391e0 100644 --- a/tests/unit-tests/core/vectors/tnlVectorCUDATester.h +++ b/tests/unit-tests/core/vectors/tnlVectorCUDATester.h @@ -19,8 +19,8 @@ #include <cppunit/TestCaller.h> #include <cppunit/TestCase.h> #include <cppunit/Message.h> -#include <TNL/Vectors/VectorCUDA.h> -#include <TNL/Vectors/VectorHost.h> +#include <TNL/Containers/VectorCUDA.h> +#include <TNL/Containers/VectorHost.h> #ifdef HAVE_CUDA //int mainTest(); diff --git a/tests/unit-tests/core/vectors/tnlVectorHostTester.h b/tests/unit-tests/core/vectors/tnlVectorHostTester.h index 1d0f0df467e9f30fcd6d5657cd94b62f4ef7816e..9fb764d971e840ddd22f1a51d4af38642770eb67 100644 --- a/tests/unit-tests/core/vectors/tnlVectorHostTester.h +++ b/tests/unit-tests/core/vectors/tnlVectorHostTester.h @@ -18,7 +18,7 @@ #include <cppunit/TestCaller.h> #include <cppunit/TestCase.h> #include <cppunit/Message.h> -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #include <TNL/File.h> using namespace TNL; diff --git a/tests/unit-tests/core/vectors/tnlVectorOperationsTester.h b/tests/unit-tests/core/vectors/tnlVectorOperationsTester.h index 3d968d3223357c9e4f5b0e56b8d091f07907fdcf..de1a3190f9a970393e711dca2bfd1a02a3d2ea79 100644 --- a/tests/unit-tests/core/vectors/tnlVectorOperationsTester.h +++ b/tests/unit-tests/core/vectors/tnlVectorOperationsTester.h @@ -20,11 +20,11 @@ #include <cppunit/TestCase.h> #include <cppunit/Message.h> -#include <TNL/Vectors/Vector.h> -#include <TNL/Vectors/VectorOperations.h> +#include <TNL/Containers/Vector.h> +#include <TNL/Containers/VectorOperations.h> using namespace TNL; -using namespace TNL::Arrays; +using namespace TNL::Containers; template< typename Real, typename Device > class VectorOperationsTester : public CppUnit :: TestCase @@ -69,7 +69,7 @@ class VectorOperationsTester : public CppUnit :: TestCase template< typename Vector > void setLinearSequence( Vector& deviceVector ) { - Vectors::Vector< typename Vector :: RealType, Devices::Host > a; + Containers::Vector< typename Vector :: RealType, Devices::Host > a; a. setSize( deviceVector. getSize() ); for( int i = 0; i < a. getSize(); i ++ ) a. getData()[ i ] = i; @@ -88,7 +88,7 @@ class VectorOperationsTester : public CppUnit :: TestCase template< typename Vector > void setOnesSequence( Vector& deviceVector ) { - Vectors::Vector< typename Vector :: RealType, Devices::Host > a; + Containers::Vector< typename Vector :: RealType, Devices::Host > a; a. setSize( deviceVector. getSize() ); for( int i = 0; i < a. getSize(); i ++ ) a. getData()[ i ] = 1; @@ -107,7 +107,7 @@ class VectorOperationsTester : public CppUnit :: TestCase template< typename Vector > void setNegativeLinearSequence( Vector& deviceVector ) { - Vectors::Vector< typename Vector :: RealType, Devices::Host > a; + Containers::Vector< typename Vector :: RealType, Devices::Host > a; a. setSize( deviceVector. getSize() ); for( int i = 0; i < a. getSize(); i ++ ) a. getData()[ i ] = -i; @@ -126,7 +126,7 @@ class VectorOperationsTester : public CppUnit :: TestCase void setOscilatingSequence( Vector& deviceVector, typename Vector::RealType v ) { - Vectors::Vector< typename Vector::RealType, Devices::Host > a; + Containers::Vector< typename Vector::RealType, Devices::Host > a; a.setSize( deviceVector. getSize() ); a[ 0 ] = v; for( int i = 1; i < a. getSize(); i ++ ) @@ -146,150 +146,150 @@ class VectorOperationsTester : public CppUnit :: TestCase void getVectorMaxTest() { const int size( 123456 ); - Vectors::Vector< Real, Device > v; + Containers::Vector< Real, Device > v; v. setSize( size ); setLinearSequence( v ); - CPPUNIT_ASSERT( Vectors::VectorOperations< Device > :: getVectorMax( v ) == size - 1 ); + CPPUNIT_ASSERT( Containers::VectorOperations< Device > :: getVectorMax( v ) == size - 1 ); } void getVectorMinTest() { const int size( 123456 ); - Vectors::Vector< Real, Device > v; + Containers::Vector< Real, Device > v; v. setSize( size ); setLinearSequence( v ); - CPPUNIT_ASSERT( Vectors::VectorOperations< Device > :: getVectorMin( v ) == 0 ); + CPPUNIT_ASSERT( Containers::VectorOperations< Device > :: getVectorMin( v ) == 0 ); } void getVectorAbsMaxTest() { const int size( 123456 ); - Vectors::Vector< Real, Device > v; + Containers::Vector< Real, Device > v; v. setSize( size ); setNegativeLinearSequence( v ); - CPPUNIT_ASSERT( Vectors::VectorOperations< Device > :: getVectorAbsMax( v ) == size - 1 ); + CPPUNIT_ASSERT( Containers::VectorOperations< Device > :: getVectorAbsMax( v ) == size - 1 ); } void getVectorAbsMinTest() { const int size( 123456 ); - Vectors::Vector< Real, Device > v; + Containers::Vector< Real, Device > v; v. setSize( size ); setNegativeLinearSequence( v ); - CPPUNIT_ASSERT( Vectors::VectorOperations< Device > :: getVectorAbsMin( v ) == 0 ); + CPPUNIT_ASSERT( Containers::VectorOperations< Device > :: getVectorAbsMin( v ) == 0 ); } void getVectorLpNormTest() { const int size( 123456 ); - Vectors::Vector< Real, Device > v; + Containers::Vector< Real, Device > v; v. setSize( size ); setOnesSequence( v ); - CPPUNIT_ASSERT( Vectors::VectorOperations< Device > :: getVectorLpNorm( v, 2.0 ) == ::sqrt( size ) ); + CPPUNIT_ASSERT( Containers::VectorOperations< Device > :: getVectorLpNorm( v, 2.0 ) == ::sqrt( size ) ); } void getVectorSumTest() { const int size( 123456 ); - Vectors::Vector< Real, Device > v; + Containers::Vector< Real, Device > v; v. setSize( size ); setOnesSequence( v ); - CPPUNIT_ASSERT( Vectors::VectorOperations< Device > :: getVectorSum( v ) == size ); + CPPUNIT_ASSERT( Containers::VectorOperations< Device > :: getVectorSum( v ) == size ); setLinearSequence( v ); - CPPUNIT_ASSERT( Vectors::VectorOperations< Device > :: getVectorSum( v ) == ( ( Real ) size ) * ( ( Real ) size - 1 ) / 2 ); + CPPUNIT_ASSERT( Containers::VectorOperations< Device > :: getVectorSum( v ) == ( ( Real ) size ) * ( ( Real ) size - 1 ) / 2 ); } void getVectorDifferenceMaxTest() { const int size( 123456 ); - Vectors::Vector< Real, Device > u, v; + Containers::Vector< Real, Device > u, v; u. setSize( size ); v. setSize( size ); setLinearSequence( u ); setOnesSequence( v ); - CPPUNIT_ASSERT( Vectors::VectorOperations< Device > :: getVectorDifferenceMax( u, v ) == size - 2 ); + CPPUNIT_ASSERT( Containers::VectorOperations< Device > :: getVectorDifferenceMax( u, v ) == size - 2 ); } void getVectorDifferenceMinTest() { const int size( 123456 ); - Vectors::Vector< Real, Device > u, v; + Containers::Vector< Real, Device > u, v; u. setSize( size ); v. setSize( size ); setLinearSequence( u ); setOnesSequence( v ); - CPPUNIT_ASSERT( Vectors::VectorOperations< Device > :: getVectorDifferenceMin( u, v ) == -1 ); - CPPUNIT_ASSERT( Vectors::VectorOperations< Device > :: getVectorDifferenceMin( v, u ) == -123454 ); + CPPUNIT_ASSERT( Containers::VectorOperations< Device > :: getVectorDifferenceMin( u, v ) == -1 ); + CPPUNIT_ASSERT( Containers::VectorOperations< Device > :: getVectorDifferenceMin( v, u ) == -123454 ); } void getVectorDifferenceAbsMaxTest() { const int size( 123456 ); - Vectors::Vector< Real, Device > u, v; + Containers::Vector< Real, Device > u, v; u. setSize( size ); v. setSize( size ); setNegativeLinearSequence( u ); setOnesSequence( v ); - CPPUNIT_ASSERT( Vectors::VectorOperations< Device > :: getVectorDifferenceAbsMax( u, v ) == size ); + CPPUNIT_ASSERT( Containers::VectorOperations< Device > :: getVectorDifferenceAbsMax( u, v ) == size ); } void getVectorDifferenceAbsMinTest() { const int size( 123456 ); - Vectors::Vector< Real, Device > u, v; + Containers::Vector< Real, Device > u, v; u. setSize( size ); v. setSize( size ); setLinearSequence( u ); setOnesSequence( v ); - CPPUNIT_ASSERT( Vectors::VectorOperations< Device > :: getVectorDifferenceAbsMin( u, v ) == 0 ); - CPPUNIT_ASSERT( Vectors::VectorOperations< Device > :: getVectorDifferenceAbsMin( v, u ) == 0 ); + CPPUNIT_ASSERT( Containers::VectorOperations< Device > :: getVectorDifferenceAbsMin( u, v ) == 0 ); + CPPUNIT_ASSERT( Containers::VectorOperations< Device > :: getVectorDifferenceAbsMin( v, u ) == 0 ); } void getVectorDifferenceLpNormTest() { const int size( 1024 ); - Vectors::Vector< Real, Device > u, v; + Containers::Vector< Real, Device > u, v; u. setSize( size ); v. setSize( size ); u. setValue( 3.0 ); v. setValue( 1.0 ); - CPPUNIT_ASSERT( Vectors::VectorOperations< Device > :: getVectorDifferenceLpNorm( u, v, 1.0 ) == 2.0 * size ); - CPPUNIT_ASSERT( Vectors::VectorOperations< Device > :: getVectorDifferenceLpNorm( u, v, 2.0 ) == ::sqrt( 4.0 * size ) ); + CPPUNIT_ASSERT( Containers::VectorOperations< Device > :: getVectorDifferenceLpNorm( u, v, 1.0 ) == 2.0 * size ); + CPPUNIT_ASSERT( Containers::VectorOperations< Device > :: getVectorDifferenceLpNorm( u, v, 2.0 ) == ::sqrt( 4.0 * size ) ); } void getVectorDifferenceSumTest() { const int size( 1024 ); - Vectors::Vector< Real, Device > u, v; + Containers::Vector< Real, Device > u, v; u. setSize( size ); v. setSize( size ); u. setValue( 3.0 ); v. setValue( 1.0 ); - CPPUNIT_ASSERT( Vectors::VectorOperations< Device > :: getVectorDifferenceSum( u, v ) == 2.0 * size ); + CPPUNIT_ASSERT( Containers::VectorOperations< Device > :: getVectorDifferenceSum( u, v ) == 2.0 * size ); } void vectorScalarMultiplicationTest() { const int size( 1025 ); - Vectors::Vector< Real, Device > u; + Containers::Vector< Real, Device > u; u. setSize( size ); setLinearSequence( u ); - Vectors::VectorOperations< Device >::vectorScalarMultiplication( u, 3.0 ); + Containers::VectorOperations< Device >::vectorScalarMultiplication( u, 3.0 ); for( int i = 0; i < size; i++ ) CPPUNIT_ASSERT( u.getElement( i ) == 3.0 * i ); @@ -298,24 +298,24 @@ class VectorOperationsTester : public CppUnit :: TestCase void getVectorScalarProductTest() { const int size( 1025 ); - Vectors::Vector< Real, Device > u, v; + Containers::Vector< Real, Device > u, v; u. setSize( size ); v. setSize( size ); setOscilatingSequence( u, 1.0 ); setOnesSequence( v ); - CPPUNIT_ASSERT( Vectors::VectorOperations< Device > :: getScalarProduct( u, v ) == 1.0 ); + CPPUNIT_ASSERT( Containers::VectorOperations< Device > :: getScalarProduct( u, v ) == 1.0 ); } void addVectorTest() { const int size( 10000 ); - Vectors::Vector< Real, Device > x, y; + Containers::Vector< Real, Device > x, y; x.setSize( size ); y.setSize( size ); setLinearSequence( x ); setOnesSequence( y ); - Vectors::VectorOperations< Device >::addVector( y, x, 3.0 ); + Containers::VectorOperations< Device >::addVector( y, x, 3.0 ); for( int i = 0; i < size; i ++ ) CPPUNIT_ASSERT( y.getElement( i ) == 1.0 + 3.0 * i ); @@ -369,7 +369,7 @@ class VectorOperationsTester : public CppUnit :: TestCase void prefixSumTest() { const int size( 10000 ); - Vectors::Vector< Real, Device > v; + Containers::Vector< Real, Device > v; v.setSize( size ); setOnesSequence( v ); @@ -392,7 +392,7 @@ class VectorOperationsTester : public CppUnit :: TestCase void exclusivePrefixSumTest() { const int size( 10000 ); - Vectors::Vector< Real, Device > v; + Containers::Vector< Real, Device > v; v.setSize( size ); setOnesSequence( v ); diff --git a/tests/unit-tests/core/vectors/tnlVectorTester.h b/tests/unit-tests/core/vectors/tnlVectorTester.h index 82b3f42a5ec9478c63b3fdf2408d833ee904218d..90db1511592f36c5c711c1b794f36276ec9185d6 100644 --- a/tests/unit-tests/core/vectors/tnlVectorTester.h +++ b/tests/unit-tests/core/vectors/tnlVectorTester.h @@ -17,7 +17,7 @@ #include <cppunit/TestCaller.h> #include <cppunit/TestCase.h> #include <cppunit/Message.h> -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #include <TNL/File.h> #include <TNL/core/mfuncs.h> @@ -28,7 +28,7 @@ class VectorTester : public CppUnit :: TestCase { public: - typedef Vectors::Vector< RealType, Device, IndexType > VectorType; + typedef Containers::Vector< RealType, Device, IndexType > VectorType; typedef VectorTester< RealType, Device, IndexType > TesterType; typedef typename CppUnit::TestCaller< TesterType > TestCallerType; @@ -62,7 +62,7 @@ class VectorTester : public CppUnit :: TestCase void testMax() { - Vectors::Vector< RealType, Device, IndexType > v; + Containers::Vector< RealType, Device, IndexType > v; v. setSize( 10 ); for( int i = 0; i < 10; i ++ ) v. setElement( i, i ); @@ -71,7 +71,7 @@ class VectorTester : public CppUnit :: TestCase void testMin() { - Vectors::Vector< RealType, Device, IndexType > v; + Containers::Vector< RealType, Device, IndexType > v; v. setSize( 10 ); for( int i = 0; i < 10; i ++ ) v. setElement( i, i ); @@ -80,7 +80,7 @@ class VectorTester : public CppUnit :: TestCase void testAbsMax() { - Vectors::Vector< RealType, Device, IndexType > v; + Containers::Vector< RealType, Device, IndexType > v; v. setSize( 10 ); for( int i = 0; i < 10; i ++ ) v.setElement( i, -i ); @@ -89,7 +89,7 @@ class VectorTester : public CppUnit :: TestCase void testAbsMin() { - Vectors::Vector< RealType, Device, IndexType > v; + Containers::Vector< RealType, Device, IndexType > v; v. setSize( 10 ); for( int i = 0; i < 10; i ++ ) v.setElement( i, -i ); @@ -98,7 +98,7 @@ class VectorTester : public CppUnit :: TestCase void testLpNorm() { - Vectors::Vector< RealType, Device, IndexType > v; + Containers::Vector< RealType, Device, IndexType > v; v. setSize( 10 ); for( int i = 0; i < 10; i ++ ) v.setElement( i, -2 ); @@ -109,7 +109,7 @@ class VectorTester : public CppUnit :: TestCase void testSum() { - Vectors::Vector< RealType, Device, IndexType > v; + Containers::Vector< RealType, Device, IndexType > v; v. setSize( 10 ); for( int i = 0; i < 10; i ++ ) v.setElement( i, -2 ); @@ -122,7 +122,7 @@ class VectorTester : public CppUnit :: TestCase void testDifferenceMax() { - Vectors::Vector< RealType, Device, IndexType > v1, v2; + Containers::Vector< RealType, Device, IndexType > v1, v2; v1. setSize( 10 ); v2. setSize( 10 ); for( int i = 0; i < 10; i ++ ) @@ -135,7 +135,7 @@ class VectorTester : public CppUnit :: TestCase void testDifferenceMin() { - Vectors::Vector< RealType, Device, IndexType > v1, v2; + Containers::Vector< RealType, Device, IndexType > v1, v2; v1. setSize( 10 ); v2. setSize( 10 ); for( int i = 0; i < 10; i ++ ) @@ -148,7 +148,7 @@ class VectorTester : public CppUnit :: TestCase void testDifferenceAbsMax() { - Vectors::Vector< RealType, Device, IndexType > v1, v2; + Containers::Vector< RealType, Device, IndexType > v1, v2; v1. setSize( 10 ); v2. setSize( 10 ); for( int i = 0; i < 10; i ++ ) @@ -161,7 +161,7 @@ class VectorTester : public CppUnit :: TestCase void testDifferenceAbsMin() { - Vectors::Vector< RealType, Device, IndexType > v1, v2; + Containers::Vector< RealType, Device, IndexType > v1, v2; v1. setSize( 10 ); v2. setSize( 10 ); for( int i = 0; i < 10; i ++ ) @@ -174,7 +174,7 @@ class VectorTester : public CppUnit :: TestCase void testDifferenceLpNorm() { - Vectors::Vector< RealType, Device, IndexType > v1, v2; + Containers::Vector< RealType, Device, IndexType > v1, v2; v1. setSize( 10 ); v2. setSize( 10 ); for( int i = 0; i < 10; i ++ ) @@ -189,7 +189,7 @@ class VectorTester : public CppUnit :: TestCase void testDifferenceSum() { - Vectors::Vector< RealType, Device, IndexType > v1, v2; + Containers::Vector< RealType, Device, IndexType > v1, v2; v1. setSize( 10 ); v2. setSize( 10 ); for( int i = 0; i < 10; i ++ ) @@ -202,7 +202,7 @@ class VectorTester : public CppUnit :: TestCase void testScalarMultiplication() { - Vectors::Vector< RealType, Device, IndexType > v; + Containers::Vector< RealType, Device, IndexType > v; v. setSize( 10 ); for( int i = 0; i < 10; i ++ ) v.setElement( i, i ); @@ -214,7 +214,7 @@ class VectorTester : public CppUnit :: TestCase void testScalarProduct() { - Vectors::Vector< RealType, Device, IndexType > v1, v2; + Containers::Vector< RealType, Device, IndexType > v1, v2; v1. setSize( 10 ); v2. setSize( 10 ); v1.setElement( 0, -1 ); @@ -229,7 +229,7 @@ class VectorTester : public CppUnit :: TestCase void addVectorTest() { - Vectors::Vector< RealType, Device, IndexType > v1, v2; + Containers::Vector< RealType, Device, IndexType > v1, v2; v1. setSize( 10 ); v2. setSize( 10 ); for( int i = 0; i < 10; i ++ ) diff --git a/tests/unit-tests/matrices/tnlChunkedEllpackMatrixTester.h b/tests/unit-tests/matrices/tnlChunkedEllpackMatrixTester.h index 68f5983539a3e05e209cfcdf621806c1d44f396b..f5acdf0f5dabe2b7c47e6bec9e63ce5da38e3b9f 100644 --- a/tests/unit-tests/matrices/tnlChunkedEllpackMatrixTester.h +++ b/tests/unit-tests/matrices/tnlChunkedEllpackMatrixTester.h @@ -19,7 +19,7 @@ #include <cppunit/Message.h> #include <TNL/Matrices/ChunkedEllpack.h> #include <TNL/File.h> -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> using namespace TNL; diff --git a/tests/unit-tests/matrices/tnlDenseMatrixTester.h b/tests/unit-tests/matrices/tnlDenseMatrixTester.h index f823ada62c130e1bed58ace837b1e8f732ebc8eb..7e7d0db2ec32600180c573b8ce569f85eb213363 100644 --- a/tests/unit-tests/matrices/tnlDenseMatrixTester.h +++ b/tests/unit-tests/matrices/tnlDenseMatrixTester.h @@ -19,7 +19,7 @@ #include <cppunit/Message.h> #include <TNL/Matrices/Dense.h> #include <TNL/File.h> -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #ifdef HAVE_CUDA template< typename RealType, typename IndexType > @@ -40,7 +40,7 @@ class DenseTester : public CppUnit :: TestCase { public: typedef Matrices::Dense< RealType, Device, IndexType > MatrixType; - typedef Vectors::Vector< RealType, Device, IndexType > VectorType; + typedef Containers::Vector< RealType, Device, IndexType > VectorType; typedef DenseTester< RealType, Device, IndexType > TesterType; typedef typename CppUnit::TestCaller< TesterType > TestCallerType; @@ -169,8 +169,8 @@ class DenseTester : public CppUnit :: TestCase for( int i = 0; i < 10; i++ ) m.setElement( i, i, i ); - Vectors::Vector< IndexType, Devices::Host, IndexType > columns; - Vectors::Vector< RealType, Devices::Host, IndexType > values; + Containers::Vector< IndexType, Devices::Host, IndexType > columns; + Containers::Vector< RealType, Devices::Host, IndexType > values; columns.setSize( 10 ); values.setSize( 10 ); for( IndexType i = 0; i < 10; i++ ) @@ -201,8 +201,8 @@ class DenseTester : public CppUnit :: TestCase for( int i = 0; i < 10; i++ ) m.setElement( i, i, i ); - Vectors::Vector< IndexType, Device, IndexType > columns; - Vectors::Vector< RealType, Device, IndexType > values; + Containers::Vector< IndexType, Device, IndexType > columns; + Containers::Vector< RealType, Device, IndexType > values; columns.setSize( 10 ); values.setSize( 10 ); for( IndexType i = 0; i < 10; i++ ) diff --git a/tests/unit-tests/matrices/tnlEllpackMatrixTester.h b/tests/unit-tests/matrices/tnlEllpackMatrixTester.h index 6943c65eaf875cf98a5457fb9bcb535ee9b964c0..d4042a6465b52118d6ec1c18cf97bed0b794d349 100644 --- a/tests/unit-tests/matrices/tnlEllpackMatrixTester.h +++ b/tests/unit-tests/matrices/tnlEllpackMatrixTester.h @@ -19,7 +19,7 @@ #include <cppunit/Message.h> #include <TNL/Matrices/Ellpack.h> #include <TNL/File.h> -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> using namespace TNL; diff --git a/tests/unit-tests/matrices/tnlMultidiagonalMatrixTester.h b/tests/unit-tests/matrices/tnlMultidiagonalMatrixTester.h index 695e45c255b9ccd979922642e17c10dd20095ab0..97625204403ca51be71b80b522de7b1c2048c476 100644 --- a/tests/unit-tests/matrices/tnlMultidiagonalMatrixTester.h +++ b/tests/unit-tests/matrices/tnlMultidiagonalMatrixTester.h @@ -19,8 +19,8 @@ #include <cppunit/Message.h> #include <TNL/Matrices/Multidiagonal.h> #include <TNL/File.h> -#include <TNL/Vectors/Vector.h> -#include <TNL/Vectors/SharedVector.h> +#include <TNL/Containers/Vector.h> +#include <TNL/Containers/SharedVector.h> using namespace TNL; @@ -29,7 +29,7 @@ class MultidiagonalTester : public CppUnit :: TestCase { public: typedef Matrices::Multidiagonal< RealType, Device, IndexType > MatrixType; - typedef Vectors::Vector< RealType, Device, IndexType > VectorType; + typedef Containers::Vector< RealType, Device, IndexType > VectorType; typedef MultidiagonalTester< RealType, Device, IndexType > TesterType; typedef typename CppUnit::TestCaller< TesterType > TestCallerType; @@ -70,7 +70,7 @@ class MultidiagonalTester : public CppUnit :: TestCase MatrixType m1, m2; m1.setDimensions( 10, 10 ); IndexType diagonalsShift[] {-2, -1, 0, 1, 2 }; - m1.setDiagonals( Vectors::SharedVector< IndexType >( diagonalsShift, 5 ) ); + m1.setDiagonals( Containers::SharedVector< IndexType >( diagonalsShift, 5 ) ); m2.setLike( m1 ); CPPUNIT_ASSERT( m1.getRows() == m2.getRows() ); } @@ -81,7 +81,7 @@ class MultidiagonalTester : public CppUnit :: TestCase MatrixType m; m.setDimensions( size, size ); IndexType diagonalsShift[] = { -5, -2, -1, 0, 1, 2, 5 }; - m.setDiagonals( Vectors::SharedVector< IndexType >( diagonalsShift, 7 ) ); + m.setDiagonals( Containers::SharedVector< IndexType >( diagonalsShift, 7 ) ); m.setValue( 1.0 ); for( int i = 0; i < size; i++ ) for( int j = 0; j < size; j++ ) @@ -96,7 +96,7 @@ class MultidiagonalTester : public CppUnit :: TestCase MatrixType m; m.setDimensions( 10, 10 ); IndexType diagonalsShift[] = { -5, -2, -1, 0, 1, 2, 5 }; - m.setDiagonals( Vectors::SharedVector< IndexType>( diagonalsShift, 7 ) ); + m.setDiagonals( Containers::SharedVector< IndexType>( diagonalsShift, 7 ) ); for( int i = 0; i < 10; i++ ) m.setElement( i, i, i ); @@ -113,7 +113,7 @@ class MultidiagonalTester : public CppUnit :: TestCase MatrixType m; m.setDimensions( 10, 10 ); IndexType diagonalsShift[] = { -4, -2, -1, 0, 1, 2, 4 }; - m.setDiagonals( Vectors::SharedVector< IndexType >( diagonalsShift, 7 ) ); + m.setDiagonals( Containers::SharedVector< IndexType >( diagonalsShift, 7 ) ); for( int i = 0; i < 10; i++ ) m.setElement( i, i, i ); for( int i = 0; i < 10; i++ ) @@ -137,7 +137,7 @@ class MultidiagonalTester : public CppUnit :: TestCase MatrixType m; m.setDimensions( 10, 10 ); IndexType diagonalsShift[] = { -4, -2, -1, 0, 1, 2, 4 }; - m.setDiagonals( Vectors::SharedVector< IndexType >( diagonalsShift, 7 ) ); + m.setDiagonals( Containers::SharedVector< IndexType >( diagonalsShift, 7 ) ); for( int i = 0; i < 10; i++ ) m.setElement( i, i, i ); RealType rowValues[] = { 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0 }; @@ -164,7 +164,7 @@ class MultidiagonalTester : public CppUnit :: TestCase MatrixType m; m.setDimensions( 10, 10 ); IndexType diagonalsShift[] = { -4, -2, -1, 0, 1, 2, 4 }; - m.setDiagonals( Vectors::SharedVector< IndexType >( diagonalsShift, 7 ) ); + m.setDiagonals( Containers::SharedVector< IndexType >( diagonalsShift, 7 ) ); for( int i = 0; i < 10; i++ ) m.setElement( i, i, i ); RealType rowValues[] = { 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0 }; @@ -195,7 +195,7 @@ class MultidiagonalTester : public CppUnit :: TestCase MatrixType m; m.setDimensions( size, size ); IndexType diagonalsShift[] = { -4, -2, -1, 0, 1, 2, 4 }; - m.setDiagonals( Vectors::SharedVector< IndexType >( diagonalsShift, 7 ) ); + m.setDiagonals( Containers::SharedVector< IndexType >( diagonalsShift, 7 ) ); for( int i = 0; i < size; i++ ) { v.setElement( i, i ); @@ -217,7 +217,7 @@ class MultidiagonalTester : public CppUnit :: TestCase MatrixType m; m.setDimensions( 10, 10 ); IndexType diagonalsShift[] = { -2, -1, 0, 1, 2, 3 }; - m.setDiagonals( Vectors::SharedVector< IndexType >( diagonalsShift, 6 ) ); + m.setDiagonals( Containers::SharedVector< IndexType >( diagonalsShift, 6 ) ); for( int row = 0; row < size; row++ ) for( int diagonal = 0; diagonal < 6; diagonal++ ) diff --git a/tests/unit-tests/matrices/tnlSlicedEllpackMatrixTester.h b/tests/unit-tests/matrices/tnlSlicedEllpackMatrixTester.h index 5ab0658c5c248c50b23c3e27d18fdd475ec19827..4a4cb7bac11f669cb68628f56b7b166c5cfc6e6c 100644 --- a/tests/unit-tests/matrices/tnlSlicedEllpackMatrixTester.h +++ b/tests/unit-tests/matrices/tnlSlicedEllpackMatrixTester.h @@ -19,7 +19,7 @@ #include <cppunit/Message.h> #include <TNL/Matrices/SlicedEllpack.h> #include <TNL/File.h> -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> using namespace TNL; diff --git a/tests/unit-tests/matrices/tnlSparseMatrixTester.h b/tests/unit-tests/matrices/tnlSparseMatrixTester.h index ed3a1315276a8a0506c2b5836871db6c278fa447..ea1fd9c9ff0a7e883a56ae2792c161267a3c2863 100644 --- a/tests/unit-tests/matrices/tnlSparseMatrixTester.h +++ b/tests/unit-tests/matrices/tnlSparseMatrixTester.h @@ -18,7 +18,7 @@ #include <cppunit/TestCase.h> #include <cppunit/Message.h> #include <TNL/File.h> -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #endif using namespace TNL; @@ -92,8 +92,8 @@ class SparseTester : public CppUnit :: TestCase typedef typename Matrix::RealType RealType; typedef typename Matrix::DeviceType DeviceType; typedef typename Matrix::IndexType IndexType; - typedef Vectors::Vector< RealType, DeviceType, IndexType > VectorType; - typedef Vectors::Vector< IndexType, DeviceType, IndexType > IndexVector; + typedef Containers::Vector< RealType, DeviceType, IndexType > VectorType; + typedef Containers::Vector< IndexType, DeviceType, IndexType > IndexVector; typedef SparseTester< MatrixType, MatrixSetup > TesterType; typedef SparseTesterMatrixSetter< MatrixType, MatrixSetup > MatrixSetter; typedef typename CppUnit::TestCaller< TesterType > TestCallerType; diff --git a/tests/unit-tests/matrices/tnlTridiagonalMatrixTester.h b/tests/unit-tests/matrices/tnlTridiagonalMatrixTester.h index ef8bf742fc8fd4a566c9cf47d628848be943f307..081cef0659b198a7f239f832d0fec352c6b313ac 100644 --- a/tests/unit-tests/matrices/tnlTridiagonalMatrixTester.h +++ b/tests/unit-tests/matrices/tnlTridiagonalMatrixTester.h @@ -19,7 +19,7 @@ #include <cppunit/Message.h> #include <TNL/Matrices/Tridiagonal.h> #include <TNL/File.h> -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> using namespace TNL; @@ -28,7 +28,7 @@ class TridiagonalTester : public CppUnit :: TestCase { public: typedef Matrices::Tridiagonal< RealType, Device, IndexType > MatrixType; - typedef Vectors::Vector< RealType, Device, IndexType > VectorType; + typedef Containers::Vector< RealType, Device, IndexType > VectorType; typedef TridiagonalTester< RealType, Device, IndexType > TesterType; typedef typename CppUnit::TestCaller< TesterType > TestCallerType; @@ -129,8 +129,8 @@ class TridiagonalTester : public CppUnit :: TestCase for( int i = 0; i < 10; i++ ) m.setElement( i, i, i ); - Vectors::Vector< IndexType, Devices::Host, IndexType > columns; - Vectors::Vector< RealType, Devices::Host, IndexType > values; + Containers::Vector< IndexType, Devices::Host, IndexType > columns; + Containers::Vector< RealType, Devices::Host, IndexType > values; columns.setSize( 3 ); values.setSize( 3 ); for( IndexType i = 4; i <= 6; i++ ) diff --git a/tests/unit-tests/mesh/tnlMeshTester.h b/tests/unit-tests/mesh/tnlMeshTester.h index 0703eea898f316e19fc7717524d1fbc7434a4e59..9c5c72074d12b830867e25b6eb80f062fe0b4d28 100644 --- a/tests/unit-tests/mesh/tnlMeshTester.h +++ b/tests/unit-tests/mesh/tnlMeshTester.h @@ -103,7 +103,7 @@ class MeshTester : public CppUnit :: TestCase typedef MeshEntity< TestTriangleMeshConfig, MeshEdgeTopology > EdgeMeshEntityType; typedef MeshEntity< TestTriangleMeshConfig, MeshVertexTopology > VertexMeshEntityType; typedef typename VertexMeshEntityType::PointType PointType; - CPPUNIT_ASSERT( PointType::getType() == ( Vectors::StaticVector< 2, RealType >::getType() ) ); + CPPUNIT_ASSERT( PointType::getType() == ( Containers::StaticVector< 2, RealType >::getType() ) ); /**** * We set-up the following situation diff --git a/tests/unit-tests/solver/tnlSolverTester.h b/tests/unit-tests/solver/tnlSolverTester.h index 95568ac9f9a63832cd8788224390f50634e4a11e..05bc787b065acea7fa206a8c8350f773ead8d33c 100644 --- a/tests/unit-tests/solver/tnlSolverTester.h +++ b/tests/unit-tests/solver/tnlSolverTester.h @@ -31,7 +31,7 @@ class SolverTesterProblem typedef typename Mesh :: DeviceType DeviceType; typedef typename Mesh :: IndexType IndexType; typedef Mesh MeshType; - typedef Vectors::Vector< RealType, DeviceType, IndexType> DofVectorType; + typedef Containers::Vector< RealType, DeviceType, IndexType> DofVectorType; typedef Matrices::CSR< RealType, DeviceType, IndexType > DiscreteSolverMatrixType; typedef Solvers::Linear::Preconditioners::Dummy< RealType, DeviceType, IndexType > DiscreteSolverPreconditioner; diff --git a/tools/src/tnl-dicom-reader.cpp b/tools/src/tnl-dicom-reader.cpp index 7fb6a1b001fa2ac0da93595ea0894ea7540569ee..58177457924ae0b4a0ef4f1b561370a3f79e7a02 100644 --- a/tools/src/tnl-dicom-reader.cpp +++ b/tools/src/tnl-dicom-reader.cpp @@ -44,7 +44,7 @@ bool processDicomSeries( const Config::ParameterContainer& parameters ) typedef Meshes::Grid< 2, double, Devices::Host, int > GridType; GridType grid; - Vectors::Vector< double, Devices::Host, int > vector; + Containers::Vector< double, Devices::Host, int > vector; Images::RegionOfInterest< int > roi; for( int i = 0; i < dicomSeriesNames.getSize(); i++ ) { diff --git a/tools/src/tnl-diff.h b/tools/src/tnl-diff.h index 9992d7167c8bda0cbd622041aa7145958fae43c6..c94651a236d26ca7b8ad94c710485a43352c92dd 100644 --- a/tools/src/tnl-diff.h +++ b/tools/src/tnl-diff.h @@ -14,8 +14,8 @@ #include <iomanip> #include <TNL/Config/ParameterContainer.h> #include <TNL/core/mfilename.h> -#include <TNL/Vectors/Vector.h> -#include <TNL/Vectors/StaticVector.h> +#include <TNL/Containers/Vector.h> +#include <TNL/Containers/StaticVector.h> #include <TNL/Functions/MeshFunction.h> using namespace TNL; @@ -186,7 +186,7 @@ bool computeDifferenceOfVectors( const MeshPointer& meshPointer, const Config::P if( verbose ) std::cout << std::endl; - Vectors::Vector< Real, Devices::Host, Index > v1, v2; + Containers::Vector< Real, Devices::Host, Index > v1, v2; Real totalL1Diff( 0.0 ), totalL2Diff( 0.0 ), totalMaxDiff( 0.0 ); for( int i = 0; i < inputFiles. getSize(); i ++ ) { @@ -277,7 +277,7 @@ bool computeDifferenceOfVectors( const MeshPointer& meshPointer, const Config::P differenceFileName = inputFiles[ i ]; RemoveFileExtension( differenceFileName ); differenceFileName += ".diff.tnl"; - Vectors::Vector< Real, Devices::Host, Index > diff; + Containers::Vector< Real, Devices::Host, Index > diff; diff.setLike( v1 ); diff = v1; diff -= v2; @@ -339,39 +339,39 @@ bool setTupleType( const MeshPointer& meshPointer, switch( dimensions ) { case 1: - return setIndexType< MeshPointer, Vectors::StaticVector< 1, float >, float >( meshPointer, inputFileName, parsedObjectType, parameters ); + return setIndexType< MeshPointer, Containers::StaticVector< 1, float >, float >( meshPointer, inputFileName, parsedObjectType, parameters ); break; case 2: - return setIndexType< MeshPointer, Vectors::StaticVector< 2, float >, float >( meshPointer, inputFileName, parsedObjectType, parameters ); + return setIndexType< MeshPointer, Containers::StaticVector< 2, float >, float >( meshPointer, inputFileName, parsedObjectType, parameters ); break; case 3: - return setIndexType< MeshPointer, Vectors::StaticVector< 3, float >, float >( meshPointer, inputFileName, parsedObjectType, parameters ); + return setIndexType< MeshPointer, Containers::StaticVector< 3, float >, float >( meshPointer, inputFileName, parsedObjectType, parameters ); break; } if( dataType == "double" ) switch( dimensions ) { case 1: - return setIndexType< MeshPointer, Vectors::StaticVector< 1, double >, double >( meshPointer, inputFileName, parsedObjectType, parameters ); + return setIndexType< MeshPointer, Containers::StaticVector< 1, double >, double >( meshPointer, inputFileName, parsedObjectType, parameters ); break; case 2: - return setIndexType< MeshPointer, Vectors::StaticVector< 2, double >, double >( meshPointer, inputFileName, parsedObjectType, parameters ); + return setIndexType< MeshPointer, Containers::StaticVector< 2, double >, double >( meshPointer, inputFileName, parsedObjectType, parameters ); break; case 3: - return setIndexType< MeshPointer, Vectors::StaticVector< 3, double >, double >( meshPointer, inputFileName, parsedObjectType, parameters ); + return setIndexType< MeshPointer, Containers::StaticVector< 3, double >, double >( meshPointer, inputFileName, parsedObjectType, parameters ); break; } if( dataType == "long double" ) switch( dimensions ) { case 1: - return setIndexType< MeshPointer, Vectors::StaticVector< 1, long double >, long double >( meshPointer, inputFileName, parsedObjectType, parameters ); + return setIndexType< MeshPointer, Containers::StaticVector< 1, long double >, long double >( meshPointer, inputFileName, parsedObjectType, parameters ); break; case 2: - return setIndexType< MeshPointer, Vectors::StaticVector< 2, long double >, long double >( meshPointer, inputFileName, parsedObjectType, parameters ); + return setIndexType< MeshPointer, Containers::StaticVector< 2, long double >, long double >( meshPointer, inputFileName, parsedObjectType, parameters ); break; case 3: - return setIndexType< MeshPointer, Vectors::StaticVector< 3, long double >, long double >( meshPointer, inputFileName, parsedObjectType, parameters ); + return setIndexType< MeshPointer, Containers::StaticVector< 3, long double >, long double >( meshPointer, inputFileName, parsedObjectType, parameters ); break; } } diff --git a/tools/src/tnl-image-converter.cpp b/tools/src/tnl-image-converter.cpp index 4b7c567eb72a245731c0e179f07576a61ea26d60..8effaace27aa841f12b0c2d88455af41c5a57f46 100644 --- a/tools/src/tnl-image-converter.cpp +++ b/tools/src/tnl-image-converter.cpp @@ -43,7 +43,7 @@ bool processImages( const Config::ParameterContainer& parameters ) typedef Meshes::Grid< 2, double, Devices::Host, int > GridType; GridType grid; - Vectors::Vector< double, Devices::Host, int > vector; + Containers::Vector< double, Devices::Host, int > vector; Images::RegionOfInterest< int > roi; for( int i = 0; i < inputImages.getSize(); i++ ) { @@ -143,7 +143,7 @@ bool processTNLFiles( const Config::ParameterContainer& parameters ) std::cerr << "I am not able to load the mesh file " << meshFile << "." << std::endl; return false; } - Vectors::Vector< double, Devices::Host, int > vector; + Containers::Vector< double, Devices::Host, int > vector; for( int i = 0; i < inputFiles.getSize(); i++ ) { const String& fileName = inputFiles[ i ]; diff --git a/tools/src/tnl-init.h b/tools/src/tnl-init.h index 026555a4b68aa94e06af26e7e60936670f620d27..6b3fa4dbd473826665a26ac4ff60baf90df602f3 100644 --- a/tools/src/tnl-init.h +++ b/tools/src/tnl-init.h @@ -12,7 +12,7 @@ #define TNL_INIT_H_ #include <TNL/Config/ParameterContainer.h> -#include <TNL/Vectors/Vector.h> +#include <TNL/Containers/Vector.h> #include <TNL/Meshes/Grid.h> #include <TNL/Functions/TestFunction.h> #include <TNL/Operators/FiniteDifferences.h> diff --git a/tools/src/tnl-view.h b/tools/src/tnl-view.h index ffd9a121a18c2efc9dfe13017b686e69659775d4..afe98c07cd7e2086f3798e2d1c8fc87db895eeef 100644 --- a/tools/src/tnl-view.h +++ b/tools/src/tnl-view.h @@ -15,8 +15,8 @@ #include <TNL/core/mfilename.h> #include <TNL/Config/ParameterContainer.h> #include <TNL/String.h> -#include <TNL/Vectors/Vector.h> -#include <TNL/Vectors/MultiVector.h> +#include <TNL/Containers/Vector.h> +#include <TNL/Containers/MultiVector.h> #include <TNL/Meshes/Grid.h> #include <TNL/Functions/MeshFunction.h> @@ -212,7 +212,7 @@ bool convertObject( const MeshPointer& meshPointer, if( parsedObjectType[ 0 ] == "SharedVector" || parsedObjectType[ 0 ] == "Vector" ) { - Vectors::Vector< Element, Devices::Host, Index > vector; + Containers::Vector< Element, Devices::Host, Index > vector; if( ! vector. load( inputFileName ) ) return false; if( ! meshPointer->write( vector, outputFileName, outputFormat ) ) @@ -222,7 +222,7 @@ bool convertObject( const MeshPointer& meshPointer, if( parsedObjectType[ 0 ] == "MultiVector" || parsedObjectType[ 0 ] == "tnlSharedMultiVector" ) { - Vectors::MultiVector< Dimensions, Element, Devices::Host, Index > multiVector; + Containers::MultiVector< Dimensions, Element, Devices::Host, Index > multiVector; if( ! multiVector. load( inputFileName ) ) return false; typedef Meshes::Grid< Dimensions, Real, Devices::Host, Index > GridType; @@ -299,39 +299,39 @@ bool setTupleType( const MeshPointer& meshPointer, switch( dimensions ) { case 1: - return setIndexType< MeshPointer, Vectors::StaticVector< 1, float >, float >( meshPointer, inputFileName, parsedObjectType, parameters ); + return setIndexType< MeshPointer, Containers::StaticVector< 1, float >, float >( meshPointer, inputFileName, parsedObjectType, parameters ); break; case 2: - return setIndexType< MeshPointer, Vectors::StaticVector< 2, float >, float >( meshPointer, inputFileName, parsedObjectType, parameters ); + return setIndexType< MeshPointer, Containers::StaticVector< 2, float >, float >( meshPointer, inputFileName, parsedObjectType, parameters ); break; case 3: - return setIndexType< MeshPointer, Vectors::StaticVector< 3, float >, float >( meshPointer, inputFileName, parsedObjectType, parameters ); + return setIndexType< MeshPointer, Containers::StaticVector< 3, float >, float >( meshPointer, inputFileName, parsedObjectType, parameters ); break; } if( dataType == "double" ) switch( dimensions ) { case 1: - return setIndexType< MeshPointer, Vectors::StaticVector< 1, double >, double >( meshPointer, inputFileName, parsedObjectType, parameters ); + return setIndexType< MeshPointer, Containers::StaticVector< 1, double >, double >( meshPointer, inputFileName, parsedObjectType, parameters ); break; case 2: - return setIndexType< MeshPointer, Vectors::StaticVector< 2, double >, double >( meshPointer, inputFileName, parsedObjectType, parameters ); + return setIndexType< MeshPointer, Containers::StaticVector< 2, double >, double >( meshPointer, inputFileName, parsedObjectType, parameters ); break; case 3: - return setIndexType< MeshPointer, Vectors::StaticVector< 3, double >, double >( meshPointer, inputFileName, parsedObjectType, parameters ); + return setIndexType< MeshPointer, Containers::StaticVector< 3, double >, double >( meshPointer, inputFileName, parsedObjectType, parameters ); break; } if( dataType == "long double" ) switch( dimensions ) { case 1: - return setIndexType< MeshPointer, Vectors::StaticVector< 1, long double >, long double >( meshPointer, inputFileName, parsedObjectType, parameters ); + return setIndexType< MeshPointer, Containers::StaticVector< 1, long double >, long double >( meshPointer, inputFileName, parsedObjectType, parameters ); break; case 2: - return setIndexType< MeshPointer, Vectors::StaticVector< 2, long double >, long double >( meshPointer, inputFileName, parsedObjectType, parameters ); + return setIndexType< MeshPointer, Containers::StaticVector< 2, long double >, long double >( meshPointer, inputFileName, parsedObjectType, parameters ); break; case 3: - return setIndexType< MeshPointer, Vectors::StaticVector< 3, long double >, long double >( meshPointer, inputFileName, parsedObjectType, parameters ); + return setIndexType< MeshPointer, Containers::StaticVector< 3, long double >, long double >( meshPointer, inputFileName, parsedObjectType, parameters ); break; } } diff --git a/tools/src/tnlcurve2gnuplot.cpp b/tools/src/tnlcurve2gnuplot.cpp index ed3c0d41a2ce09fbba85d7e1912a707d97179a0a..2f5cd8ed4676647e136e51d19d4660cf8f54b96e 100644 --- a/tools/src/tnlcurve2gnuplot.cpp +++ b/tools/src/tnlcurve2gnuplot.cpp @@ -10,7 +10,7 @@ #include <TNL/Config/ParameterContainer.h> #include <TNL/core/tnlCurve.h> -#include <TNL/Vectors/StaticVector.h> +#include <TNL/Containers/StaticVector.h> using namespace TNL; @@ -51,7 +51,7 @@ int main( int argc, char* argv[] ) return 1; }*/ int i; - tnlCurve< Vectors::StaticVector< 2, double > > crv( "tnlcurve2gnuplot:curve" ); + tnlCurve< Containers::StaticVector< 2, double > > crv( "tnlcurve2gnuplot:curve" ); for( i = 0; i < size; i ++ ) { const char* input_file = input_files[ i ]. getString(); @@ -70,7 +70,7 @@ int main( int argc, char* argv[] ) } file. close(); - tnlCurve< Vectors::StaticVector< 2, double > > out_crv( "tnlcurve2gnuplot:outcurve" ); + tnlCurve< Containers::StaticVector< 2, double > > out_crv( "tnlcurve2gnuplot:outcurve" ); const int size = crv. getSize(); int i; for( i = 0; i < size; i += output_step )