MCPcopy Create free account
hub / github.com/ml-explore/mlx / parse_norm

Function parse_norm

python/src/fft.cpp:22–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20namespace {
21
22mx::fft::FFTNorm parse_norm(std::string_view norm, std::string_view op) {
23 if (norm == "backward") {
24 return mx::fft::FFTNorm::Backward;
25 }
26 if (norm == "ortho") {
27 return mx::fft::FFTNorm::Ortho;
28 }
29 if (norm == "forward") {
30 return mx::fft::FFTNorm::Forward;
31 }
32 throw std::invalid_argument(
33 std::string("[") + std::string(op) +
34 "] Invalid norm. Expected one of {'backward', 'ortho', 'forward'}.");
35}
36
37} // namespace
38

Callers 1

init_fftFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected