code: func (co *Context) SoftmaxForward(algo SoftmaxAlgorithm, mode SoftmaxMode, alpha float64, xDesc *TensorDescriptor, x Memory, beta float64, yDesc *TensorDescriptor, y Memory) error {
  	// DOUBLECHECK: "cudnnSoftmaxForward" returns Memory type in Parameter 8
  	var alphaC, betaC unsafe.Pointer
  	switch xDesc.dataType {
  	case Float, Half:
  		var alphaF, betaF C.float
  		alphaF = C.float(float32(alpha))
  		betaF = C.float(float32(beta))
  		alphaC = unsafe.Pointer(&alphaF)
  		betaC = unsafe.Pointer(&betaF)
  	case Double:
  		var alphaF, betaF C.double
  		alphaF = C.double(alpha)
  		betaF = C.double(beta)
  		alphaC = unsafe.Pointer(&alphaF)
  		betaC = unsafe.Pointer(&betaF)
  	default:
  		return errors.Errorf("Unsupported data type: %v", xDesc.dataType)
  	}
  	// call cudnnSoftmaxForward
  	return result(C.cudnnSoftmaxForward(co.internal, algo.C(), mode.C(), alphaC, xDesc.internal, x.Pointer(), betaC, yDesc.internal, y.Pointer()))
  }
docs: // SoftmaxForward computes the softmax function.