??xml version="1.0" encoding="utf-8" standalone="yes"?>久久久一本精品99久久精品88,久久久精品人妻一区二区三区蜜桃,亚洲精品成人久久久http://www.shnenglu.com/hwliu11/zh-cnTue, 06 May 2025 22:39:10 GMTTue, 06 May 2025 22:39:10 GMT60GFORTRAN 64位openmp问题http://www.shnenglu.com/hwliu11/archive/2017/02/04/214646.html隔壁老刘隔壁老刘Sat, 04 Feb 2017 02:59:00 GMThttp://www.shnenglu.com/hwliu11/archive/2017/02/04/214646.htmlhttp://www.shnenglu.com/hwliu11/comments/214646.htmlhttp://www.shnenglu.com/hwliu11/archive/2017/02/04/214646.html#Feedback0http://www.shnenglu.com/hwliu11/comments/commentRss/214646.htmlhttp://www.shnenglu.com/hwliu11/services/trackbacks/214646.html

隔壁老刘 2017-02-04 10:59 发表评论
]]>
C/C++位运的陷阱http://www.shnenglu.com/hwliu11/archive/2016/04/12/213239.html隔壁老刘隔壁老刘Tue, 12 Apr 2016 02:41:00 GMThttp://www.shnenglu.com/hwliu11/archive/2016/04/12/213239.htmlhttp://www.shnenglu.com/hwliu11/comments/213239.htmlhttp://www.shnenglu.com/hwliu11/archive/2016/04/12/213239.html#Feedback2http://www.shnenglu.com/hwliu11/comments/commentRss/213239.htmlhttp://www.shnenglu.com/hwliu11/services/trackbacks/213239.html比如
unsigned char A =;
unsigned char B = ;
unsigned char C = ;
unsigned char a, b, c, d;
a = A >> 2;
b=(A << 6) >> 2|(B>>4);
c = ((B << 4)) >> 2) | (C >> 6);
d = (C << 2) >> 2;
l果发现bcd值都不对
但是写成
b = A<< 6;
b = b >> 2;
b=b|B>>4;
可以,查看b计算两种方式汇编
W一U?br />
00BACB66  movzx       eax,byte ptr [ebp-1F9h]  
00BACB6D  shl         eax,6  
00BACB70  sar         eax,2  
00BACB73  mov         byte ptr [ebp-1C9h],al  
W二U?/div>
00BACB79  movzx       eax,byte ptr [ebp-1F9h]  
00BACB80  shl         eax,6  
00BACB83  mov         byte ptr [ebp-1EDh],al  
00BACB89  movzx       eax,byte ptr [ebp-1EDh]  
00BACB90  sar         eax,2  
00BACB93  mov         byte ptr [ebp-1EDh],al  
问题在指osarQ这是算数右UM指oQ会保留最高位Q而第二种可以是因为movzx  高位已l置?br />扑ֈ了原因,可以写ؓ
a = A >> 2;
b=((unsigned char)(A << 6)) >> 2|(B>>4);
c = (((unsigned char)(B << 4)) >> 2) | (C >> 6);
d = ((unsigned char)(C << 2)) >> 2;
只要涉及到右U,保证操作数是无符号就可以了?/div>


隔壁老刘 2016-04-12 10:41 发表评论
]]>Intel OpenMPq行旉?OMP: Error #133 解决办法http://www.shnenglu.com/hwliu11/archive/2016/02/27/212897.html隔壁老刘隔壁老刘Sat, 27 Feb 2016 04:13:00 GMThttp://www.shnenglu.com/hwliu11/archive/2016/02/27/212897.htmlhttp://www.shnenglu.com/hwliu11/comments/212897.htmlhttp://www.shnenglu.com/hwliu11/archive/2016/02/27/212897.html#Feedback0http://www.shnenglu.com/hwliu11/comments/commentRss/212897.htmlhttp://www.shnenglu.com/hwliu11/services/trackbacks/212897.htmlOMP: Error #133: Inconsistent THREADPRIVATE common block declarations are non-conforming and are unsupported. Either all threadprivate common blocks must be declared identically, or the largest instance of each threadprivate common block must be referenced first during the run.

发生以上错误实很麻烦,而且可参考文基本没有。Fortran代码中的Common块数据大可以不一样大Q相同名U的CommonQ,但是在OpenMP中确要求Q要么大一P要么占用内存最大的先调用,变量如果是隐式声明,一定要注意Q变量名UC同,可能会编译ؓ不同长度的内?/span>

隔壁老刘 2016-02-27 12:13 发表评论
]]>
OpenCASCADE 6.9.1 Bughttp://www.shnenglu.com/hwliu11/archive/2015/11/12/212253.html隔壁老刘隔壁老刘Thu, 12 Nov 2015 07:20:00 GMThttp://www.shnenglu.com/hwliu11/archive/2015/11/12/212253.htmlhttp://www.shnenglu.com/hwliu11/comments/212253.htmlhttp://www.shnenglu.com/hwliu11/archive/2015/11/12/212253.html#Feedback0http://www.shnenglu.com/hwliu11/comments/commentRss/212253.htmlhttp://www.shnenglu.com/hwliu11/services/trackbacks/212253.html
OpenCASCADE 6.9.1Q估计从6.9.0开始)Q用新的屏q选择法Q我使用6.8开发的E序Q升U到6.9.1之后Q用IVTK部分模型无法选中几何元素Q经q调试发?.9.1代码有BUGQ导致数据丢失,无法判断选中的元素是否在选择范围QBUG出现的文件ؓSelectMgr_RectangularFrustum.cxx中的函数ScaleAndTransform
NCollection_Handle<SelectMgr_BaseFrustum> SelectMgr_RectangularFrustum::ScaleAndTransform (const Standard_Integer theScaleFactor,
                                                                                           const gp_Trsf& theTrsf)
{
  Standard_ASSERT_RAISE (theScaleFactor > 0,
    "Error! Pixel tolerance for selection should be greater than zero");
  SelectMgr_RectangularFrustum* aRes = new SelectMgr_RectangularFrustum();
  const Standard_Boolean isToScale = theScaleFactor != 1;
  const Standard_Boolean isToTrsf  = theTrsf.Form() != gp_Identity;
  if (!isToScale && !isToTrsf)
return aRes ;//q里Q当部分模型满该条Ӟq回一个空的数据,使用该数据无法判断模型是否在区域
  aRes->myIsOrthographic = myIsOrthographic;
  SelectMgr_RectangularFrustum* aRef = this;
  if (isToScale)
  {
    aRes->myNearPickedPnt = myNearPickedPnt;
    aRes->myFarPickedPnt  = myFarPickedPnt;
    aRes->myViewRayDir    = myViewRayDir;
    const gp_Pnt2d aMinPnt (myMousePos.X() - theScaleFactor * 0.5,
                            myMousePos.Y() - theScaleFactor * 0.5);
    const gp_Pnt2d aMaxPnt (myMousePos.X() + theScaleFactor * 0.5,
                            myMousePos.Y() + theScaleFactor * 0.5);
    // recompute base frustum characteristics from scratch
    computeFrustum (aMinPnt, aMaxPnt, myBuilder, aRes->myVertices, aRes->myEdgeDirs);
    aRef = aRes;
  }
  if (isToTrsf)
  {
    aRes->myNearPickedPnt = aRef->myNearPickedPnt.Transformed (theTrsf);
    aRes->myFarPickedPnt  = aRef->myFarPickedPnt.Transformed (theTrsf);
    aRes->myViewRayDir    = aRes->myFarPickedPnt.XYZ() - aRes->myNearPickedPnt.XYZ();
      // LeftTopNear
    aRes->myVertices[0] = aRef->myVertices[0].Transformed (theTrsf);
    // LeftTopFar
    aRes->myVertices[1] = aRef->myVertices[1].Transformed (theTrsf);
    // LeftBottomNear
    aRes->myVertices[2] = aRef->myVertices[2].Transformed (theTrsf);
    // LeftBottomFar
    aRes->myVertices[3] = aRef->myVertices[3].Transformed (theTrsf);
    // RightTopNear
    aRes->myVertices[4] = aRef->myVertices[4].Transformed (theTrsf);
    // RightTopFar
    aRes->myVertices[5] = aRef->myVertices[5].Transformed (theTrsf);
    // RightBottomNear
    aRes->myVertices[6] = aRef->myVertices[6].Transformed (theTrsf);
    // RightBottomFar
    aRes->myVertices[7] = aRef->myVertices[7].Transformed (theTrsf);
    // Horizontal
    aRes->myEdgeDirs[0] = aRes->myVertices[4].XYZ() - aRes->myVertices[0].XYZ();
    // Vertical
    aRes->myEdgeDirs[1] = aRes->myVertices[2].XYZ() - aRes->myVertices[0].XYZ();
    // LeftLower
    aRes->myEdgeDirs[2] = aRes->myVertices[2].XYZ() - aRes->myVertices[3].XYZ();
    // RightLower
    aRes->myEdgeDirs[3] = aRes->myVertices[6].XYZ() - aRes->myVertices[7].XYZ();
    // LeftUpper
    aRes->myEdgeDirs[4] = aRes->myVertices[0].XYZ() - aRes->myVertices[1].XYZ();
    // RightUpper
    aRes->myEdgeDirs[5] = aRes->myVertices[4].XYZ() - aRes->myVertices[5].XYZ();
  }
  // compute frustum normals
  computeNormals (aRes->myEdgeDirs, aRes->myPlanes);
  cacheVertexProjections (aRes);
  return NCollection_Handle<SelectMgr_BaseFrustum> (aRes);
}
修改办法Q?
  if (!isToScale && !isToTrsf)
  {
   aRes->myPixelTolerance=myPixelTolerance;
   aRes->myIsOrthographic=myIsOrthographic;
   aRes->myBuilder= myBuilder;
   aRes->myIsOrthographic = myIsOrthographic;
   aRes->myNearPickedPnt = myNearPickedPnt;
   aRes->myFarPickedPnt = myFarPickedPnt;
   aRes->myViewRayDir = myViewRayDir;
   aRes->myMousePos = myMousePos;
  
   for (int i = 0; i <6;++i)
   {
    aRes->myPlanes[i] = myPlanes[i];
   }
   for (int i = 0; i < 6; ++i)
   {
    aRes->myVertices[i] = myVertices[i];
   }
   for (int i = 0; i < 6; ++i)
   {
    aRes->myMaxVertsProjections[i] = myMaxVertsProjections[i];
   }
   for (int i = 0; i < 6; ++i)
   {
    aRes->myMinVertsProjections[i] = myMinVertsProjections[i];
   }
   for (int i = 0; i <3; ++i)
   {
    aRes->myMaxOrthoVertsProjections[i] = myMaxOrthoVertsProjections[i];
   }
   for (int i = 0; i <3; ++i)
   {
    aRes->myMinOrthoVertsProjections[i] = myMinOrthoVertsProjections[i];
   }
   for (int i = 0; i < 6; ++i)
   {
    aRes->myEdgeDirs[i] = myEdgeDirs[i];
   }
   return NCollection_Handle<SelectMgr_BaseFrustum>(aRes);
  }


隔壁老刘 2015-11-12 15:20 发表评论
]]>C++指针cȝ不好x?/title><link>http://www.shnenglu.com/hwliu11/archive/2015/11/07/212213.html</link><dc:creator>隔壁老刘</dc:creator><author>隔壁老刘</author><pubDate>Sat, 07 Nov 2015 13:43:00 GMT</pubDate><guid>http://www.shnenglu.com/hwliu11/archive/2015/11/07/212213.html</guid><wfw:comment>http://www.shnenglu.com/hwliu11/comments/212213.html</wfw:comment><comments>http://www.shnenglu.com/hwliu11/archive/2015/11/07/212213.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/hwliu11/comments/commentRss/212213.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/hwliu11/services/trackbacks/212213.html</trackback:ping><description><![CDATA[<div>C++指针cM用v来方便,但是不维护好引用计数Q不能随时控制对象的释放Q反而造成内存耗尽Q这栯来,反而不能随时控制对象的生命周期Q所以用要谨慎啊?/div><img src ="http://www.shnenglu.com/hwliu11/aggbug/212213.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/hwliu11/" target="_blank">隔壁老刘</a> 2015-11-07 21:43 <a href="http://www.shnenglu.com/hwliu11/archive/2015/11/07/212213.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>лǵվܻԴȤ</p> <a href="http://www.shnenglu.com/" title="精品视频久久久久">精品视频久久久久</a> <div class="friend-links"> </div> </div> </footer> <a href="http://www.songshuidaojia.cn" target="_blank">ɫþþۺ </a>| <a href="http://www.scjyzj.cn" target="_blank">ƷѾþþþõӰ</a>| <a href="http://www.starlight-caraccessories.cn" target="_blank">þþþþ</a>| <a href="http://www.bo2.com.cn" target="_blank">þþƷһAV</a>| <a href="http://www.enikl.cn" target="_blank">ɫۺϾþ</a>| <a href="http://www.qvcz.cn" target="_blank">þþһ</a>| <a href="http://www.thha.cn" target="_blank">þۺϾþۺϾþ</a>| <a href="http://www.323r.cn" target="_blank">˾Ʒþþþ7777</a>| <a href="http://www.n29306.cn" target="_blank">þݹֻƬ</a>| <a href="http://www.sd167.cn" target="_blank">ݺݾƷþþĻ </a>| <a href="http://www.sunyu-display.cn" target="_blank">þǿdŮվ</a>| <a href="http://www.deografenny.com.cn" target="_blank">þAV뾫Ʒɫҹ</a>| <a href="http://www.ljvs.cn" target="_blank">97ȾþƵƷ99</a>| <a href="http://www.pu89.cn" target="_blank">ƷۺϾþ</a>| <a href="http://www.10711.com.cn" target="_blank">þԭƷ </a>| <a href="http://www.abcvi.cn" target="_blank">ɫۺϾþ</a>| <a href="http://www.292284.cn" target="_blank">ƷŮþþm</a>| <a href="http://www.17450.cn" target="_blank">һaƬþëƬëƬ</a>| <a href="http://www.xbbu.cn" target="_blank">þ91Ʒþ91ۺ</a>| <a href="http://www.g172.cn" target="_blank">ƷŮ߳׾þþ</a>| <a href="http://www.ru87.cn" target="_blank">Ʒһþ㽶߿</a>| <a href="http://www.vfqt.cn" target="_blank">þþþþþAv</a>| <a href="http://www.straddle.cn" target="_blank">þ</a>| <a href="http://www.diy800.cn" target="_blank">Ʒ99þþþ</a>| <a href="http://www.njw2008.cn" target="_blank">þþùƷһ</a>| <a href="http://www.ldzv.cn" target="_blank">yy6080þ</a>| <a href="http://www.fpsky.cn" target="_blank">޹㽶ˬAVƬþ</a>| <a href="http://www.52maila.cn" target="_blank">ŷ龫Ʒþþþ</a>| <a href="http://www.west-data.cn" target="_blank">ŷ˾þۺһ</a>| <a href="http://www.py63.cn" target="_blank">ھƷþ鶹Ħ</a>| <a href="http://www.xyzl8.cn" target="_blank">ŷþþþ</a>| <a href="http://www.yajige.cn" target="_blank">ɫۺϾþɫ</a>| <a href="http://www.xiaosp4.cn" target="_blank">wwwԾþþcom</a>| <a href="http://www.83601.com.cn" target="_blank">þҹɫƷAV </a>| <a href="http://www.link133.cn" target="_blank">츾޾þĻ</a>| <a href="http://www.hellorolex.cn" target="_blank">ŷþۺ</a>| <a href="http://www.kottbac.cn" target="_blank">ƷVIDEOSSEXþ÷</a>| <a href="http://www.mjiniu.cn" target="_blank">þݹֻƬ</a>| <a href="http://www.caregps.cn" target="_blank">þùѹۿƷ3</a>| <a href="http://www.linuxls.cn" target="_blank">ŷ츾XXXXԾþþ</a>| <a href="http://www.nxjinniu.com.cn" target="_blank">99þþƷһ</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>