Backends/SiaNet.Backend.TensorSharp/Cuda/DeviceCode/PermutationGenerator.cs
/// <summary>
/// Adds the reduce all norm.
/// </summary>
/// <param name="kernelBaseName">Name of the kernel base.</param>
Adds the reduce all norm.
Adds the reduce all norm .
public void AddReduceAllNorm(string kernelBaseName)
        {
            foreach (var spec in ApplySpecialization.AllSpecializations(1))
            {
                var kernelName = GetMangledName(kernelBaseName, spec);
                var indexType = spec.Use32BitIndices ? ApplySpecialization.IndexType32 : ApplySpecialization.IndexType64;
                var dimsA = spec.TensorDims[0].ToString();
                sb.AppendFormat("REDUCE_ALL_NORM_KERNELS({0}, {1}, {2})\n", indexType, dimsA, kernelName);
            }
        }
public void AddReduceAllNorm ( string kernelBaseName ) { foreach ( var spec in ApplySpecialization . AllSpecializations ( 1 ) ) { var kernelName = GetMangledName ( kernelBaseName , spec ) ; var indexType = spec . Use32BitIndices ? ApplySpecialization . IndexType32 : ApplySpecialization . IndexType64 ; var dimsA = spec . TensorDims [ 0 ] . ToString ( ) ; sb . AppendFormat ( " \n " , indexType , dimsA , kernelName ) ; } }
Adds the reduce all norm.
Adds the reduce all norm .
kernelBaseName
string
Name of the kernel base.
Name of the kernel base .