Home
last modified time | relevance | path

Searched refs:__host__ (Results 1 – 25 of 67) sorted by relevance

123

/llvm-project-15.0.7/clang/test/SemaCUDA/
H A Dcall-host-fn-from-device.cu23 __host__ __device__ void hd() { host_fn(); } in hd()
28 __host__ __device__ void hd2() { host_fn(); } in hd2()
30 __host__ __device__ void hd3();
53 __host__ __device__ void T::hd3() { in hd3()
62 __host__ __device__ void hd() { host_fn(); } in hd()
72 __host__ __device__ void local_var() { in local_var()
92 __host__ __device__ void hd_member_fn() { in hd_member_fn()
99 __host__ __device__ void h_member_fn() { in h_member_fn()
105 __host__ __device__ void fn_ptr() { in fn_ptr()
115 __host__ __device__ void unaryOp() { in unaryOp()
[all …]
H A Dfunction-overload.cu52 __host__ int hdh() { return 0; } in hdh()
56 __host__ __device__ int hhd() { return 0; } in hhd()
64 __host__ __device__ int dhd() { return 0; } in dhd()
77 extern "C" __host__ int chhd1() { return 0; } in chhd1()
113 __host__ void hostf() { in hostf()
176 __host__ __device__ void hostdevicef() { in hostdevicef()
239 __host__ __device__ ~d_hd() {} in ~d_hd()
590 __host__ __device__ a(short);
612 __host__ __device__ void ag(a<ae>) { in ag()
627 __host__ __device__ void ag(a<ae>) { in ag()
[all …]
H A Dfunction-template-overload.cu10 template <typename T> __host__ HType overload_h_d(T a) { return HType(); } in overload_h_d()
23 template __host__ HType overload_h_d(int a); // OK. instantiates H
45 template <> __host__ HType overload_hd(int a);
47 template __host__ HType overload_hd(long a);
49 __host__ HType overload_hd(int a); // OK
52 template <typename T> __host__ __device__ T overload_h(T a);
66 template __host__ __device__ int overload_ce_implicit_hd(int a);
68 template <> __host__ __device__ long overload_ce_implicit_hd(long a);
77 template __host__ int overload_ce_implicit_hd(int a);
78 template <> __host__ long overload_ce_implicit_hd(long a);
[all …]
H A Dusual-deallocators.cu11 extern __host__ void host_fn();
13 extern __host__ __device__ void hd_fn();
16 __host__ void operator delete(void *) { host_fn(); }; in operator delete()
21 __host__ void operator delete(void *) = delete;
27 __host__ void operator delete(void *) { host_fn(); }; in operator delete()
33 __host__ void operator delete(void *) { host_fn(); }; in operator delete()
48 __host__ void operator delete(void *) { host_fn(); }; in operator delete()
54 __host__ void operator delete(void *) { host_fn(); }; in operator delete()
60 __host__ void operator delete(void *) { host_fn(); }; in operator delete()
74 __host__ __device__ void test_hd(void *p) { in test_hd()
[all …]
H A Dcall-device-fn-from-host.cu23 __host__ __device__ void hd() { device_fn(); } in hd()
28 __host__ __device__ void hd2() { device_fn(); } in hd2()
30 __host__ __device__ void hd3();
36 __host__ __device__ void T::hd3() { in hd3()
45 __host__ __device__ void hd() { device_fn(); } in hd()
51 __host__ __device__ void local_var() { in local_var()
66 __host__ __device__ void hd_member_fn() { in hd_member_fn()
73 __host__ __device__ void h_member_fn() { in h_member_fn()
79 __host__ __device__ void fn_ptr() { in fn_ptr()
85 __host__ __device__ void fn_ptr_template() { in fn_ptr_template()
[all …]
H A Dimplicit-device-lambda.cu15 auto f3 = [&] __host__ {}; in device_fn()
18 auto f4 = [&] __host__ __device__ {}; in device_fn()
29 auto g3 = [&]() __host__ {}; in device_fn()
42 auto h3 = [&] __host__ () {}; in device_fn()
57 auto f3 = [&] __host__ {}; in kernel_fn()
60 auto f4 = [&] __host__ __device__ {}; in kernel_fn()
67 __host__ void host_fn() { in host_fn()
74 auto f3 = [&] __host__ {}; in host_fn()
77 auto f4 = [&] __host__ __device__ {}; in host_fn()
81 __host__ __device__ void hd_fn() { in hd_fn()
[all …]
H A Ddeferred-oeverload.cu18 __host__ void callee(float); // host-note {{candidate function}}
19 __host__ void callee(double); // host-note {{candidate function}}
23 __host__ void callee2(); // dev-note{{candidate function not viable: call to __host__ function from…
32 __host__ void callee4(int); // com-note 2{{candidate function not viable: requires 1 argument, but …
36 __host__ void callee5(float); // com-note {{candidate function}}
37 __host__ void callee5(double); // com-note {{candidate function}}
42 __host__ S &operator <<(int i); // dev-note {{candidate function not viable}}
45 __host__ void hf() { in hf()
72 __host__ __device__ void sfinae(T t) { // host-note {{candidate template ignored: substitution fail… in sfinae()
82 __host__ __device__ void sfinae(T t) { // host-note {{candidate template ignored: substitution fail… in sfinae()
[all …]
H A Doverloaded-delete.cu9 __host__ static void operator delete(void*, size_t) {} in operator delete()
13 __host__ __device__ void test(S* s) { in test()
21 __host__ __device__ void test_default_global_delete_hd(int *ptr) { in test_default_global_delete_hd()
30 __host__ void test_default_global_delete(int *ptr) { in test_default_global_delete()
38 __host__ __device__ void test_partial_global_delete_hd(int *ptr) { in test_partial_global_delete_hd()
47 __host__ void test_partial_global_delete(int *ptr) { in test_partial_global_delete()
54 __host__ void operator delete(void *ptr) {} in operator delete()
57 __host__ __device__ void test_overloaded_global_delete_hd(int *ptr) { in test_overloaded_global_delete_hd()
66 __host__ void test_overloaded_global_delete(int *ptr) { in test_overloaded_global_delete()
H A Dasm_delayed_diags.cu16 static __device__ __host__ void t1(int r) { in t1()
22 static __device__ __host__ unsigned t2(signed char input) { in t2()
30 static __device__ __host__ double t3(double x) { in t3()
38 static __device__ __host__ unsigned char t4(unsigned char a, unsigned char b) { in t4()
51 static __device__ __host__ void t5(void) { in t5()
62 static __device__ __host__ void t6(__m256i *p) { in t6()
67 static __device__ __host__ void t7(__m256i *p) { in t7()
88 __host__ int main() { in main()
H A Ddefault-ctor.cu10 struct InH { __host__ InH() = default; };
11 struct InHD { __host__ __device__ InHD() = default; };
15 struct OutH { __host__ OutH(); };
16 struct OutHD { __host__ __device__ OutHD(); };
20 __host__ OutH::OutH() = default;
21 __host__ __device__ OutHD::OutHD() = default;
34 __host__ void fh() { in fh()
H A Dno-destructor-overload.cu15 __host__ ~B() {} // expected-note {{previous definition is here}} in ~B()
16 __host__ __device__ ~B() {} // expected-error {{destructor cannot be redeclared}} in ~B()
20 __host__ __device__ ~C() {} // expected-note {{previous definition is here}} in ~C()
21 __host__ ~C() {} // expected-error {{destructor cannot be redeclared}} in ~C()
26 __host__ __device__ ~D() {} // expected-error {{destructor cannot be redeclared}} in ~D()
30 __host__ __device__ ~E() {} // expected-note {{previous definition is here}} in ~E()
H A Dtrace-through-global.cu11 inline __host__ __device__ int hd1() { in hd1()
16 inline __host__ __device__ int hd2() { in hd2()
22 inline __host__ __device__ void hd3(int) { in hd3()
25 inline __host__ __device__ void hd3(double) {} in hd3()
27 inline __host__ __device__ void hd4(int) {} in hd4()
28 inline __host__ __device__ void hd4(double) { in hd4()
H A Dfunction-target.cu6 __host__ void h1h(void);
8 __host__ __device__ void h1hd(void);
16 __host__ void h1(void) { in h1()
24 __host__ void d1h(void); // expected-note {{candidate function not viable: call to __host__ functio…
26 __host__ __device__ void d1hd(void);
H A Dbad-attributes.cu16 __host__ int b1; // expected-warning {{attribute only applies to functions}}
17 __host__ void b2();
28 __device__ __host__ void z1();
34 __host__ __device__ void z5();
35 __host__ __global__ void z6(); // expected-error {{attributes are not compatible}}
50 __global__ __host__ void z12(); // expected-error {{attributes are not compatible}}
H A Dconstexpr-ctor.cu19 __host__ void f() { B<A, 1> x; } in f()
23 __host__ foo() { B<A, 2> x; } in foo()
27 __host__ void g() { foo x; } in g()
31 __host__ bar() { B<A, 3> x; } in bar()
H A Daddr-of-overloaded-fn.cu8 __host__ void overload() {} in overload()
11 __host__ __device__ void test_hd() { in test_hd()
19 __host__ void test_host() { in test_host()
H A Dexceptions.cu26 __host__ __device__ void hd1() { in hd1()
36 inline __host__ __device__ void hd2() { in hd2()
43 inline __host__ __device__ void hd3() { in hd3()
H A Dimplicit-member-target.cu57 __host__ A3_with_device_ctors() {} in A3_with_device_ctors()
101 __host__ A5_copy_ctor_constness() {} in A5_copy_ctor_constness()
102 __host__ A5_copy_ctor_constness(A5_copy_ctor_constness&) {} in A5_copy_ctor_constness()
128 __host__ B6_with_defaulted_ctor() = default;
H A Ddeferred-diags.cu6 inline __host__ __device__ void hasInvalid() { in hasInvalid()
11 inline __host__ __device__ void hasInvalid2() { in hasInvalid2()
16 inline __host__ __device__ void hasInvalidDiscarded() { in hasInvalidDiscarded()
/llvm-project-15.0.7/clang/test/CodeGenCUDA/
H A Dusual-deallocators.cu11 extern "C" __host__ void host_fn();
13 extern "C" __host__ __device__ void hd_fn();
29 __host__ void operator delete(void *) { host_fn(); }; in operator delete()
34 __host__ void operator delete(void *) { host_fn(); }; in operator delete()
39 __host__ void operator delete(void *, __SIZE_TYPE__) { host_fn(); }; in operator delete()
49 __host__ void operator delete(void *) { host_fn(); }; in operator delete()
55 __host__ void operator delete(void *) { host_fn(); }; in operator delete()
61 __host__ void operator delete(void *) { host_fn(); }; in operator delete()
67 __host__ void operator delete(void *) { host_fn(); }; in operator delete()
75 __host__ __device__ void test_hd(void *p) { in test_hd()
[all …]
H A Dnoinline.cu14 __noinline__ __device__ __host__ void fun1() {} in fun1()
16 __attribute__((noinline)) __device__ __host__ void fun2() {} in fun2()
18 __attribute__((__noinline__)) __device__ __host__ void fun3() {} in fun3()
20 [[gnu::__noinline__]] __device__ __host__ void fun4() {} in fun4()
23 __noinline__ __device__ __host__ void fun5() {} in fun5()
25 __device__ __host__ void fun6() {} in fun6()
H A Dmanaged-var.cu91 __device__ __host__ int load() { in load()
101 __device__ __host__ void store() { in store()
114 __device__ __host__ void addr_taken() { in addr_taken()
124 __device__ __host__ float load2() { in load2()
162 __device__ __host__ int load4() { in load4()
H A Dfunction-overload.cu20 __host__ s_cd_dh() { x = 11; } in s_cd_dh()
25 __host__ __device__ s_cd_hd() { x = 31; } in s_cd_hd()
26 __host__ __device__ ~s_cd_hd() { x = 32; } in ~s_cd_hd()
33 __host__
H A Dfp-contract.cu179 __host__ __device__ float func(float a, float b, float c) { return a + b * c; } in func()
221 __host__ __device__ float func2(float a, float b, float c) { in func2()
263 __host__ __device__ float func3(float a, float b, float c) { in func3()
/llvm-project-15.0.7/clang/test/Headers/Inputs/include/
H A Dcuda.h10 #define __host__ __attribute__((host)) macro
17 __host__ __device__ dim3(unsigned x, unsigned y = 1, unsigned z = 1) : x(x), y(y), z(z) {} in x()
30 __host__ __device__ char2(char x = 0, char y = 0) : x(x), y(y) {} in x()
39 __host__ __device__ uchar2(unsigned char x = 0, unsigned char y = 0) : x(x), y(y) {} in x()
48 __host__ __device__ short2(short x = 0, short y = 0) : x(x), y(y) {} in x()
57 __host__ __device__ ushort2(unsigned short x = 0, unsigned short y = 0) : x(x), y(y) {} in x()
66 __host__ __device__ int2(int x = 0, int y = 0) : x(x), y(y) {} in x()
75 __host__ __device__ uint2(unsigned x = 0, unsigned y = 0) : x(x), y(y) {} in x()
88 __host__ __device__ longlong2(long long x = 0, long long y = 0) : x(x), y(y) {} in x()
106 __host__ __device__ float2(float x = 0, float y = 0) : x(x), y(y) {} in x()
[all …]

123