   }
 
   __device__ int isinf() const {
-    __half_raw raw_ = __half_raw(data_);
-    return (raw_.x & 0x7fffu) == 0x7c00u;
+    return (__half_raw(data_).x & 0x7fffu) == 0x7c00u;
   }
 
   __device__ int isfinite() const {
-    __half_raw raw_ = __half_raw(data_);
-    return (raw_.x & 0x7c00u) != 0x7c00u;
-  }
-
-  __device__ int signbit() const
-  {
-    __half_raw raw_ = __half_raw(data_);
-    return (raw_.x & 0x8000u) != 0;
+    return (__half_raw(data_).x & 0x7c00u) != 0x7c00u;
+  }
+
+  __device__ int signbit() const {
+    return (__half_raw(data_).x & 0x8000u) != 0;
   }
 
   template<typename T>
-  inline __device__ float16& operator+=(const T& rhs)
-  {
+  inline __device__ float16& operator+=(const T& rhs) {
     *this = *this + rhs;
     return *this;
   }
 
   template<typename T>
-  inline __device__ float16& operator-=(const T& rhs)
-  {
+  inline __device__ float16& operator-=(const T& rhs) {
     *this = *this - rhs;
     return *this;
   }
 
   template<typename T>
-  inline __device__ float16& operator*=(const T& rhs)
-  {
+  inline __device__ float16& operator*=(const T& rhs) {
     *this = *this * rhs;
     return *this;
   }
 
   template<typename T>
-  inline __device__ float16& operator/=(const T& rhs)
-  {
+  inline __device__ float16& operator/=(const T& rhs) {
     *this = *this / rhs;
     return *this;
   }
 
   friend __device__ float16 copysign(float16 x, float16 y) {
-    float16 ret;
     __half_raw x_raw_ = __half_raw(x.data_);
     __half_raw y_raw_ = __half_raw(y.data_);
     __half_raw ret_raw_;
     ret_raw_.x = (x_raw_.x & 0x7fffu) | (y_raw_.x & 0x8000u);
-    ret.data_ = ret_raw_;
-    return ret;
+    return float16(ret_raw_);
   }
 
   friend __device__ float16 nextafter(float16 x, float16 y) {
-    float16 ret;
     __half_raw x_raw_ = __half_raw(x.data_);
     __half_raw y_raw_ = __half_raw(y.data_);
     __half_raw ret_raw_;

      ret_raw_.x = (y_raw_.x & 0x8000u) + 1;
    } else if (!(x_raw_.x & 0x8000u)) {
      if (x_raw_.x > y_raw_.x) {
	ret_raw_.x = x_raw_.x - 1;
      } else {
	ret_raw_.x = x_raw_.x + 1;
      }
    } else if(!(y_raw_.x & 0x8000u) || (x_raw_.x & 0x7fffu) > (y_raw_.x & 0x7fffu)) {
      ret_raw_.x = x_raw_.x - 1;
    } else {
      ret_raw_.x = x_raw_.x + 1;
    }
    ret.data_ = ret_raw_;
    return ret;
  }

private:

  }
};


__device__ float16 min(float16 x, float16 y) {
  return float16(min(float(x), float(y)));
}
__device__ float16 max(float16 x, float16 y) {
  return float16(max(float(x), float(y)));
}
__device__ int iszero(float16 x) {return x.iszero();}
__device__ int isnan(float16 x) {return x.isnan();}
