Skip to content

Commit

Permalink
Address additional clang warnings (when combined with vis hash)
Browse files Browse the repository at this point in the history
  • Loading branch information
ptheywood committed Jan 5, 2024
1 parent fb5d0ee commit a66c2c8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmake/dependencies/flamegpu2-visualiser.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ include(FetchContent)
cmake_policy(SET CMP0079 NEW)

# Set the visualiser repo and tag to use unless overridden by the user.
set(DEFAULT_FLAMEGPU_VISUALISATION_GIT_VERSION "02097b5ca1bf38a52693e926d0d750d972a2ae80")
set(DEFAULT_FLAMEGPU_VISUALISATION_GIT_VERSION "b6861fa3f07411f49acbb5aadb8addd033c092dd")
set(DEFAULT_FLAMEGPU_VISUALISATION_REPOSITORY "https://github.com/FLAMEGPU/FLAMEGPU2-visualiser.git")

# Set a VISUSLAITION_ROOT cache entry so it is available in the GUI to override the location if required
Expand Down
3 changes: 3 additions & 0 deletions cmake/warnings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ if(NOT COMMAND flamegpu_suppress_some_compiler_warnings)
target_compile_definitions(${SSCW_TARGET} PRIVATE "__CDPRT_SUPPRESS_SYNC_DEPRECATION_WARNING")
endif()
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
# Suppress unused function warnigns raised by clang on some vis headers
target_compile_options(${SSCW_TARGET} PRIVATE "$<$<COMPILE_LANGUAGE:CUDA>:SHELL:-Xcompiler -Wno-unused-function>")
target_compile_options(${SSCW_TARGET} PRIVATE "$<$<COMPILE_LANGUAGE:C,CXX>:-Wno-unused-function>")
# Suppress unused-private-field warnings on Clang, which are falsely emitted in some cases where a private member is used in device code (i.e. ArrayMessage)
target_compile_options(${SSCW_TARGET} PRIVATE "$<$<COMPILE_LANGUAGE:CUDA>:SHELL:-Xcompiler -Wno-unused-private-field>")
target_compile_options(${SSCW_TARGET} PRIVATE "$<$<COMPILE_LANGUAGE:C,CXX>:-Wno-unused-private-field>")
Expand Down
6 changes: 3 additions & 3 deletions include/flamegpu/simulation/detail/CUDAAgent.h
Original file line number Diff line number Diff line change
Expand Up @@ -315,17 +315,17 @@ class CUDAAgent : public AgentInterface {
* @param state_name Agent state to affect
* @param d_vec The DeviceAgentVector to be stored
*/
void setPopulationVec(const std::string& state_name, const std::shared_ptr<DeviceAgentVector_impl>& d_vec);
void setPopulationVec(const std::string& state_name, const std::shared_ptr<DeviceAgentVector_impl>& d_vec) override;
/**
* Used to allow HostAgentAPI to retrieve a stored DeviceAgentVector
* @param state_name Agent state to affect
*/
std::shared_ptr<DeviceAgentVector_impl> getPopulationVec(const std::string& state_name);
std::shared_ptr<DeviceAgentVector_impl> getPopulationVec(const std::string& state_name) override;
/**
* Used to allow HostAgentAPI to clear the stored DeviceAgentVector
* Any changes will be synchronised first
*/
void resetPopulationVecs();
void resetPopulationVecs() override;

private:
/**
Expand Down

0 comments on commit a66c2c8

Please sign in to comment.