Antonio Sanchez bf66137efc New GPU test utilities.
This introduces new functions:
```
// returns kernel(args...) running on the CPU.
Eigen::run_on_cpu(Kernel kernel, Args&&... args);

// returns kernel(args...) running on the GPU.
Eigen::run_on_gpu(Kernel kernel, Args&&... args);
Eigen::run_on_gpu_with_hint(size_t buffer_capacity_hint, Kernel kernel, Args&&... args);

// returns kernel(args...) running on the GPU if using
//   a GPU compiler, or CPU otherwise.
Eigen::run(Kernel kernel, Args&&... args);
Eigen::run_with_hint(size_t buffer_capacity_hint, Kernel kernel, Args&&... args);
```

Running on the GPU is accomplished by:
- Serializing the kernel inputs on the CPU
- Transferring the inputs to the GPU
- Passing the kernel and serialized inputs to a GPU kernel
- Deserializing the inputs on the GPU
- Running `kernel(inputs...)` on the GPU
- Serializing all output parameters and the return value
- Transferring the serialized outputs back to the CPU
- Deserializing the outputs and return value on the CPU
- Returning the deserialized return value

All inputs must be serializable (currently POD types, `Eigen::Matrix`
and `Eigen::Array`).  The kernel must also  be POD (though usually
contains no actual data).

Tested on CUDA 9.1, 10.2, 11.3, with g++-6, g++-8, g++-10 respectively.

This MR depends on !622, !623, !624.
2021-09-10 14:22:50 -07:00
..
2019-03-14 10:08:12 +01:00
2016-05-18 14:03:03 +02:00
2021-09-10 14:22:50 -07:00
2018-11-23 15:37:09 +01:00
2021-09-10 14:22:50 -07:00
2021-09-10 14:22:50 -07:00
2021-03-15 13:32:24 -07:00
2019-12-11 18:22:57 +00:00
2021-09-10 14:22:50 -07:00
2021-01-27 23:32:12 +01:00
2021-05-07 16:26:57 +00:00
2021-01-27 23:32:12 +01:00
2021-03-10 22:17:03 -08:00
2021-01-05 10:41:25 -08:00
2021-04-22 18:45:19 +00:00
2021-01-21 09:44:42 -08:00
2018-11-23 15:12:06 +01:00