Template Function flamegpu::agent_function_condition_wrapper

Function Documentation

template<typename AgentFunctionCondition>
__global__ void flamegpu::agent_function_condition_wrapper(exception::DeviceExceptionBuffer *error_buffer, detail::curve::Curve::NamespaceHash instance_id_hash, detail::curve::Curve::NamespaceHash agent_func_name_hash, const unsigned int popNo, 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)

  • instance_id_hash – CURVE hash of the CUDASimulation’s instance id

  • agent_func_name_hash – CURVE hash of the agent + function’s names

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