brintos

brintos / llvm-project-archived public Read only

0
0
Text · 441 B · 2ffb277 Raw
24 lines · cpp
1// RUN: %clang_cc1 -triple spir64 -aux-triple x86_64-unknown-linux-gnu -fsycl-is-device -verify -fsyntax-only %s2// expected-no-diagnostics3 4template <typename Name, typename Func>5__attribute__((sycl_kernel)) void kernel(const Func &kernelFunc) {6  kernelFunc();7}8 9void host_ok(void) {10  __bf16 A;11}12 13int main()14{  host_ok();15  __bf16 var;16  kernel<class variables>([=]() {17    (void)var;18    int B = sizeof(__bf16);19  });20 21  return 0;22}23 24