File: pow2.c

package info (click to toggle)
fftw3 3.3.8-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 28,428 kB
  • sloc: ansic: 259,592; ml: 5,474; sh: 4,442; perl: 1,648; makefile: 1,156; fortran: 110
file content (6 lines) | stat: -rw-r--r-- 111 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
#include "libbench2/bench.h"

int power_of_two(int n)
{
     return (((n) > 0) && (((n) & ((n) - 1)) == 0));
}