commit
973ef24eca
@ -11,6 +11,7 @@
|
||||
// under-represented).
|
||||
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -2,9 +2,10 @@
|
||||
#ifndef LOGHISTOGRAMSAMPLER_H
|
||||
#define LOGHISTOGRAMSAMPLER_H
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
#include <math.h>
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "Operation.h"
|
||||
@ -53,6 +54,7 @@ public:
|
||||
double minimum() {
|
||||
for (size_t i = 0; i < bins.size(); i++)
|
||||
if (bins[i] > 0) return pow(_POW, (double) i + 0.5);
|
||||
DIE("Not implemented");
|
||||
}
|
||||
|
||||
double get_nth(double nth) {
|
||||
|
@ -1,5 +1,6 @@
|
||||
#!/usr/bin/python
|
||||
import os
|
||||
import sys
|
||||
|
||||
env = Environment(ENV = os.environ)
|
||||
|
||||
@ -7,7 +8,10 @@ env['HAVE_POSIX_BARRIER'] = True
|
||||
|
||||
env.Append(CPPPATH = ['/usr/local/include', '/opt/local/include'])
|
||||
env.Append(LIBPATH = ['/opt/local/lib'])
|
||||
env.Append(CCFLAGS = '-std=c++0x -D_GNU_SOURCE') # -D__STDC_FORMAT_MACROS')
|
||||
env.Append(CCFLAGS = '-std=c++0x -D_GNU_SOURCE') # -D__STDC_FORMAT_MACROS')
|
||||
if sys.platform == 'darwin':
|
||||
env['CC'] = 'clang'
|
||||
env['CXX'] = 'clang++'
|
||||
|
||||
conf = env.Configure(config_h = "config.h")
|
||||
conf.Define("__STDC_FORMAT_MACROS")
|
||||
|
@ -511,7 +511,11 @@ void go(const vector<string>& servers, options_t& options,
|
||||
if (options.threads > 1) {
|
||||
pthread_t pt[options.threads];
|
||||
struct thread_data td[options.threads];
|
||||
#ifdef __clang__
|
||||
vector<string>* ts = static_cast<vector<string>*>(alloca(sizeof(vector<string>) * options.threads));
|
||||
#else
|
||||
vector<string> ts[options.threads];
|
||||
#endif
|
||||
|
||||
for (int t = 0; t < options.threads; t++) {
|
||||
td[t].options = &options;
|
||||
|
Loading…
Reference in New Issue
Block a user