Files
UnrealEngine/Engine/Source/ThirdParty/Intel/ISPC/ispc-1.24.0/tests/lit-tests/2214.ispc
2025-05-18 13:04:45 +08:00

24 lines
622 B
Plaintext

// RUN: %{ispc} %s -o %t.o --nostdlib --target=avx2-i64x4
// RUN: %{ispc} %s -o %t.o --nostdlib --target=avx2-i32x8
// RUN: %{ispc} %s -o %t.o --nostdlib --target=avx2-i16x16
// RUN: %{ispc} %s -o %t.o --nostdlib --target=avx2-i8x32
// RUN: %{ispc} %s -o %t.o --nostdlib --target=host
// REQUIRES: X86_ENABLED
// The key here is to tests launch expression with function pointer on targets with different base type (i8-i64).
typedef task void (*TaskFn)(float f);
task void x(float f) {
}
void f_f(float f) {
uniform TaskFn func = x;
launch [10000] func(f);
sync;
launch [1][2][3] func(f);
sync;
}