Skip to content

Commit

Permalink
Tuning job insertion
Browse files Browse the repository at this point in the history
  • Loading branch information
ifilot committed Dec 6, 2023
1 parent cb0b4a1 commit f77c46b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pyqint/integrals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@ std::vector<double> Integrator::evaluate_cgfs(const std::vector<CGF>& cgfs,
for(size_t l=0; l<sz; l++) {
size_t kl = k * (k+1)/2 + l;
if(ij <= kl) {
size_t idx = this->teindex(i,j,k,l);
const size_t idx = this->teindex(i,j,k,l);

if(idx >= tedouble.size()) {
throw std::runtime_error("Process tried to access illegal array position");
}

if(tedouble[idx] < 0.0) {
tedouble[idx] = 1.0;
jobs.push_back({idx, i, j, k, l});
jobs.emplace_back(std::array<size_t,5>({idx, i, j, k, l}));
}
}
}
Expand Down Expand Up @@ -216,7 +216,7 @@ std::vector<double> Integrator::evaluate_geometric_derivatives(const std::vector

if(tedouble[idx] < 0.0) {
tedouble[idx] = 1.0;
jobs.push_back({idx, i, j, k, l, n, d});
jobs.emplace_back(std::array<size_t, 7>({idx, i, j, k, l, n, d}));
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions pyqint/integrals.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#include <unordered_map>
#include <omp.h>
#include <cstring>
#include <vector>
#include <array>

#include "gamma.h"
#include "cgf.h"
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def find_windows_versions():
extra_compile_args = ["/openmp"]
extra_link_args = []
elif sys.platform == 'darwin':
extra_compile_args = ["-Wno-date-time", "-fPIC", "-std=c++11"]
extra_compile_args = ["-Wno-date-time", "-fPIC", "-std=c++14"]
extra_link_args = []

ext_modules = [
Expand Down

0 comments on commit f77c46b

Please sign in to comment.