• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ dev函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中dev函数的典型用法代码示例。如果您正苦于以下问题:C++ dev函数的具体用法?C++ dev怎么用?C++ dev使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了dev函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: dev

void parser_t::netdev_hint()
{
	pstring dev(get_identifier());
	require_token(m_tok_comma);
	pstring hint(get_identifier());
	m_setup.register_param(dev + ".HINT_" + hint, 1);
	require_token(m_tok_param_right);
}
开发者ID:PugsyMAME,项目名称:mame,代码行数:8,代码来源:nl_parser.cpp


示例2:

void dynamicLagrangian<BasicTurbulenceModel>::correctNut
(
    const tmp<volTensorField>& gradU
)
{
    this->nut_ = (flm_/fmm_)*sqr(this->delta())*mag(dev(symm(gradU)));
    this->nut_.correctBoundaryConditions();
}
开发者ID:totocaca,项目名称:OpenFOAM-dev,代码行数:8,代码来源:dynamicLagrangian.C


示例3:

tmp<fvVectorMatrix> realizableKE_Veh::divDevReff(volVectorField& U) const
{
    return
    (
      - fvm::laplacian(nuEff(), U)
      - fvc::div(nuEff()*dev(T(fvc::grad(U))))
    );
}
开发者ID:SMHI-Apl,项目名称:OFTools,代码行数:8,代码来源:realizableKE_Veh.C


示例4: close

 void close(BOOST_IOS::openmode which)
 {
     if (which == BOOST_IOS::in && (flags_ & f_input_closed) == 0) {
         flags_ |= f_input_closed;
         iostreams::close(dev(), BOOST_IOS::in);
     }
     if (which == BOOST_IOS::out && (flags_ & f_output_closed) == 0) {
         flags_ |= f_output_closed;
         detail::execute_all(
             detail::flush_buffer(buf_.second(), dev(), can_write::value),
             detail::call_close(dev(), BOOST_IOS::out),
             detail::call_reset(dev_),
             detail::call_reset(buf_.first()),
             detail::call_reset(buf_.second())
         );
     }
 }
开发者ID:mengskysama,项目名称:V8,代码行数:17,代码来源:code_converter.hpp


示例5:

tmp<fvVectorMatrix> SpalartAllmaras::divDevReff(volVectorField& U) const
{
    return
    (
      - fvm::laplacian(nuEff(), U)
      - fvc::div(nuEff()*dev(T(fvc::grad(U))))
    );
}
开发者ID:ADGlassby,项目名称:OpenFOAM-2.2.x,代码行数:8,代码来源:SpalartAllmaras.C


示例6: printf

void AudioDevice::printAll(){
	for(int i=0; i<numDevices(); i++){
		printf("[%2d] ", i);
		AudioDevice dev(i);
		dev.print();
		//print(i);
	}
}
开发者ID:LuaAV,项目名称:LuaAV,代码行数:8,代码来源:AudioIO.cpp


示例7:

tmp<fvVectorMatrix> kOmega::divDevReff(volVectorField& U) const
{
    return
    (
      - fvm::laplacian(nuEff(), U)
      - fvc::div(nuEff()*dev(fvc::grad(U)().T()))
    );
}
开发者ID:Cescfangs,项目名称:OpenFOAM-1.7.x,代码行数:8,代码来源:kOmega.C


示例8:

tmp<fvVectorMatrix> LienCubicKE::divDevReff(volVectorField& U) const
{
    return
        (
            fvc::div(nonlinearStress_)
            - fvm::laplacian(nuEff(), U)
            - fvc::div(nuEff()*dev(T(fvc::grad(U))))
        );
}
开发者ID:markuskolano,项目名称:OpenFOAM-2.0.x,代码行数:9,代码来源:LienCubicKE.C


示例9: prep

static inline void prep(adc_t line)
{
    if (dev(line) == ADC0) {
        bit_set32(&SIM->SCGC6, SIM_SCGC6_ADC0_SHIFT);
    }
#ifdef ADC1
    else if (dev(line) == ADC1) {
#if defined(SIM_SCGC3_ADC1_SHIFT)
        bit_set32(&SIM->SCGC3, SIM_SCGC3_ADC1_SHIFT);
#elif defined(SIM_SCGC6_ADC1_SHIFT)
        bit_set32(&SIM->SCGC6, SIM_SCGC6_ADC1_SHIFT);
#else
#error ADC1 clock gate is not known!
#endif
    }
#endif /* ADC1 */
    mutex_lock(&locks[dev_num(line)]);
}
开发者ID:adjih,项目名称:RIOT,代码行数:18,代码来源:adc.c


示例10: main

int main(int argc, char **argv) {

  Palette palette;
  palette.Shade16();
  Device dev(WinX, WinY, &palette);
  MainApp app(dev);

  return dev.MainLoop();
}
开发者ID:ybabel,项目名称:Go4D,代码行数:9,代码来源:LBeasts.cpp


示例11: dev

IPHeader::PrintOptType::PrintOptType(const char *ptr,const char *lim)
 {
  StrParse dev(ptr,lim);
  
  ParseInbound(dev,inbound);
  ParseExtra(dev,extra);
  
  if( !dev.finish() ) setDefault(); 
 }
开发者ID:SergeyStrukov,项目名称:CCore,代码行数:9,代码来源:NetBase.cpp


示例12: returnNormalizedLine

ofPolyline returnNormalizedLine (ofPolyline & input){
    ofPolyline output = input;
    vector< float > x;
    vector< float > y;
    for (int i = 0; i < output.getVertices().size(); i++){
        x.push_back(output[i].x);
        y.push_back(output[i].y);
    }
    float sumx, meanx, varx, devx, skewx, kurtx;
    float sumy, meany, vary, devy, skewy, kurty;
    computeStats(x.begin( ), x.end( ), sumx, meanx, varx, devx, skewx, kurtx);
    computeStats(y.begin( ), y.end( ), sumy, meany, vary, devy, skewy, kurty);
    float stdDev = sqrt(devx*devx + devy*devy);
    ofPoint midPt (meanx, meany);
    ofPoint dev (stdDev, stdDev);
    
    
    ofMatrix4x4 mat;
    mat.makeTranslationMatrix(-midPt.x, -midPt.y, 0);
    
    ofMatrix4x4 mat2;
    mat2.makeScaleMatrix(100.0/dev.x, 100.0/dev.y, 1.0);
    // mat.scale(100,100,1.0);
    
    //mat *= mat2;
    
    
    for (int i = 0; i < output.getVertices().size(); i++){
        
        ofPoint input = output[i];
        
        output[i] -= midPt;
        output[i] /= dev;
        output[i]*= 100.0;
        
        //        cout << output[i] << endl;
        //        cout << "--> " << input << endl;
        //        cout << input * mat * mat2 << endl;
        //        cout << "--> " << (input * mat * mat2) * mat2.getInverse() * mat.getInverse() << endl;
        
    }
    //    ofRectangle boxOrig = input.getBoundingBox();
    //    ofRectangle box = boxOrig;
    //    ofRectangle outputBox(-100,-100,200,200);
    //    box.scaleTo(outputBox);
    //
    //    for (int i = 0; i < output.getVertices().size(); i++){
    //        output.getVertices()[i].x = ofMap( output.getVertices()[i].x, boxOrig.position.x, boxOrig.position.x + boxOrig.width,
    //                                           box.position.x, box.x + box.width);
    //        output.getVertices()[i].y = ofMap( output.getVertices()[i].y, boxOrig.position.y, boxOrig.position.y + boxOrig.height,
    //                                          box.position.x, box.y + box.height);
    //
    //    }
    
    return output;
    
}
开发者ID:CLOUDS-Interactive-Documentary,项目名称:CLOUDS,代码行数:57,代码来源:lineMatchUtils.cpp


示例13: dev

istream* Hdfs::open(std::string path)
{
  if (exists(path) == false)
  {
    throw ios_base::failure("File not found.");
  }
  HdfsDevice dev(_host, _port, path);
  return new boost::iostreams::stream<HdfsDevice>(dev);
}
开发者ID:Nanonid,项目名称:hootenanny,代码行数:9,代码来源:Hdfs.cpp


示例14: rCmu

tmp<volScalarField> realizableKE::rCmu
(
    const volTensorField& gradU
)
{
    volScalarField S2 = 2*magSqr(dev(symm(gradU)));
    volScalarField magS = sqrt(S2);
    return rCmu(gradU, S2, magS);
}
开发者ID:degirmen,项目名称:openfoam-extend-OpenFOAM-1.6-ext,代码行数:9,代码来源:realizableKE.C


示例15: dev

dimensionedTensor dev(const dimensionedTensor& dt)
{
    return dimensionedTensor
    (
        "dev("+dt.name()+')',
        dt.dimensions(),
        dev(dt.value())
    );
}
开发者ID:CFMS,项目名称:foam-extend-foam-extend-3.2,代码行数:9,代码来源:dimensionedTensor.C


示例16: getDriveInfoFromSysfs

/* static */
int getDriveInfoFromSysfs(DriveInfoList *pList, bool isDVD, bool *pfSuccess)
{
    AssertPtrReturn(pList, VERR_INVALID_POINTER);
    AssertPtrNullReturn(pfSuccess, VERR_INVALID_POINTER); /* Valid or Null */
    LogFlowFunc (("pList=%p, isDVD=%u, pfSuccess=%p\n",
                  pList, (unsigned) isDVD, pfSuccess));
    RTDIR hDir;
    int rc;
    bool fSuccess = false;
    unsigned cFound = 0;

    if (!RTPathExists("/sys"))
        return VINF_SUCCESS;
    rc = RTDirOpen(&hDir, "/sys/block");
    /* This might mean that sysfs semantics have changed */
    AssertReturn(rc != VERR_FILE_NOT_FOUND, VINF_SUCCESS);
    fSuccess = true;
    if (RT_SUCCESS(rc))
    {
        for (;;)
        {
            RTDIRENTRY entry;
            rc = RTDirRead(hDir, &entry, NULL);
            Assert(rc != VERR_BUFFER_OVERFLOW);  /* Should never happen... */
            if (RT_FAILURE(rc))  /* Including overflow and no more files */
                break;
            if (entry.szName[0] == '.')
                continue;
            sysfsBlockDev dev(entry.szName, isDVD);
            /* This might mean that sysfs semantics have changed */
            AssertBreakStmt(dev.isConsistent(), fSuccess = false);
            if (!dev.isValid())
                continue;
            try
            {
                pList->push_back(DriveInfo(dev.getNode(), dev.getUdi(), dev.getDesc()));
            }
            catch(std::bad_alloc &e)
            {
                rc = VERR_NO_MEMORY;
                break;
            }
            ++cFound;
        }
        RTDirClose(hDir);
    }
    if (rc == VERR_NO_MORE_FILES)
        rc = VINF_SUCCESS;
    if (RT_FAILURE(rc))
        /* Clean up again */
        for (unsigned i = 0; i < cFound; ++i)
            pList->pop_back();
    if (pfSuccess)
        *pfSuccess = fSuccess;
    LogFlow (("rc=%Rrc, fSuccess=%u\n", rc, (unsigned) fSuccess));
    return rc;
}
开发者ID:mdaniel,项目名称:virtualbox-org-svn-vbox-trunk,代码行数:58,代码来源:HostHardwareLinux.cpp


示例17: Mises_strain

//This function determines the Mises equivalent of a strain tensor, according to the Voigt convention for strains 
double Mises_strain(const vec &v) {
	assert(v.size()==6);

	vec vdev = dev(v);
	vec vdev2 = vdev;
	for (int i=3; i<6; i++)
		vdev2(i) = 0.5*vdev2(i);	

	return sqrt(2./3.*sum(vdev%vdev2));
}
开发者ID:deepworks,项目名称:smartplus,代码行数:11,代码来源:contimech.cpp


示例18: Mises_stress

//This function determines the Mises equivalent of a stress tensor, according to the Voigt convention for stress 
double Mises_stress(const vec &v) {
	assert(v.size()==6);

	vec vdev = dev(v);
	vec vdev2 = vdev;
	for (int i=3; i<6; i++)
		vdev2(i) = 2.*vdev2(i);	

	return sqrt(3./2.*sum(vdev%vdev2));
}
开发者ID:deepworks,项目名称:smartplus,代码行数:11,代码来源:contimech.cpp


示例19: J2_strain

//Returns the second invariant of the deviatoric part of a second order strain tensor written as a Voigt vector
double J2_strain(const vec &v) {
	assert(v.size()==6);

	vec vdev = dev(v);
	vec vdev2 = vdev;
	for (int i=3; i<6; i++)
		vdev2(i) = 0.5*vdev2(i);	

	return 0.5*sum(vdev%vdev2);
}
开发者ID:deepworks,项目名称:smartplus,代码行数:11,代码来源:contimech.cpp


示例20: i2c_acquire

int i2c_acquire(i2c_t bus)
{
    assert(bus < I2C_NUMOF);

    mutex_lock(&locks[bus]);
    dev(bus)->ENABLE = TWIM_ENABLE_ENABLE_Enabled;

    DEBUG("[i2c] acquired bus %i\n", (int)bus);
    return 0;
}
开发者ID:LudwigKnuepfer,项目名称:RIOT,代码行数:10,代码来源:i2c.c



注:本文中的dev函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ devToolsAgent函数代码示例发布时间:2022-05-30
下一篇:
C++ determine_type函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap