1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-17 07:17:06 +01:00

merge upstream develop

This commit is contained in:
nmeyer-ur
2020-07-07 20:26:47 +02:00
326 changed files with 10335 additions and 9381 deletions

View File

@ -32,7 +32,12 @@ Author: Peter Boyle <paboyle@ph.ed.ac.uk>
*/
//----------------------------------------------------------------------
#ifdef GRID_CUDA
#include <cuda_fp16.h>
#endif
#ifdef GRID_HIP
#include <hip/hip_fp16.h>
#endif
namespace Grid {
@ -142,7 +147,7 @@ typedef GpuVector<NSIMD_Integer, Integer > GpuVectorI;
accelerator_inline float half2float(half h)
{
float f;
#ifdef __CUDA_ARCH__
#ifdef GRID_SIMT
f = __half2float(h);
#else
//f = __half2float(h);
@ -156,7 +161,7 @@ accelerator_inline float half2float(half h)
accelerator_inline half float2half(float f)
{
half h;
#ifdef __CUDA_ARCH__
#ifdef GRID_SIMT
h = __float2half(f);
#else
Grid_half hh = sfw_float_to_half(f);

View File

@ -31,7 +31,7 @@ directory
#ifndef GRID_SIMD_H
#define GRID_SIMD_H
#ifdef GRID_NVCC
#if defined(GRID_CUDA) || defined(GRID_HIP)
#include <thrust/complex.h>
#endif
@ -65,7 +65,7 @@ typedef RealD Real;
typedef RealF Real;
#endif
#ifdef GRID_NVCC
#if defined(GRID_CUDA) || defined(GRID_HIP)
typedef thrust::complex<RealF> ComplexF;
typedef thrust::complex<RealD> ComplexD;
typedef thrust::complex<Real> Complex;