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_env_buffer, const unsigned int popNo, util::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 SEATBELTS enabled for this to be used)

  • d_curve_table – Pointer to curve hash table in device memory

  • 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)