diff --git a/src/ComputeForce.cuh b/src/ComputeForce.cuh index 71eb69af6c85e25188079cc7feea95f1d122fcc3..3291dab23c8c8166c448c7af16644190ebbec3d2 100644 --- a/src/ComputeForce.cuh +++ b/src/ComputeForce.cuh @@ -3,7 +3,7 @@ // Terrance Howard <heyterrance@gmail.com> #pragma once -#include "myAssert.h" +#include <cassert> #include "CudaUtil.cuh" #include "TabulatedMethods.cuh" @@ -286,7 +286,7 @@ void createPairlists(Vector3* __restrict__ pos, const int num, const int numRepl // Skip excludes // Implementation requires that aj increases monotonically - myAssert( ajLast < aj ); ajLast = aj; // TODO: remove this sanity check + assert( ajLast < aj ); ajLast = aj; // TODO: remove this sanity check while (nextEx >= 0 && nextEx < (aj - repID * num)) // TODO get rid of this nextEx = (currEx < ex_end - 1) ? excludes[++currEx].ind2 : -1; if (nextEx == (aj - repID * num)) { diff --git a/src/Configuration.cpp b/src/Configuration.cpp index 3ba66018cb51fac9516d85bc347f02453c808aeb..07b2796442586fb5431b0b71401f56f6412b3831 100644 --- a/src/Configuration.cpp +++ b/src/Configuration.cpp @@ -1,5 +1,5 @@ #include "Configuration.h" -#include "myAssert.h" +#include <cassert> #define gpuErrchk(ans) { gpuAssert((ans), __FILE__, __LINE__); } @@ -1235,7 +1235,7 @@ void Configuration::readExcludes() for (int i = 0; i < numExcludes; i++) { if (excludes[i].ind1 != currPart) { currPart = excludes[i].ind1; - myAssert(currPart < num); + assert(currPart < num); excludeMap[currPart].x = i; if (lastPart >= 0) excludeMap[lastPart].y = i; diff --git a/src/RigidBodyType.cu b/src/RigidBodyType.cu index 5d4d3a4ebd71ad31109e9d0fc0c62804d8127850..107020dd134c57134bbc2c081905b7ae804e5de3 100644 --- a/src/RigidBodyType.cu +++ b/src/RigidBodyType.cu @@ -1,4 +1,4 @@ -#include "myAssert.h" +#include <cassert> #include "Configuration.h" #include "RigidBodyType.h" #include "Reservoir.h" @@ -298,7 +298,7 @@ void RigidBodyType::initializeParticleLists() { if (gridNames[k] == gridName) { // Copy type j particles to particles[i] memcpy( &(particles[i][pid]), tmp, sizeof(int)*currId ); - myAssert(currId == conf->numPartsOfType[j]); + assert(currId == conf->numPartsOfType[j]); pid += conf->numPartsOfType[j]; } } diff --git a/src/TabulatedMethods.cuh b/src/TabulatedMethods.cuh index 564cee961f5927959ede8588a157fd70be09131b..f3af187b5aa5437e6ef1e36ddf326a3872f813e6 100644 --- a/src/TabulatedMethods.cuh +++ b/src/TabulatedMethods.cuh @@ -44,8 +44,8 @@ __device__ inline void computeAngle(const TabulatedAnglePotential* __restrict__ // tableAngle[1] stores the potential at angle_step * 2, etc. // 'home' is the index after which 'convertedAngle' would appear if it were stored in the table int home = int(floor(angle)); - myAssert(home >= 0); - myAssert(home+1 < a->size); + assert(home >= 0); + assert(home+1 < a->size); // // Make angle the distance from [0,1) from the first index in the potential array index // angle -= home; @@ -112,8 +112,8 @@ __device__ inline void computeDihedral(const TabulatedDihedralPotential* __restr int home = (int) floorf(t); t = t - home; - myAssert(home >= 0); - myAssert(home < d->size); + assert(home >= 0); + assert(home < d->size); // home = home % size; int home1 = (home + 1) >= d->size ? (home+1-d->size) : home+1; @@ -127,7 +127,7 @@ __device__ inline void computeDihedral(const TabulatedDihedralPotential* __restr // avoid singularity when one angle is straight force = (crossABC.rLength() > 1.0f || crossBCD.rLength() > 1.0f) ? 0.0f : force; - myAssert( force < 10000.0f ); + assert( force < 10000.0f ); f1 *= force; f2 *= force; f3 *= force; diff --git a/src/myAssert.cu b/src/myAssert.cu deleted file mode 100644 index 99f57d28b215628bcfaef641ff29b565bed2cfa5..0000000000000000000000000000000000000000 --- a/src/myAssert.cu +++ /dev/null @@ -1,8 +0,0 @@ -#include "myAssert.h" - -#ifdef __APPLE__ -__host__ __device__ void myAssert(bool statement) { } -#else -#include <assert.h> -__host__ __device__ void myAssert(bool statement) { assert(statement); } -#endif \ No newline at end of file diff --git a/src/myAssert.h b/src/myAssert.h deleted file mode 100644 index a50c1ce74998d4f96d92fa50011f535e1630f20e..0000000000000000000000000000000000000000 --- a/src/myAssert.h +++ /dev/null @@ -1,4 +0,0 @@ -#pragma once -// #include <assert.h> - -__host__ __device__ void myAssert(bool statement);