上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 19 下一页
摘要: docker 启动的时候添加 docker run --cap-add SYS_PTRACE 或者 docker run --privileged 参考: https://github.com/google/sanitizers/issues/764 阅读全文
posted @ 2021-04-22 13:39 stdpain 阅读(133) 评论(0) 推荐(0)
摘要: C++ Defer C++ 中并没有官方的defer操作,所以需要自己实现一个。 跟一个guard函数类似,在一个栈对象的析构函数中调用defer函数,`std::function` 是一个不错的选择,可以bind一个已经存在的函数,也可以使用lambda表达式,所以第一个版本defer长这样: ` 阅读全文
posted @ 2021-04-15 00:28 stdpain 阅读(1586) 评论(0) 推荐(0)
摘要: 内联 虚函数 和 CRTP 虚函数 和 内联 出于一些系统设计的原因,导致我们在编写程序的时候通常是面向抽象编程的。比方说我们设计了一个计算框架,通常是面向一个接口编程的。 class Expression { public: virtual void update(Context* context 阅读全文
posted @ 2021-03-29 00:05 stdpain 阅读(329) 评论(0) 推荐(0)
摘要: SSE && AVX 寄存器 SSE 和 AVX 每个都有16个寄存器,SSE 的有 XMM0 ~ XMM15,AVX 有 YMM0 ~ YMM15,XMM都是128 bit的,avx都是 256 bit的 SSE 有三种类型定义 _m128,__m128d,__m128i,float,double 阅读全文
posted @ 2021-03-28 18:17 stdpain 阅读(246) 评论(0) 推荐(0)
摘要: 64 位的程序通常需要链接 libuwind,但是很多时候并不想链接这个lib,因此我们需要禁用这个lib 使用 configure 的方式 ./autogen.sh /configure --prefix=$TP_INSTALL_DIR/gperftools --disable-shared -- 阅读全文
posted @ 2021-03-13 12:18 stdpain 阅读(1578) 评论(0) 推荐(0)
摘要: https://www.inf.hs-flensburg.de/lang/algorithmen/sortieren/bitonic/oddn.htm 阅读全文
posted @ 2021-03-07 23:12 stdpain 阅读(103) 评论(0) 推荐(0)
摘要: https://stackoverflow.com/questions/51235355/comparison-object-being-invocable-as-const 阅读全文
posted @ 2021-02-19 13:45 stdpain 阅读(942) 评论(0) 推荐(0)
摘要: #include <time.h> #include <chrono> #include <iostream> #include <string> int main() { time_t now = time(nullptr); //获取UTC时间 tm local_tm_now; if (loca 阅读全文
posted @ 2021-02-09 12:54 stdpain 阅读(313) 评论(0) 推荐(0)
摘要: Install: https://blog.csdn.net/yulsh/article/details/91790804 https://www.cnblogs.com/yuezhimi/p/10272738.html Command: https://www.linuxprobe.com/kvm 阅读全文
posted @ 2021-01-23 13:07 stdpain 阅读(60) 评论(0) 推荐(0)
摘要: https://easyperf.net/blog/2017/10/24/Vectorization_part1 https://15721.courses.cs.cmu.edu/spring2018/schedule.html https://gcc.gnu.org/onlinedocs/gcc/ 阅读全文
posted @ 2021-01-14 14:01 stdpain 阅读(241) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 19 下一页