mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bdcab83e28 | ||
|
|
5c9addf4a2 | ||
|
|
05bd58e9b4 | ||
|
|
69f583a866 | ||
|
|
49016cbe4b | ||
|
|
43f054dbb4 | ||
|
|
2a965155af | ||
|
|
5ce83aeb6b | ||
|
|
41070aad7b | ||
|
|
27f6fd3a50 | ||
|
|
45ae9a069c | ||
|
|
bdd80ebe1c |
41
.gitignore
vendored
Normal file
41
.gitignore
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
qrc_*cxx
|
||||
*.orig
|
||||
*.pyc
|
||||
*.diff
|
||||
diff
|
||||
*.save
|
||||
save
|
||||
*.old
|
||||
*.gmo
|
||||
*.qm
|
||||
core
|
||||
core.*
|
||||
*.bak
|
||||
*~
|
||||
*.build*
|
||||
*.moc.*
|
||||
*.moc
|
||||
ui_*
|
||||
CMakeCache.txt
|
||||
tags
|
||||
.*.swp
|
||||
activity.png
|
||||
*.out
|
||||
*.php*
|
||||
*.log
|
||||
*.orig
|
||||
*.rej
|
||||
log
|
||||
patch
|
||||
*.patch
|
||||
a
|
||||
a.*
|
||||
lapack/testing
|
||||
lapack/reference
|
||||
.*project
|
||||
.settings
|
||||
Makefile
|
||||
!ci/build.gitlab-ci.yml
|
||||
!scripts/buildtests.in
|
||||
!Eigen/Core
|
||||
!Eigen/src/Core
|
||||
28
.gitlab-ci.yml
Normal file
28
.gitlab-ci.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
# This file is part of Eigen, a lightweight C++ template library
|
||||
# for linear algebra.
|
||||
#
|
||||
# Copyright (C) 2023, The Eigen Authors
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla
|
||||
# Public License v. 2.0. If a copy of the MPL was not distributed
|
||||
# with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
stages:
|
||||
- build
|
||||
- deploy
|
||||
|
||||
variables:
|
||||
# CMake build directory.
|
||||
EIGEN_CI_BUILDDIR: .build
|
||||
# Specify the CMake build target.
|
||||
EIGEN_CI_BUILD_TARGET: ""
|
||||
# If a test regex is specified, that will be selected.
|
||||
# Otherwise, we will try a label if specified.
|
||||
EIGEN_CI_CTEST_REGEX: ""
|
||||
EIGEN_CI_CTEST_LABEL: ""
|
||||
EIGEN_CI_CTEST_ARGS: ""
|
||||
|
||||
include:
|
||||
- "/ci/common.gitlab-ci.yml"
|
||||
- "/ci/build.linux.gitlab-ci.yml"
|
||||
- "/ci/deploy.gitlab-ci.yml"
|
||||
@@ -543,6 +543,7 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type
|
||||
eigen_assert((this->size()==0 || (IsVectorAtCompileTime ? (this->size() == other.size())
|
||||
: (rows() == other.rows() && cols() == other.cols())))
|
||||
&& "Size mismatch. Automatic resizing is disabled because EIGEN_NO_AUTOMATIC_RESIZING is defined");
|
||||
EIGEN_ONLY_USED_FOR_DEBUG(other);
|
||||
#else
|
||||
resizeLike(other);
|
||||
#endif
|
||||
|
||||
@@ -51,7 +51,7 @@ template<> struct is_arithmetic<__m128d> { enum { value = true }; };
|
||||
|
||||
#define vec2d_swizzle1(v,p,q) \
|
||||
(_mm_castsi128_pd(_mm_shuffle_epi32( _mm_castpd_si128(v), ((q*2+1)<<6|(q*2)<<4|(p*2+1)<<2|(p*2)))))
|
||||
|
||||
|
||||
#define vec4f_swizzle2(a,b,p,q,r,s) \
|
||||
(_mm_shuffle_ps( (a), (b), ((s)<<6|(r)<<4|(q)<<2|(p))))
|
||||
|
||||
@@ -495,8 +495,8 @@ template<> EIGEN_STRONG_INLINE int predux_min<Packet4i>(const Packet4i& a)
|
||||
// for GCC (eg., it does not like using std::min after the pstore !!)
|
||||
EIGEN_ALIGN16 int aux[4];
|
||||
pstore(aux, a);
|
||||
register int aux0 = aux[0]<aux[1] ? aux[0] : aux[1];
|
||||
register int aux2 = aux[2]<aux[3] ? aux[2] : aux[3];
|
||||
int aux0 = aux[0]<aux[1] ? aux[0] : aux[1];
|
||||
int aux2 = aux[2]<aux[3] ? aux[2] : aux[3];
|
||||
return aux0<aux2 ? aux0 : aux2;
|
||||
}
|
||||
|
||||
@@ -516,8 +516,8 @@ template<> EIGEN_STRONG_INLINE int predux_max<Packet4i>(const Packet4i& a)
|
||||
// for GCC (eg., it does not like using std::min after the pstore !!)
|
||||
EIGEN_ALIGN16 int aux[4];
|
||||
pstore(aux, a);
|
||||
register int aux0 = aux[0]>aux[1] ? aux[0] : aux[1];
|
||||
register int aux2 = aux[2]>aux[3] ? aux[2] : aux[3];
|
||||
int aux0 = aux[0]>aux[1] ? aux[0] : aux[1];
|
||||
int aux2 = aux[2]>aux[3] ? aux[2] : aux[3];
|
||||
return aux0>aux2 ? aux0 : aux2;
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ static EIGEN_DONT_INLINE void product_selfadjoint_vector(
|
||||
// FIXME this copy is now handled outside product_selfadjoint_vector, so it could probably be removed.
|
||||
// if the rhs is not sequentially stored in memory we copy it to a temporary buffer,
|
||||
// this is because we need to extract packets
|
||||
ei_declare_aligned_stack_constructed_variable(Scalar,rhs,size,rhsIncr==1 ? const_cast<Scalar*>(_rhs) : 0);
|
||||
ei_declare_aligned_stack_constructed_variable(Scalar,rhs,size,rhsIncr==1 ? const_cast<Scalar*>(_rhs) : 0);
|
||||
if (rhsIncr!=1)
|
||||
{
|
||||
const Scalar* it = _rhs;
|
||||
@@ -77,8 +77,8 @@ static EIGEN_DONT_INLINE void product_selfadjoint_vector(
|
||||
for (Index j=FirstTriangular ? bound : 0;
|
||||
j<(FirstTriangular ? size : bound);j+=2)
|
||||
{
|
||||
register const Scalar* EIGEN_RESTRICT A0 = lhs + j*lhsStride;
|
||||
register const Scalar* EIGEN_RESTRICT A1 = lhs + (j+1)*lhsStride;
|
||||
const Scalar* EIGEN_RESTRICT A0 = lhs + j*lhsStride;
|
||||
const Scalar* EIGEN_RESTRICT A1 = lhs + (j+1)*lhsStride;
|
||||
|
||||
Scalar t0 = cjAlpha * rhs[j];
|
||||
Packet ptmp0 = pset1<Packet>(t0);
|
||||
@@ -145,7 +145,7 @@ static EIGEN_DONT_INLINE void product_selfadjoint_vector(
|
||||
}
|
||||
for (Index j=FirstTriangular ? 0 : bound;j<(FirstTriangular ? bound : size);j++)
|
||||
{
|
||||
register const Scalar* EIGEN_RESTRICT A0 = lhs + j*lhsStride;
|
||||
const Scalar* EIGEN_RESTRICT A0 = lhs + j*lhsStride;
|
||||
|
||||
Scalar t1 = cjAlpha * rhs[j];
|
||||
Scalar t2 = 0;
|
||||
@@ -160,7 +160,7 @@ static EIGEN_DONT_INLINE void product_selfadjoint_vector(
|
||||
}
|
||||
}
|
||||
|
||||
} // end namespace internal
|
||||
} // end namespace internal
|
||||
|
||||
/***************************************************************************
|
||||
* Wrapper to product_selfadjoint_vector
|
||||
@@ -190,7 +190,7 @@ struct SelfadjointProductMatrix<Lhs,LhsMode,false,Rhs,0,true>
|
||||
typedef typename Dest::Scalar ResScalar;
|
||||
typedef typename Base::RhsScalar RhsScalar;
|
||||
typedef Map<Matrix<ResScalar,Dynamic,1>, Aligned> MappedDest;
|
||||
|
||||
|
||||
eigen_assert(dest.rows()==m_lhs.rows() && dest.cols()==m_rhs.cols());
|
||||
|
||||
const ActualLhsType lhs = LhsBlasTraits::extract(m_lhs);
|
||||
@@ -203,16 +203,16 @@ struct SelfadjointProductMatrix<Lhs,LhsMode,false,Rhs,0,true>
|
||||
EvalToDest = (Dest::InnerStrideAtCompileTime==1),
|
||||
UseRhs = (_ActualRhsType::InnerStrideAtCompileTime==1)
|
||||
};
|
||||
|
||||
|
||||
internal::gemv_static_vector_if<ResScalar,Dest::SizeAtCompileTime,Dest::MaxSizeAtCompileTime,!EvalToDest> static_dest;
|
||||
internal::gemv_static_vector_if<RhsScalar,_ActualRhsType::SizeAtCompileTime,_ActualRhsType::MaxSizeAtCompileTime,!UseRhs> static_rhs;
|
||||
|
||||
ei_declare_aligned_stack_constructed_variable(ResScalar,actualDestPtr,dest.size(),
|
||||
EvalToDest ? dest.data() : static_dest.data());
|
||||
|
||||
|
||||
ei_declare_aligned_stack_constructed_variable(RhsScalar,actualRhsPtr,rhs.size(),
|
||||
UseRhs ? const_cast<RhsScalar*>(rhs.data()) : static_rhs.data());
|
||||
|
||||
|
||||
if(!EvalToDest)
|
||||
{
|
||||
#ifdef EIGEN_DENSE_STORAGE_CTOR_PLUGIN
|
||||
@@ -221,7 +221,7 @@ struct SelfadjointProductMatrix<Lhs,LhsMode,false,Rhs,0,true>
|
||||
#endif
|
||||
MappedDest(actualDestPtr, dest.size()) = dest;
|
||||
}
|
||||
|
||||
|
||||
if(!UseRhs)
|
||||
{
|
||||
#ifdef EIGEN_DENSE_STORAGE_CTOR_PLUGIN
|
||||
@@ -230,8 +230,8 @@ struct SelfadjointProductMatrix<Lhs,LhsMode,false,Rhs,0,true>
|
||||
#endif
|
||||
Map<typename _ActualRhsType::PlainObject>(actualRhsPtr, rhs.size()) = rhs;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
internal::product_selfadjoint_vector<Scalar, Index, (internal::traits<_ActualLhsType>::Flags&RowMajorBit) ? RowMajor : ColMajor, int(LhsUpLo), bool(LhsBlasTraits::NeedToConjugate), bool(RhsBlasTraits::NeedToConjugate)>
|
||||
(
|
||||
lhs.rows(), // size
|
||||
@@ -240,7 +240,7 @@ struct SelfadjointProductMatrix<Lhs,LhsMode,false,Rhs,0,true>
|
||||
actualDestPtr, // result info
|
||||
actualAlpha // scale factor
|
||||
);
|
||||
|
||||
|
||||
if(!EvalToDest)
|
||||
dest = MappedDest(actualDestPtr, dest.size());
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
#define EIGEN_WORLD_VERSION 3
|
||||
#define EIGEN_MAJOR_VERSION 0
|
||||
#define EIGEN_MINOR_VERSION 6
|
||||
#define EIGEN_MINOR_VERSION 7
|
||||
|
||||
#define EIGEN_VERSION_AT_LEAST(x,y,z) (EIGEN_WORLD_VERSION>x || (EIGEN_WORLD_VERSION>=x && \
|
||||
(EIGEN_MAJOR_VERSION>y || (EIGEN_MAJOR_VERSION>=y && \
|
||||
|
||||
@@ -200,7 +200,8 @@ public:
|
||||
*
|
||||
* \brief The quaternion class used to represent 3D orientations and rotations
|
||||
*
|
||||
* \param _Scalar the scalar type, i.e., the type of the coefficients
|
||||
* \tparam _Scalar the scalar type, i.e., the type of the coefficients
|
||||
* \tparam _Options controls the memory alignement of the coeffecients. Can be \# AutoAlign or \# DontAlign. Default is AutoAlign.
|
||||
*
|
||||
* This class represents a quaternion \f$ w+xi+yj+zk \f$ that is a convenient representation of
|
||||
* orientations and rotations of objects in three dimensions. Compared to other representations
|
||||
@@ -308,41 +309,29 @@ typedef Quaternion<double> Quaterniond;
|
||||
|
||||
namespace internal {
|
||||
template<typename _Scalar, int _Options>
|
||||
struct traits<Map<Quaternion<_Scalar>, _Options> >:
|
||||
traits<Quaternion<_Scalar, _Options> >
|
||||
struct traits<Map<Quaternion<_Scalar>, _Options> > : traits<Quaternion<_Scalar, (int(_Options)&Aligned)==Aligned ? AutoAlign : DontAlign> >
|
||||
{
|
||||
typedef _Scalar Scalar;
|
||||
typedef Map<Matrix<_Scalar,4,1>, _Options> Coefficients;
|
||||
|
||||
typedef traits<Quaternion<_Scalar, _Options> > TraitsBase;
|
||||
enum {
|
||||
IsAligned = TraitsBase::IsAligned,
|
||||
|
||||
Flags = TraitsBase::Flags
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
namespace internal {
|
||||
template<typename _Scalar, int _Options>
|
||||
struct traits<Map<const Quaternion<_Scalar>, _Options> >:
|
||||
traits<Quaternion<_Scalar> >
|
||||
struct traits<Map<const Quaternion<_Scalar>, _Options> > : traits<Quaternion<_Scalar, (int(_Options)&Aligned)==Aligned ? AutoAlign : DontAlign> >
|
||||
{
|
||||
typedef _Scalar Scalar;
|
||||
typedef Map<const Matrix<_Scalar,4,1>, _Options> Coefficients;
|
||||
|
||||
typedef traits<Quaternion<_Scalar, _Options> > TraitsBase;
|
||||
typedef traits<Quaternion<_Scalar, (int(_Options)&Aligned)==Aligned ? AutoAlign : DontAlign> > TraitsBase;
|
||||
enum {
|
||||
IsAligned = TraitsBase::IsAligned,
|
||||
Flags = TraitsBase::Flags & ~LvalueBit
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
/** \brief Quaternion expression mapping a constant memory buffer
|
||||
/** \ingroup Geometry_Module
|
||||
* \brief Quaternion expression mapping a constant memory buffer
|
||||
*
|
||||
* \param _Scalar the type of the Quaternion coefficients
|
||||
* \param _Options see class Map
|
||||
* \tparam _Scalar the type of the Quaternion coefficients
|
||||
* \tparam _Options see class Map
|
||||
*
|
||||
* This is a specialization of class Map for Quaternion. This class allows to view
|
||||
* a 4 scalar memory buffer as an Eigen's Quaternion object.
|
||||
@@ -375,10 +364,11 @@ class Map<const Quaternion<_Scalar>, _Options >
|
||||
const Coefficients m_coeffs;
|
||||
};
|
||||
|
||||
/** \brief Expression of a quaternion from a memory buffer
|
||||
/** \ingroup Geometry_Module
|
||||
* \brief Expression of a quaternion from a memory buffer
|
||||
*
|
||||
* \param _Scalar the type of the Quaternion coefficients
|
||||
* \param _Options see class Map
|
||||
* \tparam _Scalar the type of the Quaternion coefficients
|
||||
* \tparam _Options see class Map
|
||||
*
|
||||
* This is a specialization of class Map for Quaternion. This class allows to view
|
||||
* a 4 scalar memory buffer as an Eigen's Quaternion object.
|
||||
|
||||
31
ci/build.linux.gitlab-ci.yml
Normal file
31
ci/build.linux.gitlab-ci.yml
Normal file
@@ -0,0 +1,31 @@
|
||||
# Base configuration for linux cross-compilation.
|
||||
.build:linux:cross:
|
||||
extends: .common:linux:cross
|
||||
stage: build
|
||||
variables:
|
||||
EIGEN_CI_BUILD_TARGET: buildtests
|
||||
script:
|
||||
- . ci/scripts/build.linux.script.sh
|
||||
tags:
|
||||
- saas-linux-2xlarge-amd64
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == "schedule" && $CI_PROJECT_NAMESPACE == "libeigen"
|
||||
- if: $CI_PIPELINE_SOURCE == "web" && $CI_PROJECT_NAMESPACE == "libeigen"
|
||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_PROJECT_NAMESPACE == "libeigen" && $CI_MERGE_REQUEST_LABELS =~ "/all-tests/"
|
||||
cache:
|
||||
key: "$CI_JOB_NAME_SLUG-$CI_COMMIT_REF_SLUG-BUILD"
|
||||
paths:
|
||||
- ${EIGEN_CI_BUILDDIR}/
|
||||
|
||||
build:linux:docs:
|
||||
extends: .build:linux:cross
|
||||
variables:
|
||||
EIGEN_CI_TARGET_ARCH: any
|
||||
EIGEN_CI_BUILD_TARGET: doc
|
||||
EIGEN_CI_INSTALL: ca-certificates clang flex python3 bison graphviz
|
||||
EIGEN_CI_C_COMPILER: clang
|
||||
EIGEN_CI_CXX_COMPILER: clang++
|
||||
EIGEN_CI_BEFORE_SCRIPT: ". ci/scripts/build_and_install_doxygen.sh Release_1_13_2"
|
||||
EIGEN_CI_ADDITIONAL_ARGS: "-DCMAKE_CXX_FLAGS='-Wno-deprecated-declarations -Wno-ignored-reference-qualifiers'"
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == "push" && $CI_PROJECT_NAMESPACE == "libeigen"
|
||||
24
ci/common.gitlab-ci.yml
Normal file
24
ci/common.gitlab-ci.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
# Base configuration for linux builds and tests.
|
||||
.common:linux:cross:
|
||||
image: ubuntu:20.04
|
||||
variables:
|
||||
EIGEN_CI_TARGET_ARCH: ""
|
||||
EIGEN_CI_ADDITIONAL_ARGS: ""
|
||||
# If host matches target, use the following:
|
||||
EIGEN_CI_C_COMPILER: ""
|
||||
EIGEN_CI_CXX_COMPILER: ""
|
||||
EIGEN_CI_INSTALL: "${EIGEN_CI_C_COMPILER} ${EIGEN_CI_CXX_COMPILER}"
|
||||
# If host does not match the target, use the following:
|
||||
EIGEN_CI_CROSS_TARGET_TRIPLE: ""
|
||||
EIGEN_CI_CROSS_C_COMPILER: ${EIGEN_CI_C_COMPILER}
|
||||
EIGEN_CI_CROSS_CXX_COMPILER: ${EIGEN_CI_CXX_COMPILER}
|
||||
EIGEN_CI_CROSS_INSTALL: "${EIGEN_CI_CROSS_C_COMPILER} ${EIGEN_CI_CROSS_CXX_COMPILER}"
|
||||
before_script:
|
||||
# Call script in current shell - it sets up some environment variables.
|
||||
- . ci/scripts/common.linux.before_script.sh
|
||||
artifacts:
|
||||
when: always
|
||||
name: "$CI_JOB_NAME_SLUG-$CI_COMMIT_REF_SLUG"
|
||||
paths:
|
||||
- ${EIGEN_CI_BUILDDIR}/
|
||||
expire_in: 5 days
|
||||
25
ci/deploy.gitlab-ci.yml
Normal file
25
ci/deploy.gitlab-ci.yml
Normal file
@@ -0,0 +1,25 @@
|
||||
# Upload docs if pipeline succeeded.
|
||||
deploy:docs:
|
||||
stage: deploy
|
||||
image: busybox
|
||||
dependencies: [ build:linux:docs ]
|
||||
variables:
|
||||
PAGES_PREFIX: docs-nightly
|
||||
script:
|
||||
- echo "Deploying site to $CI_PAGES_URL"
|
||||
- mv ${EIGEN_CI_BUILDDIR}/doc/html public
|
||||
pages:
|
||||
path_prefix: $PAGES_PREFIX
|
||||
expire_in: never
|
||||
artifacts:
|
||||
name: "$CI_JOB_NAME_SLUG-$CI_COMMIT_REF_SLUG"
|
||||
paths:
|
||||
- public
|
||||
tags:
|
||||
- saas-linux-small-amd64
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == "schedule" && $CI_PROJECT_NAMESPACE == "libeigen"
|
||||
- if: $CI_PIPELINE_SOURCE == "web" && $CI_PROJECT_NAMESPACE == "libeigen"
|
||||
- if: $CI_PIPELINE_SOURCE == "push" && $CI_PROJECT_NAMESPACE == "libeigen"
|
||||
variables:
|
||||
PAGES_PREFIX: docs-$CI_COMMIT_REF_NAME
|
||||
31
ci/scripts/build.linux.script.sh
Executable file
31
ci/scripts/build.linux.script.sh
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -x
|
||||
|
||||
# Create and enter build directory.
|
||||
rootdir=`pwd`
|
||||
mkdir -p ${EIGEN_CI_BUILDDIR}
|
||||
cd ${EIGEN_CI_BUILDDIR}
|
||||
|
||||
# Configure build.
|
||||
cmake -G Ninja \
|
||||
-DCMAKE_CXX_COMPILER=${EIGEN_CI_CXX_COMPILER} \
|
||||
-DCMAKE_C_COMPILER=${EIGEN_CI_C_COMPILER} \
|
||||
-DCMAKE_CXX_COMPILER_TARGET=${EIGEN_CI_CXX_COMPILER_TARGET} \
|
||||
"${EIGEN_CI_ADDITIONAL_ARGS}" ${rootdir}
|
||||
|
||||
target=""
|
||||
if [[ ${EIGEN_CI_BUILD_TARGET} ]]; then
|
||||
target="--target ${EIGEN_CI_BUILD_TARGET}"
|
||||
fi
|
||||
|
||||
# Builds (particularly gcc) sometimes get killed, potentially when running
|
||||
# out of resources. In that case, keep trying to build the remaining
|
||||
# targets (k0), then try to build again with a single thread (j1) to minimize
|
||||
# resource use.
|
||||
cmake --build . ${target} -- -k0 || cmake --build . ${target} -- -k0 -j1
|
||||
|
||||
# Return to root directory.
|
||||
cd ${rootdir}
|
||||
|
||||
set +x
|
||||
6
ci/scripts/build_and_install_doxygen.sh
Normal file
6
ci/scripts/build_and_install_doxygen.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
git clone --depth 1 --branch $1 https://github.com/doxygen/doxygen.git
|
||||
cmake -B doxygen/.build -G Ninja \
|
||||
-DCMAKE_CXX_COMPILER=${EIGEN_CI_CXX_COMPILER} \
|
||||
-DCMAKE_C_COMPILER=${EIGEN_CI_C_COMPILER} \
|
||||
doxygen
|
||||
cmake --build doxygen/.build -t install
|
||||
46
ci/scripts/common.linux.before_script.sh
Executable file
46
ci/scripts/common.linux.before_script.sh
Executable file
@@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -x
|
||||
|
||||
echo "Running ${CI_JOB_NAME}"
|
||||
|
||||
# Get architecture and display CI configuration.
|
||||
export ARCH=`uname -m`
|
||||
export NPROC=`nproc`
|
||||
echo "arch=$ARCH, target=${EIGEN_CI_TARGET_ARCH}"
|
||||
echo "Processors: ${NPROC}"
|
||||
echo "CI Variables:"
|
||||
export | grep EIGEN
|
||||
|
||||
# Set noninteractive, otherwise tzdata may be installed and prompt for a
|
||||
# geographical region.
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
apt-get update -y > /dev/null
|
||||
apt-get install -y --no-install-recommends ninja-build cmake git > /dev/null
|
||||
|
||||
# Install required dependencies and set up compilers.
|
||||
# These are required even for testing to ensure that dynamic runtime libraries
|
||||
# are available.
|
||||
if [[ "$ARCH" == "${EIGEN_CI_TARGET_ARCH}" || "${EIGEN_CI_TARGET_ARCH}" == "any" ]]; then
|
||||
apt-get install -y --no-install-recommends ${EIGEN_CI_INSTALL} > /dev/null;
|
||||
export EIGEN_CI_CXX_IMPLICIT_INCLUDE_DIRECTORIES="";
|
||||
export EIGEN_CI_CXX_COMPILER_TARGET="";
|
||||
else
|
||||
apt-get install -y --no-install-recommends ${EIGEN_CI_CROSS_INSTALL} > /dev/null;
|
||||
export EIGEN_CI_C_COMPILER=${EIGEN_CI_CROSS_C_COMPILER};
|
||||
export EIGEN_CI_CXX_COMPILER=${EIGEN_CI_CROSS_CXX_COMPILER};
|
||||
export EIGEN_CI_CXX_COMPILER_TARGET=${EIGEN_CI_CROSS_TARGET_TRIPLE};
|
||||
# Tell the compiler where to find headers and libraries if using clang.
|
||||
# NOTE: this breaks GCC since it messes with include path order
|
||||
# (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129)
|
||||
if [[ "${EIGEN_CI_CROSS_CXX_COMPILER}" == *"clang"* ]]; then
|
||||
export CPLUS_INCLUDE_PATH="/usr/${EIGEN_CI_CROSS_TARGET_TRIPLE}/include";
|
||||
export LIBRARY_PATH="/usr/${EIGEN_CI_CROSS_TARGET_TRIPLE}/lib64";
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Compilers: ${EIGEN_CI_C_COMPILER} ${EIGEN_CI_CXX_COMPILER}"
|
||||
|
||||
if [ -n "$EIGEN_CI_BEFORE_SCRIPT" ]; then eval "$EIGEN_CI_BEFORE_SCRIPT"; fi
|
||||
|
||||
set +x
|
||||
@@ -70,7 +70,8 @@ add_custom_target(doc ALL
|
||||
COMMAND doxygen
|
||||
COMMAND doxygen Doxyfile-unsupported # run doxygen twice to get proper eigen <=> unsupported cross references
|
||||
COMMAND ${CMAKE_COMMAND} -E rename html eigen-doc
|
||||
COMMAND ${CMAKE_COMMAND} -E tar cvfz eigen-doc/eigen-doc.tgz eigen-doc/*.html eigen-doc/*.map eigen-doc/*.png eigen-doc/*.css eigen-doc/*.js eigen-doc/*.txt eigen-doc/unsupported
|
||||
COMMAND ${CMAKE_COMMAND} -E remove eigen-doc/eigen-doc.tgz
|
||||
COMMAND ${CMAKE_COMMAND} -E tar cvfz eigen-doc/eigen-doc.tgz eigen-doc
|
||||
COMMAND ${CMAKE_COMMAND} -E rename eigen-doc html
|
||||
WORKING_DIRECTORY ${Eigen_BINARY_DIR}/doc)
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ namespace Eigen {
|
||||
\section TopicLinAlgBigTable Catalogue of decompositions offered by Eigen
|
||||
|
||||
<table class="manual-vl">
|
||||
|
||||
<tr>
|
||||
<th class="meta"></th>
|
||||
<th class="meta" colspan="5">Generic information, not Eigen-specific</th>
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
<hr class="footer"/>
|
||||
|
||||
<!-- Piwik -->
|
||||
<script type="text/javascript">
|
||||
var pkBaseURL = (("https:" == document.location.protocol) ? "https://stats.sylphide-consulting.com/piwik/" : "http://stats.sylphide-consulting.com/piwik/");
|
||||
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
|
||||
</script><script type="text/javascript">
|
||||
try {
|
||||
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 20);
|
||||
piwikTracker.trackPageView();
|
||||
piwikTracker.enableLinkTracking();
|
||||
} catch( err ) {}
|
||||
</script><noscript><p><img src="http://stats.sylphide-consulting.com/piwik/piwik.php?idsite=20" style="border:0" alt="" /></p></noscript>
|
||||
<!-- End Piwik Tracking Code -->
|
||||
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
<a href="http://www.doxygen.org/index.html"><img class="footer" src="$relpath$doxygen.png" alt="doxygen"/></a></small></address>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -4,16 +4,21 @@
|
||||
# You should call this script with USER set as you want, else some default
|
||||
# will be used
|
||||
USER=${USER:-'orzel'}
|
||||
UPLOAD_DIR=dox
|
||||
|
||||
#ulimit -v 1024000
|
||||
|
||||
# step 1 : build
|
||||
rm build/doc/html -Rf
|
||||
mkdir build -p
|
||||
(cd build && cmake .. && make doc) || { echo "make failed"; exit 1; }
|
||||
|
||||
#step 2 : upload
|
||||
# (the '/' at the end of path is very important, see rsync documentation)
|
||||
rsync -az --no-p --delete build/doc/html/ $USER@ssh.tuxfamily.org:eigen/eigen.tuxfamily.org-web/htdocs/dox-3.0/ || { echo "upload failed"; exit 1; }
|
||||
rsync -az --no-p --delete build/doc/html/ $USER@ssh.tuxfamily.org:eigen/eigen.tuxfamily.org-web/htdocs/$UPLOAD_DIR/ || { echo "upload failed"; exit 1; }
|
||||
|
||||
#step 3 : fix the perm
|
||||
ssh $USER@ssh.tuxfamily.org "chmod -R g+w /home/eigen/eigen.tuxfamily.org-web/htdocs/$UPLOAD_DIR" || { echo "perm failed"; exit 1; }
|
||||
|
||||
echo "Uploaded successfully"
|
||||
|
||||
|
||||
@@ -175,23 +175,36 @@ template<typename Scalar, int Options> void quaternion(void)
|
||||
|
||||
template<typename Scalar> void mapQuaternion(void){
|
||||
typedef Map<Quaternion<Scalar>, Aligned> MQuaternionA;
|
||||
typedef Map<const Quaternion<Scalar>, Aligned> MCQuaternionA;
|
||||
typedef Map<Quaternion<Scalar> > MQuaternionUA;
|
||||
typedef Map<const Quaternion<Scalar> > MCQuaternionUA;
|
||||
typedef Quaternion<Scalar> Quaternionx;
|
||||
typedef Matrix<Scalar,3,1> Vector3;
|
||||
typedef AngleAxis<Scalar> AngleAxisx;
|
||||
|
||||
Vector3 v0 = Vector3::Random(),
|
||||
v1 = Vector3::Random();
|
||||
Scalar a = internal::random<Scalar>(-Scalar(M_PI), Scalar(M_PI));
|
||||
|
||||
EIGEN_ALIGN16 Scalar array1[4];
|
||||
EIGEN_ALIGN16 Scalar array2[4];
|
||||
EIGEN_ALIGN16 Scalar array3[4+1];
|
||||
Scalar* array3unaligned = array3+1;
|
||||
|
||||
MQuaternionA mq1(array1);
|
||||
MCQuaternionA mcq1(array1);
|
||||
MQuaternionA mq2(array2);
|
||||
MQuaternionUA mq3(array3unaligned);
|
||||
MCQuaternionUA mcq3(array3unaligned);
|
||||
|
||||
// std::cerr << array1 << " " << array2 << " " << array3 << "\n";
|
||||
MQuaternionA(array1).coeffs().setRandom();
|
||||
(MQuaternionA(array2)) = MQuaternionA(array1);
|
||||
(MQuaternionUA(array3unaligned)) = MQuaternionA(array1);
|
||||
mq1 = AngleAxisx(a, v0.normalized());
|
||||
mq2 = mq1;
|
||||
mq3 = mq1;
|
||||
|
||||
Quaternionx q1 = MQuaternionA(array1);
|
||||
Quaternionx q2 = MQuaternionA(array2);
|
||||
Quaternionx q3 = MQuaternionUA(array3unaligned);
|
||||
Quaternionx q1 = mq1;
|
||||
Quaternionx q2 = mq2;
|
||||
Quaternionx q3 = mq3;
|
||||
Quaternionx q4 = MCQuaternionUA(array3unaligned);
|
||||
|
||||
VERIFY_IS_APPROX(q1.coeffs(), q2.coeffs());
|
||||
@@ -201,6 +214,23 @@ template<typename Scalar> void mapQuaternion(void){
|
||||
if(internal::packet_traits<Scalar>::Vectorizable)
|
||||
VERIFY_RAISES_ASSERT((MQuaternionA(array3unaligned)));
|
||||
#endif
|
||||
|
||||
VERIFY_IS_APPROX(mq1 * (mq1.inverse() * v1), v1);
|
||||
VERIFY_IS_APPROX(mq1 * (mq1.conjugate() * v1), v1);
|
||||
|
||||
VERIFY_IS_APPROX(mcq1 * (mcq1.inverse() * v1), v1);
|
||||
VERIFY_IS_APPROX(mcq1 * (mcq1.conjugate() * v1), v1);
|
||||
|
||||
VERIFY_IS_APPROX(mq3 * (mq3.inverse() * v1), v1);
|
||||
VERIFY_IS_APPROX(mq3 * (mq3.conjugate() * v1), v1);
|
||||
|
||||
VERIFY_IS_APPROX(mcq3 * (mcq3.inverse() * v1), v1);
|
||||
VERIFY_IS_APPROX(mcq3 * (mcq3.conjugate() * v1), v1);
|
||||
|
||||
VERIFY_IS_APPROX(mq1*mq2, q1*q2);
|
||||
VERIFY_IS_APPROX(mq3*mq2, q3*q2);
|
||||
VERIFY_IS_APPROX(mcq1*mq2, q1*q2);
|
||||
VERIFY_IS_APPROX(mcq3*mq2, q3*q2);
|
||||
}
|
||||
|
||||
template<typename Scalar> void quaternionAlignment(void){
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// This file is part of Eugenio, a lightweight C++ template library
|
||||
// This file is part of Eigen, a lightweight C++ template library
|
||||
// for linear algebra.
|
||||
//
|
||||
// Copyright (C) 2009 Thomas Capricelli <orzel@freehackers.org>
|
||||
|
||||
Reference in New Issue
Block a user