Class MessageBruteForce::Out

Nested Relationships

This class is a nested type of Class MessageBruteForce.

Inheritance Relationships

Derived Types

Class Documentation

class Out

This class is accessible via DeviceAPI.message_out if MessageBruteForce is specified in FLAMEGPU_AGENT_FUNCTION It gives access to functionality for outputting brute force messages

Subclassed by flamegpu::MessageBucket::Out, flamegpu::MessageSpatial2D::Out, flamegpu::MessageSpatial3D::Out

Public Functions

__device__ inline Out(const void*, unsigned int *scan_flag_messageOutput)

Constructer Initialises member variables

Parameters:

scan_flag_messageOutput – Scan flag array for optional message output

template<typename T, unsigned int N>
__device__ void setVariable(const char (&variable_name)[N], T value) const

Sets the specified variable for this agents message

Parameters:
  • variable_name – Name of the variable

  • value – The value to set the specified variable

Template Parameters:
  • T – type of the variable

  • N – Length of variable name (this should be implicit if a string literal is passed to variable name)

Returns:

The specified variable, else 0x0 if an error occurs

template<typename T, unsigned int N, unsigned int M>
__device__ void setVariable(const char (&variable_name)[M], unsigned int index, T value) const

Sets an element of an array variable for this agents message

Parameters:
  • variable_name – The name of the array variable

  • index – The index to set within the array variable

  • value – The value to set the element of the array element

Template Parameters:
  • T – The type of the variable, as set within the model description hierarchy

  • N – The length of the array variable, as set within the model description hierarchy

  • M – variable_name length, this should be ignored as it is implicitly set

Throws:
  • exception::DeviceError – If name is not a valid variable within the message (flamegpu must be built with FLAMEGPU_SEATBELTS enabled for device error checking)

  • exception::DeviceError – If T is not the type of variable ‘name’ within the message (flamegpu must be built with FLAMEGPU_SEATBELTS enabled for device error checking)

  • exception::DeviceError – If index is out of bounds for the variable array specified by name (flamegpu must be built with FLAMEGPU_SEATBELTS enabled for device error checking)

Protected Attributes

unsigned int *scan_flag

Scan flag array for optional message output