# Number of floating point operations for pointwise kernels in PyFR

**URL:** <https://pyfr.discourse.group/t/number-of-floating-point-operations-for-pointwise-kernels-in-pyfr/137>\
**Category:** General\
**Created:** [6 February 2017 15:42 UTC](https://pyfr.discourse.group/t/number-of-floating-point-operations-for-pointwise-kernels-in-pyfr/137 "2017-02-06T15:42:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Antonio\_Garcia-Uceda](https://avatars.discourse-cdn.com/v4/letter/a/ce73a5/32.png) [@Antonio\_Garcia-Uceda](https://pyfr.discourse.group/u/Antonio_Garcia-Uceda)\
**Post date:** [6 February 2017 15:42 UTC](https://pyfr.discourse.group/t/number-of-floating-point-operations-for-pointwise-kernels-in-pyfr/137/1 "2017-02-06T15:42:48Z")

</div>

Dear all,

I’m Antonio Garcia-Uceda, researcher on Flux Reconstruction methods.

I’d like to ask you whether you could provide me with a estimation of the number of floating point operations needed for the different pointwise operators in PyFR (separately if possible). In particular, the computation of inviscid and viscous fluxes, in cells and on faces.

Thanks a lot in advance.

Best regards,  
Antonio

---

<div class="post-metadata">

**Author:** ![fdw](https://avatars.discourse-cdn.com/v4/letter/f/a587f6/32.png) [@fdw](https://pyfr.discourse.group/u/fdw)\
**Post date:** [7 February 2017 19:16 UTC](https://pyfr.discourse.group/t/number-of-floating-point-operations-for-pointwise-kernels-in-pyfr/137/2 "2017-02-07T19:16:12Z")

</div>

Hi Antonio,

> I'd like to ask you whether you could provide me with a estimation  
> of the number of floating point operations needed for the different  
> pointwise operators in PyFR (separately if possible). In particular,  
> the computation of inviscid and viscous fluxes, in cells and on  
> faces.

The overall flops from the pointwise operations are insignificant  
compared to the matrix multiplication operations. However, as they are  
just pointwise you can estimate the number of flops by counting the  
number of operationa required to compute the 15 fluxes in a 3D Euler  
simulation. Account for the matrix vector products to transform these  
fluxes from physical to transformed spce and you've got a reasonable  
estimate.

Regards, Freddie.

---

<div class="post-metadata">

**Author:** ![Antonio\_Garcia-Uceda](https://avatars.discourse-cdn.com/v4/letter/a/ce73a5/32.png) [@Antonio\_Garcia-Uceda](https://pyfr.discourse.group/u/Antonio_Garcia-Uceda)\
**Post date:** [10 February 2017 10:12 UTC](https://pyfr.discourse.group/t/number-of-floating-point-operations-for-pointwise-kernels-in-pyfr/137/3 "2017-02-10T10:12:09Z")

</div>

Dear Freddie,

Thanks a lot for your reply.

Could you please tell me whether in your estimations you considered all floating-points operations: +, -, \*, /, fabs, sqrt, … as of the same type, or applied some sort of conversion to express that some are typically more expensive than others, such as “/” or “sqrt”?

Best regards,  
Antonio

---

<div class="post-metadata">

**Author:** ![fdw](https://avatars.discourse-cdn.com/v4/letter/f/a587f6/32.png) [@fdw](https://pyfr.discourse.group/u/fdw)\
**Post date:** [15 February 2017 18:56 UTC](https://pyfr.discourse.group/t/number-of-floating-point-operations-for-pointwise-kernels-in-pyfr/137/4 "2017-02-15T18:56:31Z")

</div>

Hi Antonio,

All floating point operations were assumed to have the same cost. While  
this is not actually true, the number of flops contributed from these  
operations is so small that it really is just a rounding error.

Regards, Freddie.
