Only comuted if the mask weight is not 1.0 to avoid extra memory. Also includes some code cleanup.
Attach a file by drag & drop or click to upload