You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i.e. it is of the form (A if B else 0) + (C if D else 0) + (E if F else 0), but I think the optimized way of writing this would be A if B else (C if D else (E if F else 0)), notice how this could save us some conditional computation i.e. global memory reads.
The text was updated successfully, but these errors were encountered:
On some more thought I think the current way of summing the contributions is too global memory heavy, instead storing the mapping into a single array should be more efficient:
A[.., ...] if which_term[iel,idof]==0 else (B[..., ...] if which_term[iel,idof]==1 else 0)
This should significantly decrease the global memory footprint of the expression. (I think)
I was looking at the generated expression for the direct connection expression and it is of the form:
i.e. it is of the form
(A if B else 0) + (C if D else 0) + (E if F else 0)
, but I think the optimized way of writing this would beA if B else (C if D else (E if F else 0))
, notice how this could save us some conditional computation i.e. global memory reads.The text was updated successfully, but these errors were encountered: