Commit 1b8f2cf4 authored by Doak, Peter W.'s avatar Doak, Peter W.
Browse files

clang requires stricter matrix template parameters

parent 36590367
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -254,7 +254,7 @@ private:

  ValueType* data_ = nullptr;

  template <class ScalarType2, DeviceType device_name2>
  template <class ScalarType2, DeviceType device_name2, class ALLOC2>
  friend class dca::linalg::Matrix;
};

+4 −4
Original line number Diff line number Diff line
@@ -295,8 +295,8 @@ void insertRow(Matrix<Scalar, CPU, ALLOC>& mat, int i) {
// Preconditions: mat is a square matrix.
// Postconditions: ipiv and work are resized to the needed dimension.
// \todo consider doing inverse at full precision reguardless of incoming Scalar precision
template <typename Scalar, DeviceType device_name, template <typename, DeviceType> class MatrixType>
void inverse(MatrixType<Scalar, device_name>& mat, Vector<int, CPU>& ipiv,
  template <typename Scalar, DeviceType device_name, class ALLOC, template <typename, DeviceType, class> class MatrixType>
  void inverse(MatrixType<Scalar, device_name, ALLOC>& mat, Vector<int, CPU>& ipiv,
             Vector<Scalar, device_name>& work) {
  assert(mat.is_square());

@@ -312,8 +312,8 @@ void inverse(MatrixType<Scalar, device_name>& mat, Vector<int, CPU>& ipiv,
                                        work.ptr(), lwork);
}

template <typename Scalar, DeviceType device_name, template <typename, DeviceType> class MatrixType>
void inverse(MatrixType<Scalar, device_name>& mat) {
  template <typename Scalar, DeviceType device_name, class ALLOC, template <typename, DeviceType, class> class MatrixType>
  void inverse(MatrixType<Scalar, device_name, ALLOC>& mat) {
  Vector<int, CPU> ipiv;
  Vector<Scalar, device_name> work;
  inverse(mat, ipiv, work);
+2 −2
Original line number Diff line number Diff line
@@ -33,8 +33,8 @@ namespace util {

// Returns optimal lwork for inverse.
// In: mat
template <typename ScalarType,  template <typename, DeviceType> class MatrixType>
int getInverseWorkSize(MatrixType<ScalarType, CPU>& mat) {
  template <typename ScalarType, class ALLOC, template <typename, DeviceType, class> class MatrixType>
int getInverseWorkSize(MatrixType<ScalarType, CPU, ALLOC>& mat) {
  assert(mat.is_square());

  ScalarType tmp;
+1 −1
Original line number Diff line number Diff line
@@ -436,7 +436,7 @@ void CtauxClusterSolver<device_t, Parameters, Data, DIST>::computeErrorBars() {

    for (std::size_t channel = 0; channel < G4.size(); ++channel) {
      G4[channel] /= TpComplex{parameters_.get_beta() * parameters_.get_beta()} *
                     TpComplex{accumulator_.get_accumulated_sign().sum()};
										  TpComplex{static_cast<Real>(accumulator_.get_accumulated_sign().sum())};
      concurrency_.average_and_compute_stddev(G4[channel], data_.get_G4_stdv()[channel]);
    }
  }