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 __INTMATH_HH__ 32#define __INTMATH_HH__ 33 34#include <assert.h> 35 |
36#include "base/types.hh" |
37 38// Returns the prime number one less than n. 39int prevPrime(int n); 40 41// Determine if a number is prime 42template <class T> 43inline bool 44isPrime(T n) --- 188 unchanged lines hidden --- |