mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bdcab83e28 | ||
|
|
5c9addf4a2 | ||
|
|
05bd58e9b4 | ||
|
|
69f583a866 | ||
|
|
49016cbe4b | ||
|
|
43f054dbb4 |
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"
|
||||||
@@ -51,7 +51,7 @@ template<> struct is_arithmetic<__m128d> { enum { value = true }; };
|
|||||||
|
|
||||||
#define vec2d_swizzle1(v,p,q) \
|
#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)))))
|
(_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) \
|
#define vec4f_swizzle2(a,b,p,q,r,s) \
|
||||||
(_mm_shuffle_ps( (a), (b), ((s)<<6|(r)<<4|(q)<<2|(p))))
|
(_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 !!)
|
// for GCC (eg., it does not like using std::min after the pstore !!)
|
||||||
EIGEN_ALIGN16 int aux[4];
|
EIGEN_ALIGN16 int aux[4];
|
||||||
pstore(aux, a);
|
pstore(aux, a);
|
||||||
register int aux0 = aux[0]<aux[1] ? aux[0] : aux[1];
|
int aux0 = aux[0]<aux[1] ? aux[0] : aux[1];
|
||||||
register int aux2 = aux[2]<aux[3] ? aux[2] : aux[3];
|
int aux2 = aux[2]<aux[3] ? aux[2] : aux[3];
|
||||||
return aux0<aux2 ? aux0 : aux2;
|
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 !!)
|
// for GCC (eg., it does not like using std::min after the pstore !!)
|
||||||
EIGEN_ALIGN16 int aux[4];
|
EIGEN_ALIGN16 int aux[4];
|
||||||
pstore(aux, a);
|
pstore(aux, a);
|
||||||
register int aux0 = aux[0]>aux[1] ? aux[0] : aux[1];
|
int aux0 = aux[0]>aux[1] ? aux[0] : aux[1];
|
||||||
register int aux2 = aux[2]>aux[3] ? aux[2] : aux[3];
|
int aux2 = aux[2]>aux[3] ? aux[2] : aux[3];
|
||||||
return aux0>aux2 ? aux0 : aux2;
|
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.
|
// 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,
|
// if the rhs is not sequentially stored in memory we copy it to a temporary buffer,
|
||||||
// this is because we need to extract packets
|
// 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)
|
if (rhsIncr!=1)
|
||||||
{
|
{
|
||||||
const Scalar* it = _rhs;
|
const Scalar* it = _rhs;
|
||||||
@@ -77,8 +77,8 @@ static EIGEN_DONT_INLINE void product_selfadjoint_vector(
|
|||||||
for (Index j=FirstTriangular ? bound : 0;
|
for (Index j=FirstTriangular ? bound : 0;
|
||||||
j<(FirstTriangular ? size : bound);j+=2)
|
j<(FirstTriangular ? size : bound);j+=2)
|
||||||
{
|
{
|
||||||
register const Scalar* EIGEN_RESTRICT A0 = lhs + j*lhsStride;
|
const Scalar* EIGEN_RESTRICT A0 = lhs + j*lhsStride;
|
||||||
register const Scalar* EIGEN_RESTRICT A1 = lhs + (j+1)*lhsStride;
|
const Scalar* EIGEN_RESTRICT A1 = lhs + (j+1)*lhsStride;
|
||||||
|
|
||||||
Scalar t0 = cjAlpha * rhs[j];
|
Scalar t0 = cjAlpha * rhs[j];
|
||||||
Packet ptmp0 = pset1<Packet>(t0);
|
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++)
|
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 t1 = cjAlpha * rhs[j];
|
||||||
Scalar t2 = 0;
|
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
|
* Wrapper to product_selfadjoint_vector
|
||||||
@@ -190,7 +190,7 @@ struct SelfadjointProductMatrix<Lhs,LhsMode,false,Rhs,0,true>
|
|||||||
typedef typename Dest::Scalar ResScalar;
|
typedef typename Dest::Scalar ResScalar;
|
||||||
typedef typename Base::RhsScalar RhsScalar;
|
typedef typename Base::RhsScalar RhsScalar;
|
||||||
typedef Map<Matrix<ResScalar,Dynamic,1>, Aligned> MappedDest;
|
typedef Map<Matrix<ResScalar,Dynamic,1>, Aligned> MappedDest;
|
||||||
|
|
||||||
eigen_assert(dest.rows()==m_lhs.rows() && dest.cols()==m_rhs.cols());
|
eigen_assert(dest.rows()==m_lhs.rows() && dest.cols()==m_rhs.cols());
|
||||||
|
|
||||||
const ActualLhsType lhs = LhsBlasTraits::extract(m_lhs);
|
const ActualLhsType lhs = LhsBlasTraits::extract(m_lhs);
|
||||||
@@ -203,16 +203,16 @@ struct SelfadjointProductMatrix<Lhs,LhsMode,false,Rhs,0,true>
|
|||||||
EvalToDest = (Dest::InnerStrideAtCompileTime==1),
|
EvalToDest = (Dest::InnerStrideAtCompileTime==1),
|
||||||
UseRhs = (_ActualRhsType::InnerStrideAtCompileTime==1)
|
UseRhs = (_ActualRhsType::InnerStrideAtCompileTime==1)
|
||||||
};
|
};
|
||||||
|
|
||||||
internal::gemv_static_vector_if<ResScalar,Dest::SizeAtCompileTime,Dest::MaxSizeAtCompileTime,!EvalToDest> static_dest;
|
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;
|
internal::gemv_static_vector_if<RhsScalar,_ActualRhsType::SizeAtCompileTime,_ActualRhsType::MaxSizeAtCompileTime,!UseRhs> static_rhs;
|
||||||
|
|
||||||
ei_declare_aligned_stack_constructed_variable(ResScalar,actualDestPtr,dest.size(),
|
ei_declare_aligned_stack_constructed_variable(ResScalar,actualDestPtr,dest.size(),
|
||||||
EvalToDest ? dest.data() : static_dest.data());
|
EvalToDest ? dest.data() : static_dest.data());
|
||||||
|
|
||||||
ei_declare_aligned_stack_constructed_variable(RhsScalar,actualRhsPtr,rhs.size(),
|
ei_declare_aligned_stack_constructed_variable(RhsScalar,actualRhsPtr,rhs.size(),
|
||||||
UseRhs ? const_cast<RhsScalar*>(rhs.data()) : static_rhs.data());
|
UseRhs ? const_cast<RhsScalar*>(rhs.data()) : static_rhs.data());
|
||||||
|
|
||||||
if(!EvalToDest)
|
if(!EvalToDest)
|
||||||
{
|
{
|
||||||
#ifdef EIGEN_DENSE_STORAGE_CTOR_PLUGIN
|
#ifdef EIGEN_DENSE_STORAGE_CTOR_PLUGIN
|
||||||
@@ -221,7 +221,7 @@ struct SelfadjointProductMatrix<Lhs,LhsMode,false,Rhs,0,true>
|
|||||||
#endif
|
#endif
|
||||||
MappedDest(actualDestPtr, dest.size()) = dest;
|
MappedDest(actualDestPtr, dest.size()) = dest;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!UseRhs)
|
if(!UseRhs)
|
||||||
{
|
{
|
||||||
#ifdef EIGEN_DENSE_STORAGE_CTOR_PLUGIN
|
#ifdef EIGEN_DENSE_STORAGE_CTOR_PLUGIN
|
||||||
@@ -230,8 +230,8 @@ struct SelfadjointProductMatrix<Lhs,LhsMode,false,Rhs,0,true>
|
|||||||
#endif
|
#endif
|
||||||
Map<typename _ActualRhsType::PlainObject>(actualRhsPtr, rhs.size()) = rhs;
|
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)>
|
internal::product_selfadjoint_vector<Scalar, Index, (internal::traits<_ActualLhsType>::Flags&RowMajorBit) ? RowMajor : ColMajor, int(LhsUpLo), bool(LhsBlasTraits::NeedToConjugate), bool(RhsBlasTraits::NeedToConjugate)>
|
||||||
(
|
(
|
||||||
lhs.rows(), // size
|
lhs.rows(), // size
|
||||||
@@ -240,7 +240,7 @@ struct SelfadjointProductMatrix<Lhs,LhsMode,false,Rhs,0,true>
|
|||||||
actualDestPtr, // result info
|
actualDestPtr, // result info
|
||||||
actualAlpha // scale factor
|
actualAlpha // scale factor
|
||||||
);
|
);
|
||||||
|
|
||||||
if(!EvalToDest)
|
if(!EvalToDest)
|
||||||
dest = MappedDest(actualDestPtr, dest.size());
|
dest = MappedDest(actualDestPtr, dest.size());
|
||||||
}
|
}
|
||||||
|
|||||||
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
|
||||||
COMMAND doxygen Doxyfile-unsupported # run doxygen twice to get proper eigen <=> unsupported cross references
|
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 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
|
COMMAND ${CMAKE_COMMAND} -E rename eigen-doc html
|
||||||
WORKING_DIRECTORY ${Eigen_BINARY_DIR}/doc)
|
WORKING_DIRECTORY ${Eigen_BINARY_DIR}/doc)
|
||||||
|
|
||||||
|
|||||||
@@ -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>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -4,16 +4,21 @@
|
|||||||
# You should call this script with USER set as you want, else some default
|
# You should call this script with USER set as you want, else some default
|
||||||
# will be used
|
# will be used
|
||||||
USER=${USER:-'orzel'}
|
USER=${USER:-'orzel'}
|
||||||
|
UPLOAD_DIR=dox
|
||||||
|
|
||||||
#ulimit -v 1024000
|
#ulimit -v 1024000
|
||||||
|
|
||||||
# step 1 : build
|
# step 1 : build
|
||||||
|
rm build/doc/html -Rf
|
||||||
mkdir build -p
|
mkdir build -p
|
||||||
(cd build && cmake .. && make doc) || { echo "make failed"; exit 1; }
|
(cd build && cmake .. && make doc) || { echo "make failed"; exit 1; }
|
||||||
|
|
||||||
#step 2 : upload
|
#step 2 : upload
|
||||||
# (the '/' at the end of path is very important, see rsync documentation)
|
# (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"
|
echo "Uploaded successfully"
|
||||||
|
|
||||||
|
|||||||
@@ -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.
|
// for linear algebra.
|
||||||
//
|
//
|
||||||
// Copyright (C) 2009 Thomas Capricelli <orzel@freehackers.org>
|
// Copyright (C) 2009 Thomas Capricelli <orzel@freehackers.org>
|
||||||
|
|||||||
Reference in New Issue
Block a user