# A small bug report

**URL:** <https://gpusph.discourse.group/t/a-small-bug-report/136>\
**Category:** Issues\
**Created:** [February 3, 2021, 4:29am UTC](https://gpusph.discourse.group/t/a-small-bug-report/136 "2021-02-03T04:29:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JoJo](https://avatars.discourse-cdn.com/v4/letter/j/ecd19e/32.png) [@JoJo](https://gpusph.discourse.group/u/JoJo)\
**Post date:** [February 3, 2021, 4:29am UTC](https://gpusph.discourse.group/t/a-small-bug-report/136/1 "2021-02-03T04:29:35Z")

</div>

In src/cuda/tensor.cu Line 219  
float3  
dot(symtensor3 const& T, float3 const& v)

and also Line 230

float3  
dot(symtensor3 const& T, float3 const& v)  
{  
return make\_float3(  
T.xx_v.x + T.xy_v.y + T.xz_v.z,  
T.xy_v.y + T.yy_v.y + T.yz_v.z, // the first v.y → v.x  
T.xz_v.x + T.yz_v.y + T.zz\*v.z);

}

i believe this function should be  
T.xx_v.x + T.xy_v.y + T.xz_v.z,  
T.xy_v.x + T.yy_v.y + T.yz_v.z, [//v.y](https://v.y) → v.x  
T.xz_v.x + T.yz_v.y + T.zz\*v.z);

just like the function in Line 242  
float4  
dot(symtensor4 const& T, float4 const& v)  
{  
return make\_float4(  
T.xx_v.x + T.xy_v.y + T.xz_v.z + T.xw_v.w,  
T.xy_v.x + T.yy_v.y + T.yz_v.z + T.yw_v.w,  
T.xz_v.x + T.yz_v.y + T.zz_v.z + T.zw_v.w,  
T.xw_v.x + T.yw_v.y + T.zw_v.z + T.ww_v.w);

}

---

<div class="post-metadata">

**Author:** ![giuseppe.bilotta](https://yyz2.discourse-cdn.com/free1/user_avatar/gpusph.discourse.group/giuseppe.bilotta/32/72_2.png) [@giuseppe.bilotta](https://gpusph.discourse.group/u/giuseppe.bilotta)\
**Post date:** [February 3, 2021, 10:26am UTC](https://gpusph.discourse.group/t/a-small-bug-report/136/2 "2021-02-03T10:26:35Z")

</div>

Hello,

thanks for spotting this. I assume you’re using the `master` branch? This issues has been fixed already in commit a9aad165b225ce45ce507cfc8e5695b8126ec045 “Typo/component bug in dot for symtensor3” which is already part of the `next` branch, although it hasn’t been pushed to `master` yet.

(Also please use the GitHub issue tracker to report bugs in the future.)
