示例#1
0
文件: common.cpp 项目: gnina/caffe
Caffe& Caffe::Get() {
  if (!thread_instance_.get()) {
    thread_instance_.reset(new Caffe());
  }
  return *(thread_instance_.get());
}
示例#2
0
init &init::initialize() {
  if (!p_instance.get())
    p_instance.reset(new init);
  return *p_instance;
}
示例#3
0
int howManyTilesWillBeDiscovered(int radious, int3 pos, crint3 dir)
{
	return howManyTilesWillBeDiscovered(pos + dir, radious, cb.get());
}
示例#4
0
Dragon& Dragon::Get(){
	if (!thread_instance.get()) thread_instance.reset(new Dragon());
	return *(thread_instance.get());
}
coroutine_t coroutine_create(coroutine_entry_point_t function, void *data){
	if (!stack.get())
		stack.reset(new stack_t);
	return new coroutine_wrapper(function, data);
}
示例#6
0
 long long getJSTimeVirtualThreadSkew(){
     if(jsTime_virtual_thread_skew.get()){
         return *(jsTime_virtual_thread_skew.get());
     }
     else return 0;
 }