diff src/fftw-3.3.5/libbench2/pow2.c @ 42:2cd0e3b3e1fd

Current fftw source
author Chris Cannam
date Tue, 18 Oct 2016 13:40:26 +0100
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/fftw-3.3.5/libbench2/pow2.c	Tue Oct 18 13:40:26 2016 +0100
@@ -0,0 +1,6 @@
+#include "bench.h"
+
+int power_of_two(int n)
+{
+     return (((n) > 0) && (((n) & ((n) - 1)) == 0));
+}