win10 + cmake3.17 + vs2017编译osgearth2.7.0

vs2017中,将CMake构建目录设置在项目目录下 建议将构建目录设置为项目子目录(如build或out),这样便于项目管理和版本控制。同时注意.gitignore文件中应排除这些构建目录。在VS中生成CMakeSettings.json文件(通过点击编译平台按钮如x64-Debug或x64-Release)这样构建文件会生成在项目目录下的build文件夹中。这会在当前项目目录下创建build文件夹作为构建目录。这样输出文件会存放在解决方案目录下的bin文件夹中。 阅读详情

1. 下载文件并配置安装目录

1.1 下载文件

  • 1)osgearth-2.7.0
  • 2)  curl-7.48.0
  • 3)  osg-3.4.1
  • 4)  osg第三方依赖库:3rdParty_VS2017_v141_x64_V11_full.7z
  • 5)osg示例数据:OpenSceneGraph-Data-3.4.0.zip
  • 6)cmake-3.17
  • 7)FindZLIB.cmake
  • 8)FeatureSourceIndexNode.cpp

我已经打包好,大家可自行下载。

百度云下载地址:

csdn下载地址:

        https://download.youkuaiyun.com/download/Strive_For_Future/88631235

1.2 配置安装目录

创建三个文件夹:

  • build--------用于存放编译osgEarth的过程文件。
  • osgEarth-2.7.0-------用于存放osgEarth的源码
  • osgEarth-2.7.0-x64-vs2017--------用于存放osgEarth的install结果。

如下: 

2. 准备osgEarth的第三方依赖库

2.1 编译curl-7.48.0

比较简单,相关教程见:win10 + vs2017 + cmake3.17 编译 curl-7.48-优快云博客

2.2 编译osg-3.4.1

有点复杂,具体细节教程见:win10 + vs2017 + cmake3.17编译OSG-3.4.1-优快云博客

编译完成之后记得把bin目录、osg第三方依赖库添加到环境变量 

3. 修改osgearth2.7.0中存在的两个问题

这两个问题参考:win10 + cmake3.17 + vs2017编译osgearth2.7.0遇到的坑-优快云博客

3.1)修改src/osgEarthFeatures/FeatureSourceIndexNode.cpp,解决:无法从“std::pair<const _Kty,_Ty>”转换为 to _Objty

debug模式下生成osgEarthAnnotation时,会出现以下错误,

需要对src/osgEarthFeatures/FeatureSourceIndexNode.cpp进行以下修改:

修改后的代码如下,大家可以直接复制替换:

src/osgEarthFeatures/FeatureSourceIndexNode.cpp

/* -*-c++-*- */
/* osgEarth - Dynamic map generation toolkit for OpenSceneGraph
 * Copyright 2015 Pelican Mapping
 * http://osgearth.org
 *
 * osgEarth is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>
 */
#include <osgEarthFeatures/FeatureSourceIndexNode>
#include <osgEarth/Registry>
#include <algorithm>

using namespace osgEarth;
using namespace osgEarth::Features;

// for testing:
//#undef  OE_DEBUG
//#define OE_DEBUG OE_INFO

namespace
{
    // nifty template to iterate over a map's keys
    template<typename T>
    //struct KeyIter : public T::iterator
    struct KeyIter : public std::iterator<std::input_iterator_tag,typename T::value_type>
    {
        typename T::const_iterator it;
        KeyIter(typename T::const_iterator i) : it(i) {}    
        KeyIter &operator++() {++it; return *this;}
        KeyIter operator++(int) {KeyIter t = *this; ++*this; return t;}

        typename T::key_type const *operator->() const {return &(it->first);}
        typename T::key_type const &operator*() const {return it->first;}
        friend bool operator==(KeyIter const &a, KeyIter const &b) {return a.it == b.it;}
        friend bool operator!=(KeyIter const &a, KeyIter const &b) {return a.it != b.it;}
    };
}

//-----------------------------------------------------------------------------


FeatureSourceIndexOptions::FeatureSourceIndexOptions(const Config& conf) :
_enabled      ( true ),
_embedFeatures( false )
{
    conf.getIfSet( "enabled",        _enabled );
    conf.getIfSet( "embed_features", _embedFeatures );
}

Config
FeatureSourceIndexOptions::getConfig() const
{
    Config conf("feature_indexing");
    conf.addIfSet( "enabled",        _enabled );
    conf.addIfSet( "embed_features", _embedFeatures );
    return conf;
}

//-----------------------------------------------------------------------------

#undef  LC
#define LC "[FeatureSourceIndexNode] "

FeatureSourceIndexNode::FeatureSourceIndexNode(FeatureSourceIndex* index) :
_index( index )
{
    if ( !index )
    {
        OE_WARN << LC << "INTERNAL ERROR: created a feature source index node with a NULL index.\n";
    }
}

FeatureSourceIndexNode::~FeatureSourceIndexNode()
{
    if ( _index.valid() )
    {
        // must copy and clear the original list first to dereference the RefIDPair instances.
        std::set<FeatureID> fidsToRemove;
        //fidsToRemove.insert( KeyIter<FIDMap>(_fids.begin()), KeyIter<FIDMap>(_fids.end()) );
        fidsToRemove.insert(KeyIter<FIDMap>(_fids.begin()), KeyIter<FIDMap>(_fids.end()));
        _fids.clear();

        OE_DEBUG << LC << "Removing " << fidsToRemove.size() << " fids\n";
        _index->removeFIDs( fidsToRemove.begin(), fidsToRemove.end() );
    }
}

ObjectID
FeatureSourceIndexNode::tagDrawable(osg::Drawable* drawable, Feature* feature)
{
    if ( !feature || !_index.valid() ) return OSGEARTH_OBJECTID_EMPTY;
    RefIDPair* r = _index->tagDrawable( drawable, feature );
    if ( r ) _fids[ feature->getFID() ] = r;
    return r ? r->_oid : OSGEARTH_OBJECTID_EMPTY;
}

ObjectID
FeatureSourceIndexNode::tagAllDrawables(osg::Node* node, Feature* feature)
{
    if ( !feature || !_index.valid() ) return OSGEARTH_OBJECTID_EMPTY;
    RefIDPair* r = _index->tagAllDrawables( node, feature );
    if ( r ) _fids[ feature->getFID() ] = r;
    return r ? r->_oid : OSGEARTH_OBJECTID_EMPTY;
}

ObjectID
FeatureSourceIndexNode::tagNode(osg::Node* node, Feature* feature)
{
    if ( !feature || !_index.valid() ) return OSGEARTH_OBJECTID_EMPTY;
    RefIDPair* r = _index->tagNode( node, feature );
    if ( r ) _fids[ feature->getFID() ] = r;
    return r ? r->_oid : OSGEARTH_OBJECTID_EMPTY;
}

bool
FeatureSourceIndexNode::getAllFIDs(std::vector<FeatureID>& output) const
{
    KeyIter<FIDMap> start( _fids.begin() );
    KeyIter<FIDMap> end  ( _fids.end() );
    for(KeyIter<FIDMap> i = start; i != end; ++i )
    {
        output.push_back( *i );
    }

    return true;
}

//-----------------------------------------------------------------------------

#undef  LC
#define LC "[FeatureSourceIndex] "

FeatureSourceIndex::FeatureSourceIndex(FeatureSource* featureSource, 
                                       ObjectIndex*   index,
                                       const FeatureSourceIndexOptions& options) :
_featureSource  ( featureSource ), 
_masterIndex    ( index ),
_options        ( options )
{
    _embed = 
        _options.embedFeatures() == true ||
        featureSource == 0L ||
        featureSource->supportsGetFeature() == false;
}

FeatureSourceIndex::~FeatureSourceIndex()
{
    if ( _masterIndex.valid() && !_oids.empty() )
    {
        // remove all OIDs from the master index.
        _masterIndex->remove( KeyIter<OIDMap>(_oids.begin()), KeyIter<OIDMap>(_oids.end()) );
    }

    _oids.clear();
    _fids.clear();
    _embeddedFeatures.clear();
}

RefIDPair*
FeatureSourceIndex::tagDrawable(osg::Drawable* drawable, Feature* feature)
{
    if ( !feature ) return 0L;

    Threading::ScopedMutexLock lock(_mutex);
    
    RefIDPair* p = 0L;
    FeatureID fid = feature->getFID();

    FIDMap::const_iterator f = _fids.find( fid );
    if ( f != _fids.end() )
    {
        ObjectID oid = f->second->_oid;
        _masterIndex->tagDrawable( drawable, oid );
        p = f->second.get();
    }
    else
    {
        ObjectID oid = _masterIndex->tagDrawable( drawable, this );
        p = new RefIDPair( fid, oid );
        _fids[fid] = p;
        _oids[oid] = fid;
    
        if ( _embed )
        {
            _embeddedFeatures[fid] = feature;
        }
    }

    return p;
}

RefIDPair*
FeatureSourceIndex::tagAllDrawables(osg::Node* node, Feature* feature)
{
    if ( !feature ) return 0L;

    Threading::ScopedMutexLock lock(_mutex);
    
    RefIDPair* p = 0L;
    FeatureID fid = feature->getFID();

    FIDMap::const_iterator f = _fids.find( fid );
    if ( f != _fids.end() )
    {
        ObjectID oid = f->second->_oid;
        _masterIndex->tagAllDrawables( node, oid );
        p = f->second.get();
    }
    else
    {
        ObjectID oid = _masterIndex->tagAllDrawables( node, this );
        p = new RefIDPair( fid, oid );
        _fids[fid] = p;
        _oids[oid] = fid;
    
        if ( _embed )
        {
            _embeddedFeatures[fid] = feature;
        }
    }

    return p;
}

RefIDPair*
FeatureSourceIndex::tagNode(osg::Node* node, Feature* feature)
{
    if ( !feature ) return 0L;

    Threading::ScopedMutexLock lock(_mutex);
    
    RefIDPair* p = 0L;
    FeatureID fid = feature->getFID();
    ObjectID oid;

    FIDMap::const_iterator f = _fids.find( fid );
    if ( f != _fids.end() )
    {
        oid = f->second->_oid;
        _masterIndex->tagNode( node, oid );
        p = f->second.get();
    }
    else
    {
        oid = _masterIndex->tagNode( node, this );
        p = new RefIDPair( fid, oid );
        _fids[fid] = p;
        _oids[oid] = fid;
    
        if ( _embed )
        {
            _embeddedFeatures[fid] = feature;
        }
    }

    OE_DEBUG << LC << "Tagging feature ID = " << fid << " => " << oid << " (" << feature->getString("name") << ")\n";

    return p;
}

Feature*
FeatureSourceIndex::getFeature(ObjectID oid) const
{
    Feature* feature = 0L;
    Threading::ScopedMutexLock lock(_mutex);
    OIDMap::const_iterator i = _oids.find( oid );
    if ( i != _oids.end() )
    {
        FeatureID fid = i->second;

        if ( _embed )
        {
            FeatureMap::const_iterator j = _embeddedFeatures.find( fid );
            feature = j != _embeddedFeatures.end() ? j->second.get() : 0L;
        }
        else if ( _featureSource.valid() && _featureSource->supportsGetFeature() )
        {
            feature = _featureSource->getFeature( fid );
        }
    }
    return feature;
}

3.2 拷贝并修改FindZLIB.cmake,解决无法打开输入文件“optimized.lib”

在编译osgearth-2.7.0时,会遇到以下问题

LINK : fatal error LNK1181: 无法打开输入文件“optimized.lib”

问题原因:CMake (3+) comes with a built-in FindZLIB.cmake library for locating the ZLib dependency. But it is introducing this problem. So I copied the old FindZLIB.cmake from the OSG distribution into osgEarth/CMakeModules, and the problem disappeared. (CMake3+使用其自己内置的"FindZLIB.cmake"库去寻找ZLib依赖。但是,这引起了当下这个问题。所以,我从OSG库中拷贝了"FindZLIB.cmake"放在了“/osgEarth/CMakeModules”目录下,这个问题就解决了。)

解决方案:从"OSG-3.4.1\CMakeModules"目录下拷贝一份FindZLIB.cmake放到"osgEarth2.7.0\CMakeModules"目录下,然后用notepad++打开该FindZLIB.cmake文件,定位到第13行或附近,找到下图代码,注释掉。

或者,直接拷贝创建FindZLIB.cmake并放到"osgEarth2.7.0\CMakeModules"目录下

文件:FindZLIB.cmake

# Locate zlib
# This module defines
# ZLIB_LIBRARY
# ZLIB_FOUND, if false, do not try to link to zlib 
# ZLIB_INCLUDE_DIR, where to find the headers
#
# $ZLIB_DIR is an environment variable that would
# correspond to the ./configure --prefix=$ZLIB_DIR
# used in building zlib.
#
# Created by Ulrich Hertlein. 

# prefer FindZLIB from cmake distribution
#if(EXISTS ${CMAKE_ROOT}/Modules/FindZLIB.cmake)
#  include(${CMAKE_ROOT}/Modules/FindZLIB.cmake)
#
#  if(ZLIB_FOUND)
#    return()
#  endif()
#endif()


FIND_PATH(ZLIB_INCLUDE_DIR zlib.h
    $ENV{ZLIB_DIR}/include
    $ENV{ZLIB_DIR}
    ~/Library/Frameworks
    /Library/Frameworks
    /usr/local/include
    /usr/include
    /sw/include # Fink
    /opt/local/include # DarwinPorts
    /opt/csw/include # Blastwave
    /opt/include
    /usr/freeware/include
)

FIND_LIBRARY(ZLIB_LIBRARY 
    NAMES z libz zlib
    PATHS
    $ENV{ZLIB_DIR}/lib
    $ENV{ZLIB_DIR}
    ~/Library/Frameworks
    /Library/Frameworks
    /usr/local/lib
    /usr/lib
    /sw/lib
    /opt/local/lib
    /opt/csw/lib
    /opt/lib
    /usr/freeware/lib64
)

SET(ZLIB_FOUND "NO")
IF(ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR)
    SET(ZLIB_FOUND "YES")
ENDIF(ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR)


4. 配置cmake

打开cmake-gui,将osgEarth-3.4.1中的CMakeLists.txt文件直接拖放到CMake界面

4.1 修改build路径

将“Where to build the binaries”设置为上面设置的build文件夹路径

4.2 修改 THIRD_PARTY_DIR

把THIRD_PARTY_DIR设置为osg第三方依赖库。该依赖库在编译osg-3.4.1的过程中,已经被添加到系统的环境变量中了。cmake在找依赖库时,会优先从这个路径里面找。所以,这里把THIRD_PARTY_DIR设置为编译osg时的第三方依赖库。

4.3 配置CURL依赖

curl在2.2节中被编译好了,这里直接使用。

4.4 cmake应该会自动从THIRD_PARTY_DIR寻找其他依赖并配置

5. cmake编译

依次执行Configure(直至所有cmake配置项变成白色)-->Generate-->Open Project,用VS2017打开项目。

6. VS2017编译

先生成ALL_BUILD,然后生成INSTALL

7. 安装成功测试

7.1 测试数据准备

将“osgearth-2.10\data”以及“osgearth-2.10\tests”中的文件复制到osg示例数据的目录中,我的是:F:\3rd_party\osg\Data。

7.2 将OsgEarth\bin”添加到系统环境变量Path中

7.3 在命令行窗口输入“osgearth_viewer gdal_multiple_files.earth”

如显示出地球,则说明osgEarth正常运行。

osgEarth源码编译(Win10+VS2019+OSG3.6.5+osgEarth2.10.0) 因工作需要,学习了OSG、osgEarth。 虽然OSG、osgEarth是开源软件,但我个人感觉,要从源码生成能用的软件版本还是有困难的。有时第三方库不完整、有时需要匹配各个软件配置项的版本;经常是编译出来的软件无法正常运行。 我零零散散使用了将近一个多月时间,才创建了一个能在Win10中正常运行的软件。总结一下,希望能为大家节省一些学习的时间。 1. 第三方组件下载及解压缩 下载网址: http://www.openscenegraph.org/index.php/download-secti 阅读详情

相关推荐

osgearth编译全过程

下面说一下osg-earth的完整编译过程。 需要下载的东西在这里: osg(Open Scene Graph3.4.0) osg-earth(2.7) gdal(2.0.2) curl zlib

jianingshow的博客 1万+

利用vs2017 CMake开发跨平台C++项目实战

       对于windows程序员来说,在linux上开发C++程序会非常困难,一来没用过makefile,其语法非常生涩难懂,二来vs之外的IDE,其易用性与vs相差甚远,宇宙第一IDE不是盖的。致使C++不同于其他编程语言,硬生生催生出Windows程序员和Linux程序员两个群体,直到有了CMake。        常用开源库的同学想必对CMake非常熟悉,它可以在Linux上可以自动...

青菜虫虫的专栏 3万+

osgEarth开发环境搭建(win10+osg3.6.5+osgearth3.4.0+vs2022)

本文详细记录了在Windows环境下编译osgEarth 3.4.0版本的过程。首先,作者介绍了编译环境的准备工作,包括安装Git、CMake、vcpkg和Visual Studio 2022。接着,作者描述了如何修改环境变量和vcpkg中的osg配置以适应编译需求。随后,作者指导了如何下载osgEarth源码并切换到3.4.0版本。在源码编译部分,作者使用了CMake GUI进行操作,并详细说明了如何配置和生成项目文件,以及在编译过程中可能遇到的问题及其解决方法。最后,作者强调了运行环境设置的重要性,并建

aggs1990的专栏 1406

CMake+VS2017

一、安装CMake 从官网https://cmake.org/download/下载需要的CMake版本 注:安装完需要配置环境变量: 此电脑==》属性==》高级系统设置==》高级==》环境变量==》系统变量==》Path==》编辑==》新建==》 将安装的CMake的bin路径填入: 二、创建CMake项目 1、打开CMake安装目录下的bin中的cmake-gui.e...

king_weng的博客 7920

从头编译osgearth(osgearth2.10+vs2015+osg3.6.4+gdal3.0.1+geos3.7.2+proj6.2)

致我踩过的坑! 编译前的准备: 1.widow10 2.cmake-3.15.4 3.vs2015 4.osg3.6.4 5.osg-3rdparty(第三方依赖库) 6.osgearth2.10 7.gdal3.0.1 8.proj6.2.0 9.sqlite3.30 10.geos3.7.2 第一步 编译gdal3.0.1+proj6.2.0+geos3.7...

After_April的博客 3332

VS2019 +osg3.6.5+ earth3.2+qt5.14.2+osgQt 编译教程

用vs新建工程,稍后会在写一篇博客上分享四、结语至此,所有的编译就均已完成。

king_ink的博客 1134

CMake + Visual Studio 2017

Visual Studio 2017使用CMake,有两种方式: 一种是直接用VS创建CMake项目 另一种是使用cmake-gui创建sln,再用VS打开sln: 注意:如果Configure报错,一般是VS需要安装扩展等: 解决:CMake Error :Visual Studio 15 2017 -could not find any instance of Visual Studio. - ꧁执笔小白꧂ - 博客园 两种方式的区别: 第一种方式创建的项目,当没有添加项目所需要的.

Oh~Why not! 3765

osgEarth教程(一)——编译配置(osgEarth+VS2015+win10)

版本:OSG3.4.0 OSGEarth2.8 VS2015 64位 win10 已编译版本,需要的可下载后配置环境变量: 地址:https://download.csdn.net/download/github_39611196/10932545 一、编译OSG 1、安装包准备 (1)OSG: https://github.com/o...

cchangcs 3万+

win10 + cmake3.17 + vs2017编译osgearth2.7.0遇到的坑

xmemory0(881): error C2440: “初始化”: 无法从“std::pair”转换为 to _Objty。

wzg2016的博客 732

OsgEarth开发笔记(二):Osg3.6.3+OsgEarth3.1+vs2019x64开发环境搭建(中)

上一篇编译了osg和osgCurl,本篇继续。OsgEarth的编译,是基于Osg和OsgEarth结合在一起的,先要编译Osg,然后编译OsgEarth。OsgEarth的依赖库较多,分为上、中、下三篇,然后单独有一篇如何将编译好的osgEarth集成到Qt中。

长沙红胖子 Qt・西安|省级科研团队从业背景,深耕双一流体系高精尖技术配套研发|剥离高精尖机理,沉淀高端特种行业领域 Qt 工程化落地经验|博文仅分享通用技术总结,输出公开普适工程思路。 4万+

OSG配置第三方资源库3rdparty

open scene graphy进行配置的第三方资源库

win10+VS2017+CMake3.16编译安装OpenSceneGraph3.6.4+gdal3.0.4+geos3.8.0+proj7.0.0+osgEarth2.10.1

最近要用到 osg做一些显示东西,开始学习osg的相关应用,于是开始了艰难的安装过程,经过相当多的波折,终于安装完成。有感于过程的艰辛,特把过程记录下来,以供大家参考。 1、基础包:zlib、szip 这两个包很好安装,zlib Home与szip Home是下载相应的较新或最新版本,运用CMake+VS即可完成安装。 2、tcl/tk库 这两个库在tcl官网下载相应的版本,我均下载的是8...

ltn_NLCFD的博客 1687

光伏逆变器在环测试解决方案

光伏行业是利用太阳能光辐射将其转化为可用电能的行业。近年来,为应对气候变化和能源安全等挑战,全球对清洁能源的需求不断增长。太阳能作为最具潜力和可再生的能源之一,被视为替代传统化石能源的重要选择,光伏行业因此得到了迅猛发展,并在全球范围内得到了广泛应用。许多国家和地区都将光伏技术作为关键的能源发展方向。尤其是在新兴和发展中国家,光伏发电具有巨大的增长潜力,将成为未来市场竞争的重点。随着规模化生产的推进,光伏组件的制造成本不断降低。

shiwei0813的博客 960

超级详细的osgearth2.10+vs2015+osg3.6.4+OsgQt+gdal3.0.1+geos3.7.2+proj6.2+OSGOcean

编译前的准备: 1.widow7 2.cmake-3.15.4 3.vs2015 4.osg3.6.4 5.osg-3rdparty(第三方依赖库) 6.osgearth2.10 7.gdal3.0.1 8.proj6.2.0 9.sqlite3.30 10.geos3.7.2

Jeacean的博客 7668

CH341的I2C流模式(StreamI2C)到底怎么用?从EEPROM读写到自定义设备,一篇讲清参数配置逻辑

本文详细解析了CH341的I2C流模式(StreamI2C)的使用方法,从EEPROM读写到自定义设备的参数配置逻辑。通过深入分析I2C协议基础、StreamI2C参数映射关系及典型设备配置示例,帮助开发者快速掌握StreamI2C的应用技巧,解决实际开发中的常见问题。

weixin_30932215的博客 449

CMOS的宽/长比、传输门与三态门、锁存器与触发器、简单版图、竞争与冒险

目录 1.CMOS的宽长比 2.传输门与三态门 传输门 三态门 3.锁存器与触发器 3.1RS锁存器[3] 3.2D锁存器 3.3D触发器 4.简单CMOS器件的版图 5.竞争与冒险 1.CMOS的宽长比 关于COMS原理及结构图可以参考[1]COMS原理及门电路设计. 栅在源漏方向的长度称作栅的长L,垂直方向称为栅的宽W,如图1中NMOS的版图。 图1 以MOS管...

king阿金 1万+

0基础OSG+OSGEARTH环境搭建(win10 x64+vs2022+OSG3.6.5+osgEarth3.1)(一)

本人OSGEarth新手,因为业务需要,搭建OSGEarth开发环境。感觉搭建过程比较复杂,也在网上查找各种材料及参考了很多搭建过程的文章,仍然不能顺利搭建。

wwf0527的专栏 4885

VS2013+Win10+osgEarth2.9+osg3.4.0编译

现在来记录一下这次编译结果和编译需要注意的地方,以供之后查阅和大家学习。在分享之前首先要给没有编过的同学们说不要怕编译osg,其实它并不复杂。我的编译环境是VS2013,64位系统,QT用的是5.3.0. 如果你的电脑是新安装的VS2013,建议先去microsoft官网下载MultibyteMFC library for VS2013。否则在编译过程中会出现找不到mfc****.lib的错误。一...

Scarlett_OHara的博客 4110

AMD MI355X与NVIDIA B200在GLM5.2大模型推理性能与成本对比分析

在 AI 推理硬件选型中,成本与性能的平衡一直是技术决策的核心难点。AMD 最新发布的 CDNA 4 架构 MI355X 加速卡与 NVIDIA Blackwell 架构的 B200 在 GLM5.2 这类千亿参数大模型上的表现,直接关系到企业部署私有化模型或提供推理服务的经济性。实际测试数据显示,在 32 tok/s/user 的交互性设定下,单张 MI355X 能够达到 1369 tok/s 的吞吐量,虽然略低于 B200 的 1756 tok/s,但每百万 token 成本仅为 0.30 美元,比 B

weixin_28221501的博客 295

RK3568平台(USB篇)USB Gadget 驱动

USB 设备驱动,按照设备端关联的 USB 控制器 是工作在 主模式 还是 从模式,分为 USB 设备主机侧驱动 (主模式),或者 USB 设备从机侧驱动 (从模式)。同时,工作在 主模式 的 USB 控制器,称为 USB 主机控制器 (UHC: USB Host Controller),工作在 从模式 的 USB 控制器,称为 USB 设备控制器 (UDC: USB Device Controller)。有的 USB 控制器,只能工作在 主模式 或 从模式 中的某一种;

weixin_49303682的博客 1438

osgearth2.8编译实现(VS2012 win10)

一个初学者编译osg3.4.0和osgearth2.8的过程,总结一下整个过程,相互学习。 一、前期准备 前期在网上查了好多资料和相关视频,期间换了几次编译工具,最后完成了osg3.4.0和osgearth2.8的编译。 1、软件准备 操作系统:win10 VS版本:vs2012 Qt版本:5.4.1 CMAKE版本:3.0(不建议用最新版本或者高版本,会有意想不到的问题)

langya0903的博客 1911

【Python爬虫系列】_005.浏览器开发者工具(详解)

Elements(元素)分析当前页面节点,用来辅助书写BS或者XPath这里面的数据与源代码有区别,不一定准确(避坑)Console(控制台)这个除了查看错误信息、打印调试信息(console.log())、写一些测试脚本以外,还可以当作Javascript API查看用例如我想查看console都有哪些方法和属性,我可以直接在Console中输入"console"并执行后续学js逆向的时候需要用到Sources(源代码)与在网页页面,鼠标右键——查看网页源代码 内容一致。

weixin_50296259的博客 422

基于VS2013的64位OSGEarth编译

基于VS2013的64位OSG以及OSGEarth编译 编译版本:osg3.4.0+VS2013+win10

小白博客 9578

华为数通方向HCIP-DataCom H12-831题库(多选题:121-140)

华为数通HCIP H12-831多选题

didiplus 1291

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

上一篇: win10 + vs2017 + cmake3.17编译OSG-3.4.1
下一篇: Ubuntu安装向日葵(ubuntu18.04)
wzg2016
博客等级 码龄10年 539粉丝 493原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值