??xml version="1.0" encoding="utf-8" standalone="yes"?>99久久国产亚洲综合精品,久久精品国产一区二区三区,国产精品久久久久久久http://www.shnenglu.com/hwliu11/zh-cnSat, 05 Jul 2025 16:10:30 GMTSat, 05 Jul 2025 16:10:30 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  
问题在指o(h)sarQ这是算数右UM指o(h)Q会(x)保留最高位Q而第二种可以是因为movzx  高位已l置?br />扑ֈ?jin)原因,可以写?f)
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;
只要涉及(qing)到右U,保证操作数是无符号就可以?jin)?/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.

发生以上错误实很麻?ch),而且可参考文基本没有。Fortran代码中的Common块数据大可以不一样大Q相同名U的CommonQ,但是在OpenMP中确要求Q要么大一P要么占用内存最大的先调用,变量如果是隐式声明,一定要注意Q变量名UC同,可能?x)编译?f)不同长度的内?/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开始)(j)Q用新的屏q选择法Q我使用6.8开发的E序Q升U到6.9.1之后Q用IVTK部分模型无法选中几何元素Q经q调试发?.9.1代码有BUGQ导致数据丢失,无法判断选中的元素是否在选择范围QBUG出现的文件ؓ(f)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.jituansms.cn" target="_blank">þþþþúݺݶ</a>| <a href="http://www.zhibonet.cn" target="_blank">þɬۺ</a>| <a href="http://www.wooblog.cn" target="_blank">˾þþƷһ</a>| <a href="http://www.deshizhai.cn" target="_blank">99þ99þþƷƬ </a>| <a href="http://www.icq418.cn" target="_blank">AVݺɫۺϾþ</a>| <a href="http://www.lxldb.cn" target="_blank">þˬˬƬAV</a>| <a href="http://www.vxpg.cn" target="_blank">ɫۺϾþ۾Ʒ</a>| <a href="http://www.z1359.cn" target="_blank">޾ƷۺϾþһ</a>| <a href="http://www.epcinet.cn" target="_blank">þþþAVר</a>| <a href="http://www.00175.com.cn" target="_blank">һaƬþëƬ</a>| <a href="http://www.a2302.cn" target="_blank">Ļþҹ</a>| <a href="http://www.ruea.cn" target="_blank">þþƷƵ</a>| <a href="http://www.lzjsyg.cn" target="_blank">þùƷ-Ʒ</a>| <a href="http://www.liuxuehanguo.cn" target="_blank">˼˼þ99ֻƵƷ66</a>| <a href="http://www.shenhoulong.com.cn" target="_blank">ھƷþ޻</a>| <a href="http://www.seomajor.cn" target="_blank">ٸлþþþ</a>| <a href="http://www.xn88.cn" target="_blank">91þþƷ˾þ</a>| <a href="http://www.gold160.cn" target="_blank">þˮav뾫Ʒ鶹 </a>| <a href="http://www.biaopie.cn" target="_blank">˾Ʒþþþ7777</a>| <a href="http://www.fanggumen.cn" target="_blank">97þóƷ2021</a>| <a href="http://www.zhaiseng.cn" target="_blank">þۺ¶þü</a>| <a href="http://www.988o.cn" target="_blank">ݺɫþۺ</a>| <a href="http://www.yjpute.cn" target="_blank">˾þô߽ۺAv</a>| <a href="http://www.gonnts.cn" target="_blank">þֹƷۺ</a>| <a href="http://www.taobaomaiba.cn" target="_blank">Ӱһþҹײ </a>| <a href="http://www.114out.cn" target="_blank">þۺϺݺۺϾþۺ88 </a>| <a href="http://www.yc-shop.cn" target="_blank">ھƷþþþþҰ</a>| <a href="http://www.chcrw.cn" target="_blank">þþоƷ</a>| <a href="http://www.zxk2008bj.cn" target="_blank">þþþƷ</a>| <a href="http://www.fuxingjidian.cn" target="_blank">þùƷվ</a>| <a href="http://www.bmims01.cn" target="_blank">Ʒþþ99</a>| <a href="http://www.sskca.cn" target="_blank">˾þۺ2020</a>| <a href="http://www.you-yong.com.cn" target="_blank">avھƷþþþӰԺ</a>| <a href="http://www.wyj325.cn" target="_blank">ݺݺݾþ</a>| <a href="http://www.zhoucheng888.cn" target="_blank">99ŷþþþƷѿ</a>| <a href="http://www.sowudi.com.cn" target="_blank">þݺҹҹ96׽ </a>| <a href="http://www.swangxinwen.cn" target="_blank">ɫۺϾþۺ</a>| <a href="http://www.n-hao.cn" target="_blank">Ʒ99þþþ</a>| <a href="http://www.51fsyf.cn" target="_blank">þ99þóѲ</a>| <a href="http://www.guoweipi.cn" target="_blank">þþƷ99þþ㽶</a>| <a href="http://www.51jintianfang.cn" target="_blank">AƷһþ</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>