Skip to content

Commit

Permalink
Improve precision of includes.
Browse files Browse the repository at this point in the history
(Bessemer/GCC11 has issues if a .cpp file includes both cuda_runtime.h and curand_kernel.h)
This has been tested on Bessemer A100s)
  • Loading branch information
Robadob committed Nov 21, 2022
1 parent 7d001e8 commit 85e61bb
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 6 deletions.
3 changes: 2 additions & 1 deletion include/flamegpu/gpu/CUDAAgent.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@
#include "flamegpu/model/SubAgentData.h"
#include "flamegpu/runtime/detail/curve/curve_rtc.cuh"
#include "flamegpu/sim/AgentInterface.h"
#include "flamegpu/runtime/utility/EnvironmentManager.cuh"

namespace flamegpu {

class CUDAMacroEnvironment;
class CUDAScatter;
class CUDAFatAgent;
struct VarOffsetStruct;
Expand Down
2 changes: 1 addition & 1 deletion include/flamegpu/io/StateReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
#include <unordered_map>
#include <utility>

#include "flamegpu/model/ModelDescription.h"
#include "flamegpu/util/StringPair.h"
#include "flamegpu/model/EnvironmentData.h"
#include "flamegpu/sim/Simulation.h"

namespace flamegpu {

Expand Down
2 changes: 2 additions & 0 deletions include/flamegpu/io/StateWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
namespace flamegpu {

class AgentVector;
class EnvironmentManager;
class Simulation;

namespace io {

Expand Down
6 changes: 2 additions & 4 deletions include/flamegpu/model/ModelDescription.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
#include <string>


#include "flamegpu/gpu/CUDAEnsemble.h"
#include "flamegpu/model/ModelData.h"
#include "flamegpu/gpu/CUDASimulation.h"
#include "flamegpu/runtime/messaging/MessageBruteForce/MessageBruteForceHost.h"

namespace flamegpu {
Expand All @@ -34,8 +32,8 @@ class ModelDescription {
/**
* Simulation accesses the classes internals to convert it to a constant ModelData
*/
friend CUDASimulation::CUDASimulation(const ModelDescription& _model, int argc, const char** argv);
friend CUDAEnsemble::CUDAEnsemble(const ModelDescription& model, int argc, const char** argv);
friend class CUDASimulation;
friend class CUDAEnsemble;
friend class RunPlanVector;
friend class RunPlan;
friend class LoggingConfig;
Expand Down
1 change: 1 addition & 0 deletions src/flamegpu/io/JSONStateWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "flamegpu/pop/AgentVector.h"
#include "flamegpu/gpu/CUDASimulation.h"
#include "flamegpu/util/StringPair.h"
#include "flamegpu/runtime/utility/EnvironmentManager.cuh"

namespace flamegpu {
namespace io {
Expand Down
1 change: 1 addition & 0 deletions src/flamegpu/io/XMLStateWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "flamegpu/model/AgentDescription.h"
#include "flamegpu/gpu/CUDASimulation.h"
#include "flamegpu/pop/AgentVector.h"
#include "flamegpu/runtime/utility/EnvironmentManager.cuh"

namespace flamegpu {
namespace io {
Expand Down
3 changes: 3 additions & 0 deletions src/flamegpu/pop/AgentVector.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#include "flamegpu/pop/AgentVector.h"

#include <limits>

#include "flamegpu/model/AgentDescription.h"
#include "flamegpu/pop/AgentVector_Agent.h"

Expand Down
1 change: 1 addition & 0 deletions src/flamegpu/pop/DeviceAgentVector_impl.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "flamegpu/pop/DeviceAgentVector_impl.h"
#include "flamegpu/gpu/CUDAAgent.h"
#include "flamegpu/runtime/HostNewAgentAPI.h"

namespace flamegpu {

Expand Down
1 change: 1 addition & 0 deletions src/flamegpu/visualiser/AgentVis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "flamegpu/model/AgentDescription.h"
#include "flamegpu/visualiser/color/ColorFunction.h"
#include "flamegpu/visualiser/color/StaticColor.h"
#include "flamegpu/visualiser/color/AutoPalette.h"
#include "flamegpu/visualiser/FLAMEGPU_Visualisation.h"

namespace flamegpu {
Expand Down

0 comments on commit 85e61bb

Please sign in to comment.