[PATCH] test-suite: Fix name clash 'log2'
robert lytton
robert at xmos.com
Fri Jan 24 08:55:43 PST 2014
robertlytton added you to the CC list for the revision "test-suite: Fix name clash 'log2'".
Rename local function log2() as logTwo().
http://llvm-reviews.chandlerc.com/D2618
Files:
SingleSource/Benchmarks/CoyoteBench/fftbench.cpp
Index: SingleSource/Benchmarks/CoyoteBench/fftbench.cpp
===================================================================
--- SingleSource/Benchmarks/CoyoteBench/fftbench.cpp
+++ SingleSource/Benchmarks/CoyoteBench/fftbench.cpp
@@ -133,7 +133,7 @@
static const complex<T> PI2I;
// returns largest power of two that holds n
- static size_t log2(size_t n);
+ static size_t logTwo(size_t n);
// reverses a sequence of bits
static size_t flip_bits(size_t k, size_t bits);
@@ -401,7 +401,7 @@
// returns largest power of two that holds n
template <typename T>
-size_t polynomial<T>::log2(size_t n)
+size_t polynomial<T>::logTwo(size_t n)
{
// returns 1 if n == 0!
size_t x = 1, c = 0;
@@ -468,7 +468,7 @@
template <typename T>
polynomial< complex<T> > polynomial<T>::bit_reverse(const polynomial<T> & poly)
{
- size_t b = log2(poly.degree());
+ size_t b = logTwo(poly.degree());
polynomial< complex<T> > result(poly.degree());
@@ -482,8 +482,8 @@
template <typename T>
polynomial< complex<T> > polynomial<T>::bit_reverse(const polynomial< complex<T> > & poly)
{
- size_t b = log2(poly.degree());
-
+ size_t b = logTwo(poly.degree());
+
polynomial< complex<T> > result(poly.degree());
for (size_t n = 0; n < poly.degree(); ++n)
@@ -496,7 +496,7 @@
template <typename T>
polynomial< complex<T> > polynomial<T>::fft(const polynomial<T> & poly)
{
- size_t nl = log2(poly.degree());
+ size_t nl = logTwo(poly.degree());
size_t j, k, m, m2, s;
complex<T> wm, w, t, u;
@@ -534,7 +534,7 @@
template <typename T>
polynomial< complex<T> > polynomial<T>::inverse_fft(const polynomial< complex<T> > & poly)
{
- size_t nl = log2(poly.degree());
+ size_t nl = logTwo(poly.degree());
size_t j, k, m, m2, s;
complex<T> wm, w, t, u;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2618.1.patch
Type: text/x-patch
Size: 1875 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140124/3d9c829a/attachment.bin>
More information about the llvm-commits
mailing list