diff --git a/Jenkinsfile b/Jenkinsfile index 26be1f2a2ab..5747b3a12b9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -243,12 +243,7 @@ pipeline { } stage('Full Unit Tests') { - agent { - docker { - image 'stanorg/ci:gpu' - label 'linux' - } - } + agent { label 'gg-linux' } when { expression { !skipRemainingStages @@ -257,17 +252,17 @@ pipeline { steps { unstash 'MathSetup' // Set Stan local compiler flags to use the new TBB interface - sh """ - export TBB_INC=\$(pwd)/lib/tbb_2020.3/include - export TBB_LIB=\$(pwd)/lib/tbb - echo TBB_INTERFACE_NEW=true > make/local - """ + // sh """ + // export TBB_INC=\$(pwd)/lib/tbb_2020.3/include + // export TBB_LIB=\$(pwd)/lib/tbb + // echo TBB_INTERFACE_NEW=true > make/local + // """ sh "echo CXXFLAGS += -fsanitize=address >> make/local" script { if (isUnix()) { - runTests("test/unit/math/test_ad_test.cpp", false) + runTests("test/unit", false) } else { - runTestsWin("test/unit/math/test_ad_test.cpp", true) + runTestsWin("test/unit", true) } } } diff --git a/stan/math/prim/fun/to_matrix.hpp b/stan/math/prim/fun/to_matrix.hpp index 8f97574bc01..61cb1182eba 100644 --- a/stan/math/prim/fun/to_matrix.hpp +++ b/stan/math/prim/fun/to_matrix.hpp @@ -11,20 +11,35 @@ namespace math { /** * Returns a matrix with dynamic dimensions constructed from an - * Eigen matrix which is either a row vector, column vector, - * or matrix. - * The runtime dimensions will be the same as the input. + * Eigen matrix. * * @tparam EigMat type of the matrix * * @param x matrix * @return the matrix representation of the input */ -template * = nullptr> +template * = nullptr> inline EigMat to_matrix(EigMat&& x) { return std::forward(x); } +/** + * Returns a matrix with dynamic dimensions constructed from an + * Eigen row or column vector. + * The runtime dimensions will be the same as the input. + * + * @tparam EigMat type of the vector/row vector + * + * @param x input vector/row vector + * @return the matrix representation of the input + */ +template * = nullptr> +inline auto to_matrix(EigVec&& matrix) { + return Eigen::Matrix< + value_type_t, + Eigen::Dynamic, Eigen::Dynamic>(std::forward(matrix)); +} + /** * Returns a matrix representation of a standard vector of Eigen * row vectors with the same dimensions and indexing order.