Skip to content

Parallel calculation of Array2<f64> values #1273

Discussion options

You must be logged in to vote

@adamreichold Thank you for your hint.

After a lot of trying around and not too much documentation, I found a way to do this, but I am convinced that this solution is "awful". There is definetely a better way of doing this, but this seemed to work:

//* New version: par_map_assign_into */
let S_matr_tmp = Array2::<f64>::zeros((n, n));
self.mol.wfn_total.HF_Matrices.S_matr = Array2::<f64>::zeros((n, n));

Zip::indexed(&S_matr_tmp).par_map_assign_into(
    &mut self.mol.wfn_total.HF_Matrices.S_matr,
    |(i, j), x| {
        if i == j {
            1.0
        } else {
            calc_overlap_int_cgto(
                &self.mol.wfn_total.basis_set_total.basis_set_cgtos[i],
                &s…

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
6 replies
@MartinRJDagleish
Comment options

@adamreichold
Comment options

@MartinRJDagleish
Comment options

@adamreichold
Comment options

@MartinRJDagleish
Comment options

Answer selected by MartinRJDagleish
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants