2017-08-03 01:38:28 +08:00
|
|
|
#![macro_use]
|
|
|
|
|
|
|
|
macro_rules! lapack_check(
|
|
|
|
($info: expr) => (
|
2020-11-15 23:57:49 +08:00
|
|
|
// TODO: return a richer error.
|
2017-08-03 01:38:28 +08:00
|
|
|
if $info != 0 {
|
|
|
|
return None;
|
|
|
|
}
|
|
|
|
// if $info < 0 {
|
|
|
|
// return Err(Error::from(ErrorKind::LapackIllegalArgument(-$info)));
|
|
|
|
// } else if $info > 0 {
|
|
|
|
// return Err(Error::from(ErrorKind::LapackFailure($info)));
|
|
|
|
// }
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
macro_rules! lapack_panic(
|
|
|
|
($info: expr) => (
|
|
|
|
assert!($info == 0, "Lapack error.");
|
|
|
|
);
|
|
|
|
);
|
2017-08-14 01:52:51 +08:00
|
|
|
|
|
|
|
macro_rules! lapack_test(
|
|
|
|
($info: expr) => (
|
|
|
|
$info == 0
|
|
|
|
);
|
|
|
|
);
|