summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-04-04 12:18:55 -0700
committerGitHub <noreply@github.com>2023-04-04 12:18:55 -0700
commit206b546444b3e11d5059c4482ea2045132156e23 (patch)
treea062ece63fcaca1e3b5d71b0dc023fb7e0cad55b /docs
parent5e5c42f69fba527b6abf221ea5f17bb790e55c89 (diff)
Update a1-02-slangpy.md
Diffstat (limited to 'docs')
-rw-r--r--docs/user-guide/a1-02-slangpy.md3
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/user-guide/a1-02-slangpy.md b/docs/user-guide/a1-02-slangpy.md
index d71ee6a75..dd218cd95 100644
--- a/docs/user-guide/a1-02-slangpy.md
+++ b/docs/user-guide/a1-02-slangpy.md
@@ -379,7 +379,8 @@ void getInputElement_bwd(
uint2 loc,
float derivative)
{
- inputGradToPropagateTo.InterlockedAdd(loc, derivative);
+ float oldVal;
+ inputGradToPropagateTo.InterlockedAdd(loc, derivative, oldVal);
}
```