Template Function flamegpu::agent_function_condition_wrapper

Function Documentation

template<typename AgentFunctionCondition>
__global__ void flamegpu::agent_function_condition_wrapper(exception::DeviceExceptionBuffer *error_buffer, const detail::curve::CurveTable *__restrict__ d_curve_table, const char *d_agent_name, const char *d_state_name, const char *d_env_buffer, const unsigned int popNo, detail::curandState *d_rng, unsigned int *scanFlag_conditionResult)

Wrapper function for launching agent functions Initialises FLAMEGPU_API instance

Note

This is basically a cutdown version of agent_function_wrapper

Parameters:
  • error_buffer – Buffer used for detecting and reporting exception::DeviceErrors (flamegpu must be built with FLAMEGPU_SEATBELTS enabled for this to be used)

  • d_curve_table – Pointer to curve hash table in device memory

  • d_agent_name – Pointer to agent name string

  • d_state_name – Pointer to agent state string

  • d_env_buffer – Pointer to env buffer in device memory

  • popNo – Total number of agents exeucting the function (number of threads launched)

  • d_rng – Array of curand states for this kernel

  • scanFlag_conditionResult – Scanflag array for condition result (this uses same buffer as agent death)

Template Parameters:

AgentFunctionCondition – The modeller defined agent function condition (defined as FLAMEGPU_AGENT_FUNCTION_CONDITION in model code)