Class MsgArray2D::Out

Nested Relationships

This class is a nested type of Class MsgArray2D.

Class Documentation

class MsgArray2D::Out

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

Public Functions

__device__ inline Out(Curve::NamespaceHash agentfn_hash, Curve::NamespaceHash msg_hash, const void *_metadata, unsigned int *scan_flag_messageOutput)

Constructer Initialises member variables

Parameters
  • agentfn_hash – Added to msg_hash to produce combined_hash

  • msg_hash – Added to agentfn_hash to produce combined_hash

  • _metadata – Message specialisation specific metadata struct (of type MsgArray2D::MetaData)

  • scan_flag_messageOutput – Scan flag array for optional message output

__device__ inline void setIndex(const size_type &x, const size_type &y) const

Sets the array index to store the message in

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

Protected Attributes

Curve::NamespaceHash combined_hash

CURVE hash for accessing message data agentfn_hash + msg_hash

unsigned int *scan_flag

Scan flag array for optional message output

const MetaData *const metadata

Metadata struct for accessing messages