06 2017 档案

C/C++中产生随机数(rand,srand用法)
摘要:C/C++中产生随机数(rand,srand用法) http://zhangjunhd.blog.51cto.com/113473/197020 计算机的随机数都是由伪随机数,即是由小M多项式序列生成的,其中产生每个小序列都有一个初始值,即随机种子。(注意: 小M多项式序列的周期是65535,即每次 阅读全文

posted @ 2017-06-29 14:52 defe_feath 阅读(357) 评论(0) 推荐(0)

std::thread “terminate called without an active exception”
摘要:最近在使用std::thread的时候,遇到这样一个问题: 如果不使用调用t.join()就会遇到 "terminate called whithout an active exception",但是在使用boost:thread的时候却没遇到这个问题,google了一下,找到答案: The tro 阅读全文

posted @ 2017-06-28 13:27 defe_feath 阅读(463) 评论(0) 推荐(0)

conditon_variable(条件变量)用于线程间同步
摘要:conditon_variable(条件变量)用于线程间同步 condition_variable有5个函数,函数名及对应的功能如下: wait阻塞自己,等待唤醒 wait_for阻塞自己,等待唤醒,最多等待一段时间 wait_until阻塞自己,等待唤醒,最多等待到某个时间点 notify_one 阅读全文

posted @ 2017-06-14 13:11 defe_feath 阅读(219) 评论(0) 推荐(0)

C++标准库之mutex
摘要:C++标准库之mutex 互斥锁有可重入、不可重入之分。C++标准库中用mutex表示不可重入的互斥锁,用recursive_mutex表示可重入的互斥锁。为这两个类增加根据时间来阻塞线程的能力,就又有了两个新的互斥锁:timed_mutex(不可重入的锁)、recursive_timed_mute 阅读全文

posted @ 2017-06-14 13:08 defe_feath 阅读(424) 评论(0) 推荐(0)

c++标准库之thread
摘要:c++标准库之thread class thread是对线程的抽象。以下分别介绍thread是如何表示线程的大部分特征的。 执行体 线程的执行体由一个可执行(callable)对象来表示。这个执行体可以在thread创建的时候指定。thread创建完成后线程即启动执行。 template<class 阅读全文

posted @ 2017-06-14 10:31 defe_feath 阅读(341) 评论(0) 推荐(0)

Eigen::Map
摘要:http://cherishlc.iteye.com/blog/2116800 Map类 是 矩阵库Eigen中用来将内存数据 映射为 任意形状的矩阵的类。 阅读全文

posted @ 2017-06-07 11:24 defe_feath 阅读(202) 评论(0) 推荐(0)

C++ 多线程
摘要:BoostThread: 【C++多线程编程】Boost线程库 http://blog.csdn.net/yockie/article/details/26985187 【C++并发实战1】 http://blog.csdn.net/yockie/article/details/30148405 【 阅读全文

posted @ 2017-06-05 20:08 defe_feath 阅读(137) 评论(0) 推荐(0)