pub fn binary_tensor_op<CompT, Op, T1, F1, T2, F2, T3, F3, const D: usize>(
        &self,
        op_desc: &OpTensorDescriptor<CompT, Op>,
        alpha: CompT,
        a: &Tensor<T1, F1, impl GpuBuffer<T1>, D>,
        beta: CompT,
        b: &Tensor<T2, F2, impl GpuBuffer<T2>, D>,
        gamma: CompT,
        c: &mut Tensor<T3, F3, impl GpuBuffer<T3>, D>,
    ) -> Result<(), CudnnError>
    where
        CompT: DataType + SupportedOp<T1, T2, T3>,
        Op: OpTensorOp + BinaryOp,
        T1: DataType,
        F1: TensorFormat + SupportedType<T1>,
        T2: DataType,
        F2: TensorFormat + SupportedType<T2>,
        T3: DataType,
        F3: TensorFormat + SupportedType<T3>,
    {
        let a_data = a.data().as_device_ptr().as_raw();
        let a_desc = a.descriptor();

        let b_data = b.data().as_device_ptr().as_raw();
        let b_desc = b.descriptor();

        let c_data = c.data().as_device_ptr().as_raw();
        let c_desc = c.descriptor();

        unsafe {
            sys::cudnnOpTensor(
                self.raw,
                op_desc.raw,
                &alpha as *const CompT as *const std::ffi::c_void,
                a_desc.raw,
                a_data as *const std::ffi::c_void,
                &beta as *const CompT as *const std::ffi::c_void,
                b_desc.raw,
                b_data as *const std::ffi::c_void,
                &gamma as *const CompT as *const std::ffi::c_void,
                c_desc.raw,
                c_data as *mut std::ffi::c_void,
            )
            .into_result()
        }
    }
/// This function computes a binary element-wise tensor core operations according to the
/// following equation:
///
/// C = OP( alpha * A , beta * B ) + gamma * C
///
/// given the tensors A, B and C, and the scaling parameters alpha, beta and gamma.
///
/// Each dimension of the input tensor A must match the corresponding dimension of the
/// destination tensor C, and each dimension of the input tensor B must match the
/// corresponding dimension of the destination tensor C or must be equal to 1.
/// In the latter case, the same value from the input tensor B for those dimensions will be
/// used to blend into the C tensor.
///
/// # Arguments
///
/// * `op_desc` - handle to a previously initialized op tensor descriptor.
///
/// * `alpha` - scaling factor for the left operand.
///
/// * `a` - left operand.
///
/// * `beta` - scaling factor for the right operand.
///
/// * `b` - right operand.
///
/// * `gamma` - scaling factor for the destination tensor.
///
/// * `c` - destination tensor. This tensor is written after being read.
///
/// **Do note** that the scaling factors must be stored in host memory. All tensor formats up
/// to dimension five (5) are supported. This routine does not support tensor formats beyond
/// these dimensions.
This function computes a binary element-wise tensor core operations according to the
following equation.

C = OP( alpha * A , beta * B ) + gamma * C

given the tensors A, B and C, and the scaling parameters alpha, beta and gamma.

Each dimension of the input tensor A must match the corresponding dimension of the
destination tensor C, and each dimension of the input tensor B must match the
corresponding dimension of the destination tensor C or must be equal to 1.
In the latter case, the same value from the input tensor B for those dimensions will be
used to blend into the C tensor.
This function computes a binary element - wise tensor core operations according to the following equation . C = OP ( alpha * A beta * B ) + gamma * C given the tensors A B and C and the scaling parameters alpha beta and gamma . Each dimension of the input tensor A must match the corresponding dimension of the destination tensor C and each dimension of the input tensor B must match the corresponding dimension of the destination tensor C or must be equal to 1 . In the latter case the same value from the input tensor B for those dimensions will be used to blend into the C tensor .
pub fn binary_tensor_op<CompT, Op, T1, F1, T2, F2, T3, F3, const D: usize>(
        &self,
        op_desc: &OpTensorDescriptor<CompT, Op>,
        alpha: CompT,
        a: &Tensor<T1, F1, impl GpuBuffer<T1>, D>,
        beta: CompT,
        b: &Tensor<T2, F2, impl GpuBuffer<T2>, D>,
        gamma: CompT,
        c: &mut Tensor<T3, F3, impl GpuBuffer<T3>, D>,
    ) -> Result<(), CudnnError>
    where
        CompT: DataType + SupportedOp<T1, T2, T3>,
        Op: OpTensorOp + BinaryOp,
        T1: DataType,
        F1: TensorFormat + SupportedType<T1>,
        T2: DataType,
        F2: TensorFormat + SupportedType<T2>,
        T3: DataType,
        F3: TensorFormat + SupportedType<T3>,
    {
        let a_data = a.data().as_device_ptr().as_raw();
        let a_desc = a.descriptor();
        let b_data = b.data().as_device_ptr().as_raw();
        let b_desc = b.descriptor();
        let c_data = c.data().as_device_ptr().as_raw();
        let c_desc = c.descriptor();
        unsafe {
            sys::cudnnOpTensor(
                self.raw,
                op_desc.raw,
                &alpha as *const CompT as *const std::ffi::c_void,
                a_desc.raw,
                a_data as *const std::ffi::c_void,
                &beta as *const CompT as *const std::ffi::c_void,
                b_desc.raw,
                b_data as *const std::ffi::c_void,
                &gamma as *const CompT as *const std::ffi::c_void,
                c_desc.raw,
                c_data as *mut std::ffi::c_void,
            )
            .into_result()
        }
    }
pub fn binary_tensor_op < CompT , Op , T1 , F1 , T2 , F2 , T3 , F3 , const D : usize > ( & self , op_desc : & OpTensorDescriptor < CompT , Op > , alpha : CompT , a : & Tensor < T1 , F1 , impl GpuBuffer < T1 > , D > , beta : CompT , b : & Tensor < T2 , F2 , impl GpuBuffer < T2 > , D > , gamma : CompT , c : & mut Tensor < T3 , F3 , impl GpuBuffer < T3 > , D > , ) -> Result < ( ) , CudnnError > where CompT : DataType + SupportedOp < T1 , T2 , T3 > , Op : OpTensorOp + BinaryOp , T1 : DataType , F1 : TensorFormat + SupportedType < T1 > , T2 : DataType , F2 : TensorFormat + SupportedType < T2 > , T3 : DataType , F3 : TensorFormat + SupportedType < T3 > , { let a_data = a . data ( ) . as_device_ptr ( ) . as_raw ( ) ; let a_desc = a . descriptor ( ) ; let b_data = b . data ( ) . as_device_ptr ( ) . as_raw ( ) ; let b_desc = b . descriptor ( ) ; let c_data = c . data ( ) . as_device_ptr ( ) . as_raw ( ) ; let c_desc = c . descriptor ( ) ; unsafe { sys :: cudnnOpTensor ( self . raw , op_desc . raw , & alpha as * const CompT as * const std :: ffi :: c_void , a_desc . raw , a_data as * const std :: ffi :: c_void , & beta as * const CompT as * const std :: ffi :: c_void , b_desc . raw , b_data as * const std :: ffi :: c_void , & gamma as * const CompT as * const std :: ffi :: c_void , c_desc . raw , c_data as * mut std :: ffi :: c_void , ) . into_result ( ) } }
This function computes a binary element-wise tensor core operations according to the
following equation:
This function computes a binary element - wise tensor core operations according to the following equation :
&self
op_desc
&OpTensorDescriptor<CompT, Op>
alpha
CompT
a
&Tensor<T1, F1, impl GpuBuffer<T1>, D>
beta
CompT
b
&Tensor<T2, F2, impl GpuBuffer<T2>, D>
gamma
CompT
c
&mut Tensor<T3, F3, impl GpuBuffer<T3>, D>
&self
op_desc
&OpTensorDescriptor<CompT, Op>
alpha
CompT
a
&Tensor<T1, F1, impl GpuBuffer<T1>, D>
beta
CompT
b
&Tensor<T2, F2, impl GpuBuffer<T2>, D>
gamma
CompT
c
&mut Tensor<T3, F3, impl GpuBuffer<T3>, D>