[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/hexujun/CaffeOnACL/master/src/caffe/common.cpp [Back]  [Original]

#include 
#include 
#include 
#include 
#include 
#include 

#include "caffe/common.hpp"
#include "caffe/util/rng.hpp"
#ifdef USE_ACL
#include "arm_compute/runtime/CL/CLScheduler.h"
using namespace arm_compute;
#endif

namespace caffe {

// Make sure each thread can have different values.
static boost::thread_specific_ptr thread_instance_;

Caffe& Caffe::Get() {
  if (!thread_instance_.get()) {
    thread_instance_.reset(new Caffe());
  }
  return *(thread_instance_.get());
}

// random seeding
int64_t cluster_seedgen(void) {
  int64_t s, seed, pid;
  FILE* f = fopen("/dev/urandom", "rb");
  if (f && fread(&seed, 1, sizeof(seed), f) == sizeof(seed)) {
    fclose(f);
    return seed;
  }

  LOG(INFO) 

Web Proxy Viewer  |  New URL  |  Original Page