Skip to content

Commit

Permalink
convenience function for matrix generation. Remove some comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
rileyjmurray committed Jul 11, 2024
1 parent b106689 commit 109a96a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 0 additions & 8 deletions RandLAPACK/drivers/rl_krillx.hh
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@ namespace RandLAPACK {

using std::vector;

// TODO: make an interface for objects that be called as G(i,j)
// or G.block_eval( ... arguments for computing submatrices of kernel matrices ... )
//
// ^ Maybe that'll just be an extension of the LinearOperator interface?
//
// Uhh ... probably not, since that interface already has an operator() definition.
// maybe overloading saves us?

template <typename T, typename FUNC, typename SEMINORM, typename STATE>
STATE krill_separable_rpchol(
int64_t n, FUNC &G, vector<T> &mus, vector<T> &H, vector<T> &X, T tol,
Expand Down
8 changes: 8 additions & 0 deletions RandLAPACK/misc/rl_gen.hh
Original file line number Diff line number Diff line change
Expand Up @@ -532,5 +532,13 @@ void mat_gen(
break;
}
}

template <typename T, typename RNG>
std::vector<T> mat_gen(mat_gen_info<T> &info, RandBLAS::RNGState<RNG> &state) {
std::vector<T> A(info.rows * info.cols, 0.0);
mat_gen(info, A.data(), state);
return A;
}

}
#endif

0 comments on commit 109a96a

Please sign in to comment.