From 9419c4e4f60c8cdc8a5ee3ec3c27847a9d058b20 Mon Sep 17 00:00:00 2001 From: Robert Chisholm Date: Wed, 13 Dec 2023 12:19:00 +0000 Subject: [PATCH] Clarify wrapped spatial message iterator bounds:radius limitation. --- src/guide/agent-functions/agent-communication.rst | 4 ++++ src/guide/defining-messages-communication/index.rst | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/src/guide/agent-functions/agent-communication.rst b/src/guide/agent-functions/agent-communication.rst index f6b0d9416..40e318470 100644 --- a/src/guide/agent-functions/agent-communication.rst +++ b/src/guide/agent-functions/agent-communication.rst @@ -123,6 +123,10 @@ If you are using :class:`MessageSpatial2D` or :class If spatial messages will be accessed via the wrapped iterator, all messages must be output within the environment bounds defined for the message list. Accessing out of bounds messages with the wrapped iterator is undefined behaviour. +.. note:: + + The spatial message radius must be a factor of the environment dimensions if accessing messages via the wrapped iterator. + .. tabs:: .. code-tab:: cuda Agent C++ diff --git a/src/guide/defining-messages-communication/index.rst b/src/guide/defining-messages-communication/index.rst index 680b1b175..26c8b446e 100644 --- a/src/guide/defining-messages-communication/index.rst +++ b/src/guide/defining-messages-communication/index.rst @@ -163,6 +163,11 @@ The :func:`setMin()` and :func: Spatial messages are automatically assigned ``float`` location variables with the names ``x``, ``y`` (and ``z``). These are used by FLAME GPU internally to sort messages and handle localised accesses, so must be used when outputting messages. + +.. note:: + + The spatial message radius must be a factor of the environment dimensions if messages will be accessed via the wrapped iterator. + Array Specialisation --------------------