Skip to content

Commit

Permalink
fix bug on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Davis authored and Matthew Davis committed Aug 20, 2020
1 parent 52aa23d commit 70a48b3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
20 changes: 10 additions & 10 deletions src/Lints.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ struct Atom

struct Molecule
{
Molecule(jlcxx::ArrayRef<long> zs, jlcxx::ArrayRef<double> coords) {
Molecule(jlcxx::ArrayRef<int64_t> zs, jlcxx::ArrayRef<double> coords) {
std::vector<libint2::Atom> _atoms;
this->len = zs.size();
double x, y, z;
Expand Down Expand Up @@ -189,11 +189,11 @@ struct OEIEngine
}
this->_sz = n1*n2;
}
auto chunk(jlcxx::ArrayRef<long> dims, int s1, int s2, BasisSet& obs1, BasisSet& obs2) {
void chunk(jlcxx::ArrayRef<int64_t> dims, int s1, int s2, BasisSet& obs1, BasisSet& obs2) {
dims[0] = obs1.basis[s1].size();
dims[1] = obs2.basis[s2].size();
}
auto startpoint(jlcxx::ArrayRef<long> coords, int s1, int s2, BasisSet& obs1, BasisSet& obs2) {
void startpoint(jlcxx::ArrayRef<int64_t> coords, int s1, int s2, BasisSet& obs1, BasisSet& obs2) {
coords[0] = this->obs1_shell2bf[s1];
coords[1] = this->obs2_shell2bf[s2];
}
Expand Down Expand Up @@ -319,13 +319,13 @@ struct ERIEngine

}

auto chunk(jlcxx::ArrayRef<long> dims, int s1, int s2, int s3, int s4, BasisSet& obs) {
auto chunk(jlcxx::ArrayRef<int64_t> dims, int s1, int s2, int s3, int s4, BasisSet& obs) {
dims[0] = obs.basis[s1].size();
dims[1] = obs.basis[s2].size();
dims[2] = obs.basis[s3].size();
dims[3] = obs.basis[s4].size();
}
auto startpoint(jlcxx::ArrayRef<long> coords, int s1, int s2, int s3, int s4, BasisSet& obs) {
auto startpoint(jlcxx::ArrayRef<int64_t> coords, int s1, int s2, int s3, int s4, BasisSet& obs) {
coords[0] = this->shell2bf[s1];
coords[1] = this->shell2bf[s2];
coords[2] = this->shell2bf[s3];
Expand Down Expand Up @@ -405,24 +405,24 @@ struct DFEngine
this->_jsz = n1*n2;
}

auto bchunk(jlcxx::ArrayRef<long> dims, int s3, int s2, int s1, BasisSet& obs, BasisSet& dfobs) {
auto bchunk(jlcxx::ArrayRef<int64_t> dims, int s3, int s2, int s1, BasisSet& obs, BasisSet& dfobs) {
dims[0] = dfobs.basis[s3].size();
dims[1] = obs.basis[s2].size();
dims[2] = obs.basis[s1].size();
}

auto jchunk(jlcxx::ArrayRef<long> dims, int s1, int s2, BasisSet& dfobs) {
auto jchunk(jlcxx::ArrayRef<int64_t> dims, int s1, int s2, BasisSet& dfobs) {
dims[0] = dfobs.basis[s1].size();
dims[1] = dfobs.basis[s2].size();
}

auto bstartpoint(jlcxx::ArrayRef<long> coords, int s3, int s2, int s1, BasisSet& obs, BasisSet& dfobs) {
auto bstartpoint(jlcxx::ArrayRef<int64_t> coords, int s3, int s2, int s1, BasisSet& obs, BasisSet& dfobs) {
coords[0] = this->dfobs_shell2bf[s3];
coords[1] = this->obs_shell2bf[s2];
coords[2] = this->obs_shell2bf[s1];
}

auto jstartpoint(jlcxx::ArrayRef<long> coords, int s1, int s2, BasisSet& dfobs) {
auto jstartpoint(jlcxx::ArrayRef<int64_t> coords, int s1, int s2, BasisSet& dfobs) {
coords[0] = this->dfobs_shell2bf[s1];
coords[1] = this->dfobs_shell2bf[s2];
}
Expand Down Expand Up @@ -455,7 +455,7 @@ JLCXX_MODULE Libint2(jlcxx::Module& mod)

mod.add_type<Molecule>("Molecule")
.constructor<std::string&>()
.constructor<jlcxx::ArrayRef<long>,jlcxx::ArrayRef<double>>()
.constructor<jlcxx::ArrayRef<int64_t>,jlcxx::ArrayRef<double>>()
.method("get_Atom",&Molecule::get_Atom)
.method("get_Atoms",&Molecule::get_Atoms)
.method("get_size",&Molecule::get_size)
Expand Down
6 changes: 3 additions & 3 deletions src/make_ND.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ function make_2D(destination,engine,basis)
for _i=1:s, _j=_i:s
i = _i-1
j = _j-1
Lints.startpoint(engine,buf1,i,j,basis,basis)# .+ 1
Lints.chunk(engine,buf2,i,j,basis,basis)# .- 1
Lints.startpoint(engine,buf1,i,j,basis,basis)
Lints.chunk(engine,buf2,i,j,basis,basis)
sp = buf1
chonk = buf2
_chonk = chonk# .+ 1
_chonk = chonk
r1 = sp[1]+1:chonk[1]+sp[1]
r2 = sp[2]+1:chonk[2]+sp[2]
Lints.compute(engine,buf3,i,j,basis,basis)
Expand Down

2 comments on commit 70a48b3

@mdav2
Copy link
Member

@mdav2 mdav2 commented on 70a48b3 Aug 20, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/19860

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.3.0 -m "<description of version>" 70a48b3d2dbe1cfd1fe96007db617f0c0db6adf7
git push origin v0.3.0

Please sign in to comment.