Backends/SiaNet.Backend.TensorSharp/Cuda/DNN.cs
/// <summary>
/// Gets the type of the data.
/// </summary>
/// <param name="dataType">Type of the data.</param>
/// <returns>cudnnDataType.</returns>
/// <exception cref="NotSupportedException">DNN: type not supported: " + dataType</exception>
Gets the type of the data.
Gets the type of the data .
private static cudnnDataType GetDataType(DType dataType)
        {
            switch(dataType)
            {
                case DType.Float32: return cudnnDataType.Float;
                case DType.Float64: return cudnnDataType.Double;
                case DType.Float16: return cudnnDataType.Half;
                default:
                    throw new NotSupportedException("DNN: type not supported: " + dataType);
            }
        }
private static cudnnDataType GetDataType ( DType dataType ) { switch ( dataType ) { case DType . Float32 : return cudnnDataType . Float ; case DType . Float64 : return cudnnDataType . Double ; case DType . Float16 : return cudnnDataType . Half ; default : throw new NotSupportedException ( " " + dataType ) ; } }
Gets the type of the data.
Gets the type of the data .
None
type not supported: " + dataType
type not supported : " + dataType
dataType
DType
Type of the data.
Type of the data .