摘要: 1. 亿图图示 绘制流程图等 2. 截图工具 Snipaste 阅读全文
posted @ 2023-04-19 15:01 cofludy 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 1. 生成程序的call graph 2. 火焰图 阅读全文
posted @ 2023-04-19 14:06 cofludy 阅读(21) 评论(0) 推荐(0) 编辑
摘要: Task 用于指定某一段程序,并放置在任务池中,由进程池中的空闲的进程执行该任务。 例如(https://ppc.cs.aalto.fi/ch3/more/)。 注意以下例子中,C(7)是和C(1)在同一个核中执行的,说明,进入了处于 team_barrier的核才有机会调用omp task 运行函 阅读全文
posted @ 2022-11-03 19:46 cofludy 阅读(475) 评论(0) 推荐(0) 编辑
摘要: 1. 函数定义如下,其中fn,cpyfn为函数名。 1 void 2 GOMP_task (void (*fn) (void *), void *data, void (*cpyfn) (void *, void *), 3 long arg_size, long arg_align, bool i 阅读全文
posted @ 2022-11-03 17:17 cofludy 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 1 #include <stdio.h> 2 #include <math.h> 3 #include <pthread.h> 4 #include<stdio.h> 5 #include<iostream> 6 #include<stdlib.h> 7 #include<time.h> 8 9 # 阅读全文
posted @ 2022-11-03 10:00 cofludy 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 这俩指令都会根据当前系统使用的微架构对程序进行优化,优点是针对计算密集型任务会有较大程度的优化,但是可移植性不好,因为是针对特定架构的优化 一。确定选项 使用如下命令可查询编译器自己查询到的微系统结构 gcc -mcpu=native -Q --help=target 点击查看代码 The foll 阅读全文
posted @ 2022-08-15 18:53 cofludy 阅读(840) 评论(0) 推荐(0) 编辑
摘要: 脚本程序在linux系统中运行时分为两种环境,一种是在当前shell(称为父shell)开启一个子shell环境,此shell脚本就在这个子shell环境中执行。shell脚本执行完后子shell环境随即关闭,然后又回到父shell中。 第二种是当前shell中执行的,当我们需要利用脚本设置当前环境 阅读全文
posted @ 2022-08-13 09:56 cofludy 阅读(1025) 评论(0) 推荐(0) 编辑
摘要: 挖个坑,有空写一下利用perf 进行程序性能统计并绘制火焰图进行展示的方法。 1. perf 安装 1 git clone --depth 1 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 2 cd linux/ 阅读全文
posted @ 2022-08-11 20:17 cofludy 阅读(23) 评论(0) 推荐(0) 编辑
摘要: 1. 将图片转换成eps格式 写作中,png可以被pdflatex编译,但是Texify只能直接编译eps和pdf格式的图片。因而需要进行图片格式的转换。 ctex自带的转换工具bmeps可以进行图片格式转换。操作流程如下: a. (win7系统)在相应的文件夹内,Shift + 鼠标右键,打开cm 阅读全文
posted @ 2022-02-20 12:26 cofludy 阅读(93) 评论(0) 推荐(0) 编辑
摘要: 这篇博文对智能指针总结的很到位,感谢Neohope: (Neohope's Blog) http://www.neohope.org/2018/08/15/%E6%B5%85%E8%B0%88cpp%E6%99%BA%E8%83%BD%E6%8C%87%E9%92%88/ 智能指针其实并不是指针,而 阅读全文
posted @ 2021-04-19 21:09 cofludy 阅读(937) 评论(0) 推荐(1) 编辑