Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
Broke FLAMEGPU_ADVANCED_API whilst cleaning up

Tweak CI to build with it enabled? It shouldn't increase time.
  • Loading branch information
Robadob committed Dec 15, 2023
1 parent 5a4a57c commit 5abb665
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,15 @@ class HostEnvironmentDirectedGraph {
// So be extra safe with weak ptr
std::weak_ptr<detail::CUDAEnvironmentDirectedGraphBuffers> directed_graph;
const cudaStream_t stream;
#ifdef FLAMEGPU_ADVANCED_API
detail::CUDAScatter &scatter;
const unsigned int streamID;
#endif

public:
class VertexMap;
class EdgeMap;
HostEnvironmentDirectedGraph(std::shared_ptr<detail::CUDAEnvironmentDirectedGraphBuffers>& _directed_graph, cudaStream_t _stream);
HostEnvironmentDirectedGraph(std::shared_ptr<detail::CUDAEnvironmentDirectedGraphBuffers>& _directed_graph, cudaStream_t _stream, detail::CUDAScatter& _scatter, unsigned int _streamID);
// Graph Structure Modifiers
/**
* Attempts to import edge and vertex data from the specified file
Expand Down
2 changes: 1 addition & 1 deletion src/flamegpu/runtime/environment/HostEnvironment.cu
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ void HostEnvironment::exportMacroProperty(const std::string& property_name, cons
HostEnvironmentDirectedGraph HostEnvironment::getDirectedGraph(const std::string& name) const {
const auto rt = directed_graph_map.find(name);
if (rt != directed_graph_map.end())
return HostEnvironmentDirectedGraph(rt->second, stream);
return HostEnvironmentDirectedGraph(rt->second, stream, scatter, streamID);
THROW exception::InvalidGraphName("Directed Graph with name '%s' was not found, "
"in HostEnvironment::getDirectedGraph()",
name.c_str());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@
#include "flamegpu/io/JSONGraphWriter.h"

namespace flamegpu {
HostEnvironmentDirectedGraph::HostEnvironmentDirectedGraph(std::shared_ptr<detail::CUDAEnvironmentDirectedGraphBuffers>& _directed_graph, const cudaStream_t _stream)
HostEnvironmentDirectedGraph::HostEnvironmentDirectedGraph(std::shared_ptr<detail::CUDAEnvironmentDirectedGraphBuffers>& _directed_graph, const cudaStream_t _stream,
detail::CUDAScatter& _scatter, const unsigned int _streamID)
: directed_graph(_directed_graph)
, stream(_stream)
#ifdef FLAMEGPU_ADVANCED_API
, scatter(_scatter)
, streamID(_streamID)
#endif
{ }
void HostEnvironmentDirectedGraph::importGraph(const std::string& in_file) {
// Case insensitive ends_with()
Expand Down

0 comments on commit 5abb665

Please sign in to comment.