Improved support for vectorization of 16-bit floats

This commit is contained in:
Benoit Steiner
2016-06-09 08:22:27 -07:00
parent 15890c304e
commit aa33446dac
3 changed files with 95 additions and 4 deletions

View File

@@ -54,6 +54,11 @@ struct PacketType {
// For CUDA packet types when using a GpuDevice
#if defined(EIGEN_USE_GPU) && defined(__CUDACC__)
template <>
struct PacketType<half, GpuDevice> {
typedef half2 type;
static const int size = 2;
};
template <>
struct PacketType<float, GpuDevice> {
typedef float4 type;