 
 template <typename In, typename Out>
 struct IfGreaterElseASSAImpl {
-    using CudaTypeIn = cuda_internal::DataType<In>;
-    using CudaTypeOut = cuda_internal::DataType<Out>;
-    __device__ void operator()(int64_t /*i*/, CudaTypeIn x1, CudaTypeOut neg, CudaTypeOut& out) { out = x1 > x2 ? pos : neg; }
-    CudaTypeIn x2;
-    CudaTypeOut pos;
+    using InCudaType = cuda_internal::DataType<In>;
+    using OutCudaType = cuda_internal::DataType<Out>;
+    __device__ void operator()(int64_t /*i*/, InCudaType x1, OutCudaType neg, OutCudaType& out) { out = x1 > x2 ? pos : neg; }
+    InCudaType x2;
+    OutCudaType pos;
 };
 
 class CudaIfGreaterElseASSAOp : public IfGreaterElseASSAOp {


template <typename In, typename Out>
struct IfLessElseASSAImpl {
    using CudaTypeIn = cuda_internal::DataType<In>;
    using CudaTypeOut = cuda_internal::DataType<Out>;
    __device__ void operator()(int64_t /*i*/, CudaTypeIn x1, CudaTypeOut neg, CudaTypeOut& out) { out = x1 < x2 ? pos : neg; }
    CudaTypeIn x2;
    CudaTypeOut pos;
};

class CudaIfLessElseASSAOp : public IfLessElseASSAOp {

        CudaSetDeviceScope scope{device.index()};
        VisitDtype(x_dtype, [&](auto x_pt) {
            using In = typename decltype(x_pt)::type;
            using InCudaType = cuda_internal::DataType<In>;
            VisitDtype(out.dtype(), [&](auto pt) {
                using Out = typename decltype(pt)::type;
                using OutCudaType = cuda_internal::DataType<Out>;
                Elementwise<const In, const Out, Out>(
                        IfLessElseASSAImpl<In, Out>{static_cast<InCudaType>(x2), static_cast<OutCudaType>(pos)}, x1_cast, neg_cast, out);
            });
        });
    }
