<commit_before>/* Copyright 2012-2017 CNRS-UM LIRMM, CNRS-AIST JRL
*
* This file is part of Eigen3ToPython.
*
* Eigen3ToPython is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Eigen3ToPython is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Eigen3ToPython.  If not, see <http://www.gnu.org/licenses/>.
*/

#include <Eigen/Dense>
#include <Eigen/Geometry>
#include <unsupported/Eigen/Polynomials>
#include <sstream>

namespace Eigen
{

typedef Matrix<double, 6, 1> Vector6d;
typedef Matrix<double, 6, 6> Matrix6d;
typedef Stride<Dynamic, Dynamic> DynStride;

template <typename Mtype>
#if EIGEN_VERSION_AT_LEAST(3, 3, 0)
using DynMap = Map<Mtype, AlignmentType::Aligned16, DynStride>;
#elif EIGEN_VERSION_AT_LEAST(3, 2, 9)
using DynMap = Map<Mtype, AlignmentType::Aligned, DynStride>;
#else
using DynMap = Map<Mtype, Aligned, DynStride>;
#endif

}

template<typename T, int r, int c>
Eigen::Matrix<T, r, c> MatrixFromDynMap(const Eigen::DynMap<Eigen::Matrix<T, r, c>> & map)
{
  return Eigen::Matrix<T, r, c>(map);
}

template<typename T, int r, int c, int opr, int opc>
Eigen::Matrix<T, r, opc> EigenMul(const Eigen::Matrix<T, r, c> & lhs, const Eigen::Matrix<T, opr, opc> & rhs)
{
  return lhs*rhs;
}

template<typename T, int r, int c, int opr, int opc>
Eigen::Matrix<T, opr, opc> EigenFixedMul(const Eigen::Matrix<T, r, c> & lhs, const Eigen::Matrix<T, opr, opc> & rhs)
{
  return lhs*rhs;
}<commit_msg>No Eigen::AlignmentType in Eigen 3.3 beta<commit_after>/* Copyright 2012-2017 CNRS-UM LIRMM, CNRS-AIST JRL
*
* This file is part of Eigen3ToPython.
*
* Eigen3ToPython is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Eigen3ToPython is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Eigen3ToPython.  If not, see <http://www.gnu.org/licenses/>.
*/

#include <Eigen/Dense>
#include <Eigen/Geometry>
#include <unsupported/Eigen/Polynomials>
#include <sstream>

namespace Eigen
{

typedef Matrix<double, 6, 1> Vector6d;
typedef Matrix<double, 6, 6> Matrix6d;
typedef Stride<Dynamic, Dynamic> DynStride;

template <typename Mtype>
#if EIGEN_VERSION_AT_LEAST(3, 3, 0)
using DynMap = Map<Mtype, AlignmentType::Aligned16, DynStride>;
#elif EIGEN_VERSION_AT_LEAST(3, 2, 90)
using DynMap = Map<Mtype, Aligned, DynStride>;
#elif EIGEN_VERSION_AT_LEAST(3, 2, 9)
using DynMap = Map<Mtype, AlignmentType::Aligned, DynStride>;
#else
using DynMap = Map<Mtype, Aligned, DynStride>;
#endif

}

template<typename T, int r, int c>
Eigen::Matrix<T, r, c> MatrixFromDynMap(const Eigen::DynMap<Eigen::Matrix<T, r, c>> & map)
{
  return Eigen::Matrix<T, r, c>(map);
}

template<typename T, int r, int c, int opr, int opc>
Eigen::Matrix<T, r, opc> EigenMul(const Eigen::Matrix<T, r, c> & lhs, const Eigen::Matrix<T, opr, opc> & rhs)
{
  return lhs*rhs;
}

template<typename T, int r, int c, int opr, int opc>
Eigen::Matrix<T, opr, opc> EigenFixedMul(const Eigen::Matrix<T, r, c> & lhs, const Eigen::Matrix<T, opr, opc> & rhs)
{
  return lhs*rhs;
}
{'fraction_non_alphanumeric': 0.11645962732919254, 'fraction_numerical': 0.015527950310559006, 'mean_word_length': 5.24394184168013, 'pattern_counts': {'":': 0, '<': 54, '<?xml version=': 0, '>': 54, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5184562', 'n_tokens_mistral': 1448, 'n_tokens_neox': 1330, 'n_words': 478}