Deleted Added
sdiff udiff text old ( 3515:98655e4fd9f1 ) new ( 3918:1f9a98d198e8 )
full compact
1/*
2 * Copyright (c) 2003-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 36 unchanged lines hidden (view full) ---

45* VectorStandardDeviation totals
46* Document Namespaces
47*/
48#ifndef __BASE_STATISTICS_HH__
49#define __BASE_STATISTICS_HH__
50
51#include <algorithm>
52#include <cassert>
53#include <cmath>
54#include <functional>
55#include <iosfwd>
56#include <string>
57#include <vector>
58
59#include "base/cprintf.hh"
60#include "base/intmath.hh"

--- 1344 unchanged lines hidden (view full) ---

1405 */
1406 void sample(Counter val, int number, const Params &params)
1407 {
1408 if (val < params.min)
1409 underflow += number;
1410 else if (val > params.max)
1411 overflow += number;
1412 else {
1413 int index = (int)floor((val - params.min) / params.bucket_size);
1414 assert(index < size(params));
1415 cvec[index] += number;
1416 }
1417
1418 if (val < min_val)
1419 min_val = val;
1420
1421 if (val > max_val)

--- 1466 unchanged lines hidden ---