summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-ir.cpp
diff options
context:
space:
mode:
authorDietrich Geisler <dag368@cornell.edu>2020-08-17 12:50:44 -0400
committerGitHub <noreply@github.com>2020-08-17 09:50:44 -0700
commitff2d490dc120708a2fcb6eea5880a6b7c6586a4b (patch)
tree4bab7a7353ed5e9149510a48227da029d40d9d97 /source/slang/slang-ir.cpp
parent0640a10ab85f8be3c3c925cb70711560265e6548 (diff)
GPU Foreach Loop (#1498)
* GPU Foreach Loop This PR introduces the completed GPU foreach loop and updates the heterogeneous-hello-world example to use it. This PR builds on the previous introduction of the GPU Foreach loop parsing and semantic checking PR (#1482) by introducing IR lowering and emmitting. THe new feature can be used by having a GPU_Foreach loop interacting with a named non-CPP entry point, and using the -heterogeneous flag. * Fix to path Co-authored-by: Tim Foley <tfoleyNV@users.noreply.github.com>
Diffstat (limited to 'source/slang/slang-ir.cpp')
-rw-r--r--source/slang/slang-ir.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/slang/slang-ir.cpp b/source/slang/slang-ir.cpp
index 13840a84a..2a1db6310 100644
--- a/source/slang/slang-ir.cpp
+++ b/source/slang/slang-ir.cpp
@@ -3752,6 +3752,17 @@ namespace Slang
return inst;
}
+ IRInst* IRBuilder::emitGpuForeach(List<IRInst*> args)
+ {
+ auto inst = createInst<IRInst>(
+ this,
+ kIROp_GpuForeach,
+ getVoidType(),
+ args.getCount(),
+ args.getBuffer());
+ addInst(inst);
+ return inst;
+ }
//
// Decorations