file3.cu 475 B

12345678910111213141516171819202122
  1. #include "file1.h"
  2. #include "file2.h"
  3. result_type __device__ file1_func(int x);
  4. result_type_dynamic __device__ file2_func(int x);
  5. static __global__ void file3_kernel(result_type& r, int x)
  6. {
  7. // call static_func which is a method that is defined in the
  8. // static library that is always out of date
  9. r = file1_func(x);
  10. result_type_dynamic rd = file2_func(x);
  11. }
  12. result_type file3_launch_kernel(int x)
  13. {
  14. result_type r;
  15. file3_kernel<<<1, 1>>>(r, x);
  16. return r;
  17. }