dotnet / machinelearning

ML.NET is an open source and cross-platform machine learning framework for .NET.
https://dot.net/ml
MIT License
9.02k stars 1.88k forks source link

CpuMath Enhancement: Add Debug.Assert to check matching lengths of arguments to SSE/AVX intrinsics #828

Open briancylui opened 6 years ago

briancylui commented 6 years ago

Style changes needed to solve part of https://github.com/dotnet/machinelearning/issues/823

Details

TomFinley commented 5 years ago

However, these are internal functions that are only called from functions that guarantee the arguments are checked, so it might not be a blocking issue.

This is not a reason not to do it. Asserts are only called from debug anyway, so there is no question of them having user facing impact. They are for detecting whether we have bugs internally. (If there were any chance of them being called outside they should be checks.)