Posts-on-cplusplus

tutorial

thispointer.com
cppreference.com

Concurrency

thread | mutex | condition variable | atomic
C++11 Concurrency Tutorial
uchicago-cs/cmsc12300-Concurrency in C++11
packaged_task and thread
packaged_task<> Example and Tutorial : from function, lambda function and function object.

构造函数调用构造函数

1
2
3
4
5
6
7
8
9
Tensor(const std::initializer_list<int> &shape){
std::vector<unsigned long> *vec = new std::vector<unsigned long>();
for(auto i : shape){
int v = i;
vec->push_back(v);
}
// Tensor(new TensorShape(vec)); // 此写法似乎有误
_shape = new TensorShape(vec);
}

Forward(Incomplete) Declarations

Using Incomplete (Forward) Declarations