file2.cu 335 B

12345678910111213141516
  1. #include "file2.h"
  2. result_type __device__ file1_func(int x);
  3. result_type_dynamic __device__ file2_func(int x)
  4. {
  5. if (x != 42) {
  6. const result_type r = file1_func(x);
  7. const result_type_dynamic rd{ r.input, r.sum, true };
  8. return rd;
  9. } else {
  10. const result_type_dynamic rd{ x, x * x * x, false };
  11. return rd;
  12. }
  13. }