Skip to content

Commit 0bd7e69

Browse files
committed
Rename prevForce
1 parent 245d1b2 commit 0bd7e69

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

external/Actor.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ SYCL_EXTERNAL std::array<int, 2> Actor::getBBox() const { return bBox; }
3434

3535
SYCL_EXTERNAL uint Actor::getSeed() const { return seed; }
3636

37-
SYCL_EXTERNAL float Actor::getPrevForce() const { return prevForce; }
37+
SYCL_EXTERNAL float Actor::getForce() const { return force; }
3838

3939
SYCL_EXTERNAL void Actor::setPos(vecType newPos) { pos = newPos; }
4040

@@ -60,8 +60,8 @@ SYCL_EXTERNAL void Actor::setBBox(std::array<int, 2> newBBox) {
6060

6161
SYCL_EXTERNAL void Actor::setSeed(uint newSeed) { seed = newSeed; }
6262

63-
SYCL_EXTERNAL void Actor::setPrevForce(float newPrevForce) {
64-
prevForce = newPrevForce;
63+
SYCL_EXTERNAL void Actor::setForce(float newForce) {
64+
force = newForce;
6565
}
6666

6767
SYCL_EXTERNAL void Actor::checkAtDestination(std::array<vecType, 2> destination,

external/Actor.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class Actor {
2424
bool heatmapEnabled;
2525
std::array<int, 2> bBox;
2626
uint seed;
27-
float prevForce;
27+
float force;
2828

2929
public:
3030
Actor(vecType pPos, vecType pVelocity, float pdesiredSpeed, int pPathId,
@@ -43,7 +43,7 @@ class Actor {
4343
SYCL_EXTERNAL bool getHeatmapEnabled() const;
4444
SYCL_EXTERNAL std::array<int, 2> getBBox() const;
4545
SYCL_EXTERNAL uint getSeed() const;
46-
SYCL_EXTERNAL float getPrevForce() const;
46+
SYCL_EXTERNAL float getForce() const;
4747

4848
SYCL_EXTERNAL void setPos(vecType newPos);
4949
SYCL_EXTERNAL void setVelocity(vecType newVelocity);
@@ -52,7 +52,7 @@ class Actor {
5252
SYCL_EXTERNAL void setColor(std::array<int, 3> newColor);
5353
SYCL_EXTERNAL void setBBox(std::array<int, 2> newBBox);
5454
SYCL_EXTERNAL void setSeed(uint newSeed);
55-
SYCL_EXTERNAL void setPrevForce(float newPrevForce);
55+
SYCL_EXTERNAL void setForce(float newForce);
5656

5757
SYCL_EXTERNAL void checkAtDestination(std::array<vecType, 2> destination,
5858
int pathSize);

external/DifferentialEq.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ SYCL_EXTERNAL void differentialEq(
101101

102102
#ifdef STATS
103103
if (!currentActor->getAtDestination()) {
104-
currentActor->setPrevForce(magnitude(forceSum));
104+
currentActor->setForce(magnitude(forceSum));
105105
}
106106
#endif
107107

external/Stats.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ void updateStats(sycl::queue myQueue, sycl::buffer<Actor> actorBuf,
2525
forceSumReduction,
2626
[=](sycl::id<1> index, auto &sum) {
2727
if (!actorAcc[index].getAtDestination()) {
28-
sum += actorAcc[index].getPrevForce();
28+
sum += actorAcc[index].getForce();
2929
}
3030
});
3131
});

0 commit comments

Comments
 (0)