会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Roderick.Huang
首页
新随笔
联系
订阅
管理
2024年4月14日
windows 使用MSVC2022编译 Qt 5.12.11
摘要: 准备 准备一下安装程序,并添加到PATH环境变量。 Perl 选择64位 Portable: Perl Portable Ruby 选择64位版本进行安装:ruby 64bit Python 安装Python jom nmake不支持并行编译,使用jom进行并行编译。 下载jom,解压并添加到PAT
阅读全文
posted @ 2024-04-14 17:35 山岚2013
阅读(277)
评论(0)
推荐(0)
2024年2月1日
boost多索引容器
摘要: 参考文章: boost多索引容器的使用介绍 multi_index_container多索引容器 代码: test_boost_multi_index_container
阅读全文
posted @ 2024-02-01 11:19 山岚2013
阅读(27)
评论(0)
推荐(0)
2024年1月22日
vscode windows CMakePresets.json
摘要: vscode在windows下使用Ninja编译配置,使用Visual Studio编译环境。来源:CMakePresets.json 参考:在 Visual Studio 中使用 CMake 预设进行配置和生成 -- 示例 文件CMakePresets.json { "version": 2, "
阅读全文
posted @ 2024-01-22 16:00 山岚2013
阅读(513)
评论(0)
推荐(1)
2023年8月4日
unique_ptr 与 shared_ptr 的 deleter
摘要: 使用std::unique_ptr<>定义(声明)一个对象的时候,需要知道这个对象的Deleter,std::unique_ptr的原型如下: template< class T, class Deleter = std::default_delete<T> > class unique_ptr;
阅读全文
posted @ 2023-08-04 11:38 山岚2013
阅读(134)
评论(0)
推荐(0)
2023年7月27日
vtkMapper 以及其方法 SetInputData SetInputConnection SetSourceConnection
摘要: `vtkMappe`及其派生类,负责把输入数据转换为图元(例如显示为点、显示为线、显示为面等)。该类存储需要渲染的数据,以及一些渲染配置。我们经常看到的`vtkActor->SetMapper(mapper)`,含义就是把负责提供图元数据的`mapper`连接到渲染引擎`actor`。 ##vtkM
阅读全文
posted @ 2023-07-27 09:21 山岚2013
阅读(613)
评论(0)
推荐(0)
2023年7月22日
VTK+OCC显示CAD模型
摘要: VTK是一款十分优秀的可视化套件,开源且功能强大,基本上可以满足有限元领域的全部可视化需求。遗憾的是,VTK不支持CAD模型(如igs、stp格式的模型)的显示。 在网上搜索后可以发现,在不花钱的情况下,想要显示和处理CAD模型,基本上都得使用OpenCasCade,即OCC。OCC有自己的可视化系
阅读全文
posted @ 2023-07-22 13:43 山岚2013
阅读(2212)
评论(0)
推荐(0)
2023年7月20日
VTK mouse event -- 捕捉鼠标动作并发送信号:vtkCommand
摘要: 头文件申明: ```C++ #pragma once #include #include #include #include #include #include class MyMouseCallback : public QObject, public vtkCommand { Q_OBJECT
阅读全文
posted @ 2023-07-20 08:01 山岚2013
阅读(646)
评论(0)
推荐(0)
2023年7月17日
OCC boolean 操作
摘要: [OpenCasCade拓扑几何的布尔运算](https://blog.csdn.net/qq_22642239/article/details/97271457)
阅读全文
posted @ 2023-07-17 23:11 山岚2013
阅读(37)
评论(0)
推荐(0)
2023年7月16日
ubuntu 22.04 编译 OSMESA & ParaView
摘要: ## 可选 更新MESA驱动 * [如何在 Ubuntu 22.04 LTS 上升级 Mesa 驱动程序](https://www.linuxmi.com/ubuntu-22-04-lts-mesa.html) ## 编译安装 OSMESA * [Compiling and Installing](
阅读全文
posted @ 2023-07-16 23:30 山岚2013
阅读(488)
评论(0)
推荐(0)
2023年7月12日
VTK 显示为 2D
摘要: ```C++ void restrict_to_2d(QVTKOpenGLNativeWidget *widget) { // Set the render window's multisampling to 0. vtkRenderWindow *render_window = widget->r
阅读全文
posted @ 2023-07-12 13:59 山岚2013
阅读(62)
评论(0)
推荐(0)
2023年1月29日
git设置多个远程仓库
摘要: 1. 添加多个远程仓库,单独push/pull 在添加的原有 origin 远程仓库之后,添加 mirror 远程仓库 git remote add mirror https://url2.com/my_repo.git 对应 .git/config [core] repositoryformatv
阅读全文
posted @ 2023-01-29 10:44 山岚2013
阅读(611)
评论(0)
推荐(0)
2023年1月2日
python 装饰器
摘要: 装饰器:本质是一个闭包 作用:在不改变原有函数调用的情况下,给函数增加新的功能 def wrapper(fn): wrapper: 装饰器, fn: 目标函数 def inner(*args, **kwargs): # 在目标函数执行之前... ret = fn(*args, **kwargs) 执
阅读全文
posted @ 2023-01-02 16:44 山岚2013
阅读(42)
评论(0)
推荐(0)
2022年12月14日
C++ 通过 syscall 获取本线程 TID
摘要: 通过 pthread_self 及 std::this_thread::getid函数获取的线程ID,跟使用top/htop命令呈现的线程ID不对应。 通过如下代码获取跟top/htop一致的TID: #include <syscall.h> pid_t gettid(void) { return
阅读全文
posted @ 2022-12-14 17:33 山岚2013
阅读(226)
评论(0)
推荐(0)
2022年12月10日
使用 TVMC 编译和优化模型
摘要: 处理流程 graph TB; A["tvmc compile: 输入 ONNX model。输出 TVM runtime tar 文件"] B["python preprocess.py: 输入 jpg 格式文件。输出:Numpy npz格式文件"] C["tvmc run: 输入:TVM runt
阅读全文
posted @ 2022-12-10 23:20 山岚2013
阅读(45)
评论(0)
推荐(0)
2022年11月28日
(GCC) GCC 结构体内存对齐规则
摘要: GCC struct 内存对齐规则 结构体起始地址需要被其中成员类型最大的大小所整除; 每个成员起始地址需要被其类型大小所整除,如int32_t类型成员内存对齐到4B; 如果成员有子结构体,则该子结构体成员起始地址要被其内部成员类型最大的所整除。如struct a里存有struct b,b 里有 c
阅读全文
posted @ 2022-11-28 15:49 山岚2013
阅读(666)
评论(0)
推荐(0)
2022年11月22日
(C++) atomic_flag的使用
摘要: 使用示例 #include <atomic> #include <iostream> #include <thread> #include <vector> int main(int argc, char** argv) { constexpr size_t kLoopNum = 10; std::
阅读全文
posted @ 2022-11-22 17:36 山岚2013
阅读(266)
评论(0)
推荐(0)
CPU体系(4):ARM Store Buffer
摘要: 本文主要翻译自 Arm Cortex-M7 Processor Technical Reference Manual r1p2 其中章节 Memory System / L1 caches / Store Buffer 。 Store Buffer Cache中的数据,在写入memory或 AXIM
阅读全文
posted @ 2022-11-22 16:14 山岚2013
阅读(1542)
评论(0)
推荐(0)
2022年11月5日
(C++ template) C++ 模板实现静态多态 -- CRTP
摘要: https://zhuanlan.zhihu.com/p/142407249
阅读全文
posted @ 2022-11-05 21:50 山岚2013
阅读(44)
评论(0)
推荐(0)
2022年10月25日
(C++) 类与 static_cast 与 dynamic_cast
摘要: static_cast static_cast相当于C语言里面的强制转换,适用于: 用于类层次结构中基类(父类)和派生类(子类)之间指针或引用的转换。进行上行转换(把派生类的指针或引用转换成基类表示)是安全的;进行下行转换(把基类指针或引用转换成派生类表示)时,由于没有动态类型检查,所以是不安全的。
阅读全文
posted @ 2022-10-25 16:51 山岚2013
阅读(91)
评论(0)
推荐(0)
2022年10月24日
C++ 一个简洁的CHECK宏
摘要: #include <iostream> #include <stdlib.h> #define CHECK2(condition, message) \ (!(condition)) ? (std::cerr << "Assertion failed: (" << #condition << "),
阅读全文
posted @ 2022-10-24 14:52 山岚2013
阅读(757)
评论(0)
推荐(0)
下一页
公告