Skip to content

Commit

Permalink
sycl - Misc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jrwrigh authored and jeremylt committed Sep 17, 2024
1 parent 8ff9188 commit be77d12
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions backends/sycl-gen/ceed-sycl-gen-operator.sycl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ static int CeedOperatorApplyAdd_Sycl_gen(CeedOperator op, CeedVector input_vec,
break;
}
}
if (!is_active) CeedCallBackend(CeedVectorDestroy(&vec));
if (index == -1) {
CeedCallBackend(CeedVectorGetArray(vec, CEED_MEM_DEVICE, &impl->fields->outputs[i]));
} else {
impl->fields->outputs[i] = impl->fields->outputs[index];
}
if (!is_active) CeedCallBackend(CeedVectorDestroy(&vec));
}
}

Expand Down Expand Up @@ -189,10 +189,10 @@ static int CeedOperatorApplyAdd_Sycl_gen(CeedOperator op, CeedVector input_vec,
break;
}
}
if (!is_active) CeedCallBackend(CeedVectorDestroy(&vec));
if (index == -1) {
CeedCallBackend(CeedVectorRestoreArray(vec, &impl->fields->outputs[i]));
}
if (!is_active) CeedCallBackend(CeedVectorDestroy(&vec));
}
}

Expand Down
4 changes: 2 additions & 2 deletions backends/sycl-ref/ceed-sycl-ref-operator.sycl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1023,9 +1023,9 @@ static int CeedSingleOperatorAssembleSetup_Sycl(CeedOperator op) {
CeedCallBackend(CeedOperatorFieldGetBasis(input_fields[i], &basis));
CeedCheck(!basis_in || basis_in == basis, ceed, CEED_ERROR_BACKEND, "Backend does not implement operator assembly with multiple active bases");
if (!basis_in) CeedCallBackend(CeedBasisReferenceCopy(basis, &basis_in));
CeedCallBackend(CeedBasisGetDimension(basis, &dim));
CeedCallBackend(CeedBasisGetNumQuadraturePoints(basis, &num_qpts));
CeedCallBackend(CeedBasisDestroy(&basis));
CeedCallBackend(CeedBasisGetDimension(basis_in, &dim));
CeedCallBackend(CeedBasisGetNumQuadraturePoints(basis_in, &num_qpts));
CeedCallBackend(CeedOperatorFieldGetElemRestriction(input_fields[i], &elem_rstr));
if (!rstr_in) CeedCallBackend(CeedElemRestrictionReferenceCopy(elem_rstr, &rstr_in));
CeedCallBackend(CeedElemRestrictionDestroy(&elem_rstr));
Expand Down

0 comments on commit be77d12

Please sign in to comment.