From 5cc32a0593823215080a22c40094de7b2d3b8863 Mon Sep 17 00:00:00 2001 From: Holden Roaten Date: Tue, 24 Mar 2026 00:49:59 +0000 Subject: [PATCH] Added blas_error_if function for parameter checking in cpu wrapper functions --- src/util.mojo | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 src/util.mojo diff --git a/src/util.mojo b/src/util.mojo new file mode 100644 index 0000000..9bd7a3f --- /dev/null +++ b/src/util.mojo @@ -0,0 +1,5 @@ +# error checking blas_error_if(condition, __function_name__, "parameter_name", parameter) +fn blas_error_if[T: Stringable ](cond: Bool, caller: String, param: String, val: T) raises: + if(cond) : + raise Error(caller, " Error: ", param, " = ", String(val)) +