intmath.hh (10295:9b9ef42122bc) intmath.hh (12334:e0ab29a34764)
1/*
2 * Copyright (c) 2001, 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;

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

28 * Authors: Nathan Binkert
29 */
30
31#ifndef __BASE_INTMATH_HH__
32#define __BASE_INTMATH_HH__
33
34#include <cassert>
35
1/*
2 * Copyright (c) 2001, 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;

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

28 * Authors: Nathan Binkert
29 */
30
31#ifndef __BASE_INTMATH_HH__
32#define __BASE_INTMATH_HH__
33
34#include <cassert>
35
36#include "base/misc.hh"
36#include "base/logging.hh"
37#include "base/types.hh"
38
39// Returns the prime number one less than n.
40int prevPrime(int n);
41
42// Determine if a number is prime
43template <class T>
44inline bool

--- 210 unchanged lines hidden ---
37#include "base/types.hh"
38
39// Returns the prime number one less than n.
40int prevPrime(int n);
41
42// Determine if a number is prime
43template <class T>
44inline bool

--- 210 unchanged lines hidden ---