You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -45,9 +45,10 @@ For Non-RTC functions, when using the C++ interface, the ``FLAMEGPU_AGENT_FUNCTI
45
45
46
46
When using the Run-Time Compiled (RTC) functions, optionally in the C++ interface or required by the Python interface, the function must be defined in a string and associated with the AgentDescription using the ``newRTCFunction`` method.
47
47
48
+
.. cpp syntax highlighting due to issues with the cuda highlighter and raw strings.
48
49
.. tabs::
49
50
50
-
.. code-tab:: cpp
51
+
.. code-tab:: cpp CUDA C++
51
52
52
53
const char* agent_fn1_source = R"###(
53
54
// Define an agent function called agent_fn1 - specified ahead of main function
@@ -89,7 +90,7 @@ If you wish to define regular functions which can be used within agent function
89
90
90
91
.. tabs::
91
92
92
-
.. code-tab:: cpp
93
+
.. code-tab:: cuda CUDA C++
93
94
94
95
// Define a function for adding two integers which can be called inside agent functions.
95
96
FLAMEGPU_DEVICE_FUNCTION int add(int a, int b) {
@@ -103,7 +104,7 @@ If you wish to define regular functions which can be used within agent function
103
104
104
105
.. tabs::
105
106
106
-
.. code-tab:: cpp
107
+
.. code-tab:: cuda CUDA C++
107
108
108
109
// Define a function for subtracting two integers which can be called inside agent functions, or in host code
109
110
FLAMEGPU_HOST_DEVICE_FUNCTION int subtract(int a, int b) {
@@ -113,9 +114,10 @@ If you wish to define regular functions which can be used within agent function
113
114
Full Example Code From This Page
114
115
--------------------------------
115
116
117
+
.. cpp syntax highlighting due to issues with the cuda highlighter and raw strings.
116
118
.. tabs::
117
119
118
-
.. code-tab:: cpp
120
+
.. code-tab:: cpp CUDA C++
119
121
120
122
// Define a function for adding two integers which can be called inside agent functions.
@@ -148,7 +148,7 @@ Reading a message is very similar to sending one. The second argument in the age
148
148
149
149
.. tabs::
150
150
151
-
.. code-tab:: cpp
151
+
.. code-tab:: cuda CUDA C++
152
152
153
153
// Define an agent function, "inputdata" which has accepts an input message using the "MessageBruteForce" communication strategy and inputs no messages
@@ -161,7 +161,7 @@ The input message type is specified using the ``setMessageInput`` method of the
161
161
162
162
.. tabs::
163
163
164
-
.. code-tab:: cpp
164
+
.. code-tab:: cuda CUDA C++
165
165
166
166
// Specify that the "inputdata" agent function inputs a "location_message"
167
167
inputdata.setMessageInput("location_message");
@@ -176,7 +176,7 @@ With the input message type specified, the message list will be available in the
176
176
177
177
.. tabs::
178
178
179
-
.. code-tab:: cpp
179
+
.. code-tab:: cuda CUDA C++
180
180
181
181
// Define an agent function, "inputdata" which has accepts an input message using the "MessageBruteForce" communication strategy and inputs no messages
0 commit comments