Browse Source

derived majorType from params

Alec Jacobson 3 years ago
parent
commit
e2904e4df6
2 changed files with 6 additions and 4 deletions
  1. 4 2
      include/igl/repmat.cpp
  2. 2 2
      include/igl/repmat.h

+ 4 - 2
include/igl/repmat.cpp

@@ -31,10 +31,10 @@ IGL_INLINE void igl::repmat(
 
 
 template <typename T, int majorType>
 template <typename T, int majorType>
 IGL_INLINE void igl::repmat(
 IGL_INLINE void igl::repmat(
-  const Eigen::SparseMatrix<T> & A,
+  const Eigen::SparseMatrix<T, majorType> & A,
   const int r,
   const int r,
   const int c,
   const int c,
-  Eigen::SparseMatrix<T> & B)
+  Eigen::SparseMatrix<T, majorType> & B)
 {
 {
   assert(r>0);
   assert(r>0);
   assert(c>0);
   assert(c>0);
@@ -66,6 +66,8 @@ IGL_INLINE void igl::repmat(
 #ifdef IGL_STATIC_LIBRARY
 #ifdef IGL_STATIC_LIBRARY
 // Explicit template instantiation
 // Explicit template instantiation
 // generated by autoexplicit.sh
 // generated by autoexplicit.sh
+template void igl::repmat<double, 0>(Eigen::SparseMatrix<double, 0, int> const&, int, int, Eigen::SparseMatrix<double, 0, int>&);
+// generated by autoexplicit.sh
 template void igl::repmat<Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> > const&, int, int, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&);
 template void igl::repmat<Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> > const&, int, int, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&);
 template void igl::repmat<Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, 1, 0, -1, 1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> > const&, int, int, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >&);
 template void igl::repmat<Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, 1, 0, -1, 1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> > const&, int, int, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >&);
 template void igl::repmat<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, int, int, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&);
 template void igl::repmat<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, int, int, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&);

+ 2 - 2
include/igl/repmat.h

@@ -40,10 +40,10 @@ namespace igl
     Eigen::PlainObjectBase<DerivedB> & B);
     Eigen::PlainObjectBase<DerivedB> & B);
   template <typename T, int majorType>
   template <typename T, int majorType>
   IGL_INLINE void repmat(
   IGL_INLINE void repmat(
-    const Eigen::SparseMatrix<T> & A,
+    const Eigen::SparseMatrix<T, majorType> & A,
     const int r,
     const int r,
     const int c,
     const int c,
-    Eigen::SparseMatrix<T> & B);
+    Eigen::SparseMatrix<T, majorType> & B);
 }
 }
 
 
 #ifndef IGL_STATIC_LIBRARY
 #ifndef IGL_STATIC_LIBRARY