MCPcopy Create free account
hub / github.com/SZAILAB/MaterialDFT-Demo / copy_column_block

Function copy_column_block

cpp_core/src/davidson.cpp:1758–1772  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1756}
1757
1758void copy_column_block(
1759 const std::vector<Complex>& src,
1760 int n_pw,
1761 int src_offset,
1762 int n_cols,
1763 std::vector<Complex>* dst
1764) {
1765 dst->assign(static_cast<std::size_t>(n_pw * n_cols), Complex{0.0, 0.0});
1766 for (int j = 0; j < n_cols; ++j) {
1767 for (int i = 0; i < n_pw; ++i) {
1768 (*dst)[static_cast<std::size_t>(i + n_pw * j)] =
1769 src[static_cast<std::size_t>(i + n_pw * (src_offset + j))];
1770 }
1771 }
1772}
1773
1774void write_column_block(
1775 const std::vector<Complex>& src,

Calls

no outgoing calls

Tested by

no test coverage detected