Setup error handling modified

This commit is contained in:
doinachiroiu 2020-08-31 11:48:19 +00:00
parent 531850afc2
commit 7e22952c42

View File

@ -160,17 +160,11 @@ absl::Status PffftMain() {
// PFFFT benchmark // PFFFT benchmark
{ {
sapi::StatusOr<PFFFT_Setup*> s = SAPI_ASSIGN_OR_RETURN(
api.pffft_new_setup(n, complex ? PFFFT_COMPLEX : PFFFT_REAL); PFFFT_Setup *s,
api.pffft_new_setup(n, complex ? PFFFT_COMPLEX : PFFFT_REAL));
LOG(INFO) << "Setup status is: " << s.status().ToString(); sapi::v::RemotePtr s_reg(s);
if (!s.ok()) {
printf("Sandbox failed.\n");
return s.status();
}
sapi::v::RemotePtr s_reg(s.value());
t0 = UclockSec(); t0 = UclockSec();
for (int iter = 0; iter < max_iter; ++iter) { for (int iter = 0; iter < max_iter; ++iter) {