摘要: [来源](https://harryqu1229.github.io/2022/06/12/%E7%AE%97%E6%B3%95%E7%BB%88%E6%9E%81%E6%8C%87%E5%8D%97/#%E5%BD%92%E5%B9%B6%E6%8E%92%E5%BA%8F) ### 排序算法 # 阅读全文
posted @ 2023-08-18 17:40 DaoDao777999 阅读(6) 评论(0) 推荐(0) 编辑
摘要: ## 基本的模板运用 [本节内容来源](https://www.bilibili.com/video/BV1yo4y1E73a) ### 例1 普通模板,做类型判断然后进行分支选择 >定义一个模板函数,接收类型为int则返回1,否则执行`substr` ```cpp template auto fu 阅读全文
posted @ 2023-07-12 20:44 DaoDao777999 阅读(16) 评论(0) 推荐(0) 编辑
摘要: ## 系统调用 ### `open`函数 >文件打开函数 函数原型: `int open(const char *pathname, int flags);` `int open(const char *pathname, int flags, mode_t mode)` 返回值为一个文件描述符 参 阅读全文
posted @ 2023-07-10 16:03 DaoDao777999 阅读(10) 评论(0) 推荐(0) 编辑
摘要: [TOC] ## 概念 #### 阻塞和非阻塞 $\bf{ 网络 \rm{IO} 阶段一:}\\ 数据准备 \begin{cases} 阻塞:\quad调用 \rm{IO} 方法线程进入阻塞状态 \quad \\ \\非阻塞:\quad不会改变线程状态,通过返回值判断(需要将sockfd设置为非阻塞 阅读全文
posted @ 2023-06-09 11:42 DaoDao777999 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 内容来源:这个UP主课讲的很好小彭老师cmake课程 自己写代码使用方法 推荐使用这样的目录结构 include目录下要套一层目录是为了在使用时避免同名头文件冲突 源码组织格式 项目模块名称 模块名称/include/模块名称/头文件.h 模块名称/src/源文件.cpp 模块CMakeLists. 阅读全文
posted @ 2023-04-29 22:23 DaoDao777999 阅读(72) 评论(0) 推荐(0) 编辑
摘要: C++与CUDA 内存管理 封装 利用标准库容器实现对GPU的内存管理 #include <iostream> #include <cuda_runtime.h> #include <vector> #include <cstddef> template<class T> struct CUDA_A 阅读全文
posted @ 2022-12-03 19:09 DaoDao777999 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 问题 Qt部分版本存在不支持jpg,JPEG等图像格式的问题 qDebug()<<QImageWriter::supportedImageFormats(); 这行代码可以查看所支持的图像格式,我的是这样 可以看到支持的图片格式较少 解决方案 通过QApplication::addLibraryPa 阅读全文
posted @ 2022-11-15 20:56 DaoDao777999 阅读(288) 评论(0) 推荐(0) 编辑
摘要: C++链接MySQL库 库安装目录 CMakeList cmake_minimum_required(VERSION 3.22) project(MySQLConnectionPool) include_directories(/usr/include/mysql) #安装库路径 set(CMAKE 阅读全文
posted @ 2022-11-15 20:48 DaoDao777999 阅读(72) 评论(0) 推荐(0) 编辑
摘要: CLion进行Qt开发时如何配置相关的资源文件 阅读全文
posted @ 2022-11-12 20:24 DaoDao777999 阅读(1244) 评论(1) 推荐(2) 编辑
摘要: 一、配置并使用 环境:Windows10 + CLion + VS2019 cuda的安装,并行的话只需要安装cuda,cuDNN就不必了 编译器设置,windows下建议使用MSVC,因为是官方支持的,记得架构一定要设置amd64 GPU版本架构查询网址 CmakeList.txt编写 cmake 阅读全文
posted @ 2022-11-10 18:16 DaoDao777999 阅读(390) 评论(0) 推荐(0) 编辑