Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "reference to hash is ambiguous" errors on GCC >= 6 #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,23 @@
testData/data/

**/*.exe

**/IO.h
**/dataGen.h
**/geometry.h
**/geometryIO.h
**/parallel.h
**/parseCommandLine.h
**/sequence.h
**/uniform
**/utils.h

!common/IO.h
!common/dataGen.h
!common/geometry.h
!common/geometryIO.h
!common/parallel.h
!common/parseCommandLine.h
!common/sequence.h
!common/uniform
!common/utils.h
10 changes: 5 additions & 5 deletions convexHull/geometryData/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ $(COMMON) :
$(PCC) $(PCFLAGS) -c $< -o $@

uniform : uniform.C geometryData.h $(COMMON)
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@ [email protected]
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@.exe [email protected]

toNodes : toNodes.C $(COMMON)
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@ [email protected]
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@.exe [email protected]

plummer : plummer.C geometryData.h $(COMMON)
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@ [email protected]
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@.exe [email protected]

triangles : triangles.C geometryData.h $(COMMON)
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@ [email protected]
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@.exe [email protected]

addRays : addRays.C $(COMMON)
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@ [email protected]
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@.exe [email protected]

clean :
rm -f *.o $(GENERATORS)
Expand Down
8 changes: 4 additions & 4 deletions convexHull/geometryData/plummer.C
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@ using namespace std;

point2d randKuzmin(intT i) {
vect2d v = vect2d(randOnUnitSphere2d(i));
intT j = hash<intT>(i);
double s = hash<double>(j);
intT j = dataGen::hash<intT>(i);
double s = dataGen::hash<double>(j);
double r = sqrt(1.0/((1.0-s)*(1.0-s))-1.0);
return point2d(v*r);
}

point3d randPlummer(intT i) {
vect3d v = vect3d(randOnUnitSphere3d(i));
intT j = hash<intT>(i);
double s = pow(hash<double>(j),2.0/3.0);
intT j = dataGen::hash<intT>(i);
double s = pow(dataGen::hash<double>(j),2.0/3.0);
double r = sqrt(s/(1-s));
return point3d(v*r);
}
Expand Down
10 changes: 5 additions & 5 deletions delaunayRefine/geometryData/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ $(COMMON) :
$(PCC) $(PCFLAGS) -c $< -o $@

uniform : uniform.C geometryData.h $(COMMON)
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@ [email protected]
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@.exe [email protected]

toNodes : toNodes.C $(COMMON)
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@ [email protected]
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@.exe [email protected]

plummer : plummer.C geometryData.h $(COMMON)
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@ [email protected]
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@.exe [email protected]

triangles : triangles.C geometryData.h $(COMMON)
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@ [email protected]
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@.exe [email protected]

addRays : addRays.C $(COMMON)
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@ [email protected]
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@.exe [email protected]

clean :
rm -f *.o $(GENERATORS)
Expand Down
8 changes: 4 additions & 4 deletions delaunayRefine/geometryData/plummer.C
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@ using namespace std;

point2d randKuzmin(intT i) {
vect2d v = vect2d(randOnUnitSphere2d(i));
intT j = hash<intT>(i);
double s = hash<double>(j);
intT j = dataGen::hash<intT>(i);
double s = dataGen::hash<double>(j);
double r = sqrt(1.0/((1.0-s)*(1.0-s))-1.0);
return point2d(v*r);
}

point3d randPlummer(intT i) {
vect3d v = vect3d(randOnUnitSphere3d(i));
intT j = hash<intT>(i);
double s = pow(hash<double>(j),2.0/3.0);
intT j = dataGen::hash<intT>(i);
double s = pow(dataGen::hash<double>(j),2.0/3.0);
double r = sqrt(s/(1-s));
return point3d(v*r);
}
Expand Down
10 changes: 5 additions & 5 deletions delaunayTriangulation/geometryData/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ $(COMMON) :
$(PCC) $(PCFLAGS) -c $< -o $@

uniform : uniform.C geometryData.h $(COMMON)
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@ [email protected]
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@.exe [email protected]

toNodes : toNodes.C $(COMMON)
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@ [email protected]
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@.exe [email protected]

plummer : plummer.C geometryData.h $(COMMON)
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@ [email protected]
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@.exe [email protected]

triangles : triangles.C geometryData.h $(COMMON)
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@ [email protected]
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@.exe [email protected]

addRays : addRays.C $(COMMON)
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@ [email protected]
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@.exe [email protected]

clean :
rm -f *.o $(GENERATORS)
Expand Down
8 changes: 4 additions & 4 deletions delaunayTriangulation/geometryData/plummer.C
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@ using namespace std;

point2d randKuzmin(intT i) {
vect2d v = vect2d(randOnUnitSphere2d(i));
intT j = hash<intT>(i);
double s = hash<double>(j);
intT j = dataGen::hash<intT>(i);
double s = dataGen::hash<double>(j);
double r = sqrt(1.0/((1.0-s)*(1.0-s))-1.0);
return point2d(v*r);
}

point3d randPlummer(intT i) {
vect3d v = vect3d(randOnUnitSphere3d(i));
intT j = hash<intT>(i);
double s = pow(hash<double>(j),2.0/3.0);
intT j = dataGen::hash<intT>(i);
double s = pow(dataGen::hash<double>(j),2.0/3.0);
double r = sqrt(s/(1-s));
return point3d(v*r);
}
Expand Down
10 changes: 5 additions & 5 deletions nBody/geometryData/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ $(COMMON) :
$(PCC) $(PCFLAGS) -c $< -o $@

uniform : uniform.C geometryData.h $(COMMON)
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@ [email protected]
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@.exe [email protected]

toNodes : toNodes.C $(COMMON)
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@ [email protected]
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@.exe [email protected]

plummer : plummer.C geometryData.h $(COMMON)
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@ [email protected]
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@.exe [email protected]

triangles : triangles.C geometryData.h $(COMMON)
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@ [email protected]
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@.exe [email protected]

addRays : addRays.C $(COMMON)
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@ [email protected]
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@.exe [email protected]

clean :
rm -f *.o $(GENERATORS)
Expand Down
8 changes: 4 additions & 4 deletions nBody/geometryData/plummer.C
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@ using namespace std;

point2d randKuzmin(intT i) {
vect2d v = vect2d(randOnUnitSphere2d(i));
intT j = hash<intT>(i);
double s = hash<double>(j);
intT j = dataGen::hash<intT>(i);
double s = dataGen::hash<double>(j);
double r = sqrt(1.0/((1.0-s)*(1.0-s))-1.0);
return point2d(v*r);
}

point3d randPlummer(intT i) {
vect3d v = vect3d(randOnUnitSphere3d(i));
intT j = hash<intT>(i);
double s = pow(hash<double>(j),2.0/3.0);
intT j = dataGen::hash<intT>(i);
double s = pow(dataGen::hash<double>(j),2.0/3.0);
double r = sqrt(s/(1-s));
return point3d(v*r);
}
Expand Down
10 changes: 5 additions & 5 deletions nearestNeighbors/geometryData/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ $(COMMON) :
$(PCC) $(PCFLAGS) -c $< -o $@

uniform : uniform.C geometryData.h $(COMMON)
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@ [email protected]
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@.exe [email protected]

toNodes : toNodes.C $(COMMON)
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@ [email protected]
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@.exe [email protected]

plummer : plummer.C geometryData.h $(COMMON)
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@ [email protected]
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@.exe [email protected]

triangles : triangles.C geometryData.h $(COMMON)
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@ [email protected]
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@.exe [email protected]

addRays : addRays.C $(COMMON)
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@ [email protected]
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@.exe [email protected]

clean :
rm -f *.o $(GENERATORS)
Expand Down
8 changes: 4 additions & 4 deletions nearestNeighbors/geometryData/plummer.C
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@ using namespace std;

point2d randKuzmin(intT i) {
vect2d v = vect2d(randOnUnitSphere2d(i));
intT j = hash<intT>(i);
double s = hash<double>(j);
intT j = dataGen::hash<intT>(i);
double s = dataGen::hash<double>(j);
double r = sqrt(1.0/((1.0-s)*(1.0-s))-1.0);
return point2d(v*r);
}

point3d randPlummer(intT i) {
vect3d v = vect3d(randOnUnitSphere3d(i));
intT j = hash<intT>(i);
double s = pow(hash<double>(j),2.0/3.0);
intT j = dataGen::hash<intT>(i);
double s = pow(dataGen::hash<double>(j),2.0/3.0);
double r = sqrt(s/(1-s));
return point3d(v*r);
}
Expand Down
10 changes: 5 additions & 5 deletions rayCast/geometryData/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ $(COMMON) :
$(PCC) $(PCFLAGS) -c $< -o $@

uniform : uniform.C geometryData.h $(COMMON)
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@ [email protected]
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@.exe [email protected]

toNodes : toNodes.C $(COMMON)
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@ [email protected]
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@.exe [email protected]

plummer : plummer.C geometryData.h $(COMMON)
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@ [email protected]
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@.exe [email protected]

triangles : triangles.C geometryData.h $(COMMON)
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@ [email protected]
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@.exe [email protected]

addRays : addRays.C $(COMMON)
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@ [email protected]
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@.exe [email protected]

clean :
rm -f *.o $(GENERATORS)
Expand Down
8 changes: 4 additions & 4 deletions rayCast/geometryData/plummer.C
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@ using namespace std;

point2d randKuzmin(intT i) {
vect2d v = vect2d(randOnUnitSphere2d(i));
intT j = hash<intT>(i);
double s = hash<double>(j);
intT j = dataGen::hash<intT>(i);
double s = dataGen::hash<double>(j);
double r = sqrt(1.0/((1.0-s)*(1.0-s))-1.0);
return point2d(v*r);
}

point3d randPlummer(intT i) {
vect3d v = vect3d(randOnUnitSphere3d(i));
intT j = hash<intT>(i);
double s = pow(hash<double>(j),2.0/3.0);
intT j = dataGen::hash<intT>(i);
double s = pow(dataGen::hash<double>(j),2.0/3.0);
double r = sqrt(s/(1-s));
return point3d(v*r);
}
Expand Down
10 changes: 10 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{ pkgs ? import (fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-19.09.tar.gz) {}
, stdenv ? pkgs.overrideCC pkgs.stdenv pkgs.gcc7
}:

with pkgs;

stdenv.mkDerivation {
name = "pbbsEnv";
buildInputs = [ gcc ];
}
10 changes: 5 additions & 5 deletions testData/geometryData/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ $(COMMON) :
$(PCC) $(PCFLAGS) -c $< -o $@

uniform : uniform.C geometryData.h $(COMMON)
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@ [email protected]
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@.exe [email protected]

toNodes : toNodes.C $(COMMON)
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@ [email protected]
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@.exe [email protected]

plummer : plummer.C geometryData.h $(COMMON)
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@ [email protected]
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@.exe [email protected]

triangles : triangles.C geometryData.h $(COMMON)
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@ [email protected]
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@.exe [email protected]

addRays : addRays.C $(COMMON)
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@ [email protected]
$(PCC) $(PCFLAGS) $(PLFLAGS) -o $@.exe [email protected]

clean :
rm -f *.o $(GENERATORS)
Expand Down
8 changes: 4 additions & 4 deletions testData/geometryData/plummer.C
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@ using namespace std;

point2d randKuzmin(intT i) {
vect2d v = vect2d(randOnUnitSphere2d(i));
intT j = hash<intT>(i);
double s = hash<double>(j);
intT j = dataGen::hash<intT>(i);
double s = dataGen::hash<double>(j);
double r = sqrt(1.0/((1.0-s)*(1.0-s))-1.0);
return point2d(v*r);
}

point3d randPlummer(intT i) {
vect3d v = vect3d(randOnUnitSphere3d(i));
intT j = hash<intT>(i);
double s = pow(hash<double>(j),2.0/3.0);
intT j = dataGen::hash<intT>(i);
double s = pow(dataGen::hash<double>(j),2.0/3.0);
double r = sqrt(s/(1-s));
return point3d(v*r);
}
Expand Down