.. _program_listing_file_include_flamegpu_runtime_AgentFunctionCondition_shim.cuh: Program Listing for File AgentFunctionCondition_shim.cuh ======================================================== |exhale_lsh| :ref:`Return to documentation for file ` (``include/flamegpu/runtime/AgentFunctionCondition_shim.cuh``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #ifndef INCLUDE_FLAMEGPU_RUNTIME_AGENTFUNCTIONCONDITION_SHIM_CUH_ #define INCLUDE_FLAMEGPU_RUNTIME_AGENTFUNCTIONCONDITION_SHIM_CUH_ class ReadOnlyDeviceAPI; namespace flamegpu { #define FLAMEGPU_AGENT_FUNCTION_CONDITION(funcName)\ struct funcName ## _cdn_impl {\ __device__ __forceinline__ bool operator()(flamegpu::ReadOnlyDeviceAPI *FLAMEGPU) const;\ static constexpr flamegpu::AgentFunctionConditionWrapper *fnPtr() { return &flamegpu::agent_function_condition_wrapper; }\ };\ funcName ## _cdn_impl funcName;\ __device__ __forceinline__ bool funcName ## _cdn_impl::operator()(flamegpu::ReadOnlyDeviceAPI *FLAMEGPU) const #define FLAMEGPU_AGENT_FUNCTION_CONDITION_DECL(funcName)\ struct funcName ## _cdn_impl {\ __device__ bool operator()(flamegpu::ReadOnlyDeviceAPI *FLAMEGPU) const;\ static constexpr flamegpu::AgentFunctionConditionWrapper *fnPtr() { return &flamegpu::agent_function_condition_wrapper; }\ };\ extern funcName ## _cdn_impl funcName; #define FLAMEGPU_AGENT_FUNCTION_CONDITION_DEF(funcName)\ funcName ## _cdn_impl funcName;\ __device__ bool funcName ## _cdn_impl::operator()(flamegpu::ReadOnlyDeviceAPI *FLAMEGPU) const } // namespace flamegpu #endif // INCLUDE_FLAMEGPU_RUNTIME_AGENTFUNCTIONCONDITION_SHIM_CUH_