Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update DeviceAPI misc methods. #164

Merged
merged 2 commits into from
Sep 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/guide/agent-functions/miscellaneous.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ These other methods are also available within :class:`DeviceAPI<flamegpu::Device
============================================================== =========================== ===========================================================
Method Return Description
============================================================== =========================== ===========================================================
:func:`getID()<flamegpu::DeviceAPI::getID>` ``unsigned int`` Returns the current agent's unique identifier, this ID is unique to the agent throughout the simulation. All IDs are greater than 0.
:func:`getStepCounter()<flamegpu::DeviceAPI::getStepCounter>` ``unsigned int`` Returns the current step index, the first step has index 0. Exit conditions execute before the step counter is incremented.
:func:`getThreadIndex()<flamegpu::DeviceAPI::getThreadIndex>` ``unsigned int`` Returns the current thread index, each agent executing the agent function has a unique thread index in the range [0, N).
:func:`isAgent()<flamegpu::DeviceAPI::isAgent>` ``bool`` When passed a string literal, this function will return a boolean confirming whether that string matches the executing agent's name. *This function is considered expensive.*
:func:`isState()<flamegpu::DeviceAPI::isState>` ``bool`` When passed a string literal, this function will return a boolean confirming whether that string matches the executing agent's state. *This function is considered expensive.*

============================================================== =========================== ===========================================================

Related Links
Expand Down