[beast: 20/31] BSE: simplify fft generation make output
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 20/31] BSE: simplify fft generation make output
- Date: Mon, 22 Jun 2015 14:39:50 +0000 (UTC)
commit 75baafabc57394c266528c7b3cbd4bcd8de25164
Author: Tim Janik <timj gnu org>
Date: Fri Jun 12 18:54:48 2015 +0200
BSE: simplify fft generation make output
bse/Makefile.am | 3 ++-
bse/gsl-fftconf.sh | 8 ++++----
bse/gsl-fftgen.pl | 19 ++++++++++++++-----
3 files changed, 20 insertions(+), 10 deletions(-)
---
diff --git a/bse/Makefile.am b/bse/Makefile.am
index be46ac5..363a24d 100644
--- a/bse/Makefile.am
+++ b/bse/Makefile.am
@@ -172,7 +172,8 @@ endif
# gslfft.cc
GENERATED += gslfft.cc
$(srcdir)/gslfft.cc: @PERLRULE@ $(srcdir)/gsl-fftgen.pl $(srcdir)/gsl-fftconf.sh
- $(srcdir)/gsl-fftconf.sh '$(PERL) $(srcdir)/gsl-fftgen.pl' \"gslfft.hh\" >$@
+ $(AM_V_GEN)
+ $(Q) $(srcdir)/gsl-fftconf.sh '$(PERL) $(srcdir)/gsl-fftgen.pl $(if $(findstring 1, $(V)) ,,
--no-verbose)' \"gslfft.hh\" >$@
# bsegentypes.h
GENERATED_EXTRA_DIST += bsegentypes.h
$(libbse_la_OBJECTS): bsegentypes.h
diff --git a/bse/gsl-fftconf.sh b/bse/gsl-fftconf.sh
index ee73f1a..d982d23 100755
--- a/bse/gsl-fftconf.sh
+++ b/bse/gsl-fftconf.sh
@@ -17,7 +17,7 @@ $MKFFT $OPTIONS 0
#
for dir in --analysis --synthesis --synthesis-scale ; do
DOPT="$OPTIONS --skip-macros $dir"
- echo "Generating FFT functions: $dir" >&2
+ #echo "Generating FFT functions: $dir" >&2
$MKFFT $DOPT 2 F # standalone fft2
$MKFFT $DOPT 4 S F # reusable fft4
$MKFFT $DOPT 4 F X # standalone fft4
@@ -48,7 +48,7 @@ done
#
# generic variable length implementation
#
-echo "Generating generic FFT function for sizes >8192" >&2
+#echo "Generating generic FFT function for sizes >8192" >&2
cat <<__EOF
@@ -205,7 +205,7 @@ __EOF
#
# public complex fft frontends
#
-echo "Generating public complex FFT frontends" >&2
+#echo "Generating public complex FFT frontends" >&2
cat <<__EOF
void
gsl_power2_fftac (const unsigned int n_values,
@@ -293,7 +293,7 @@ __EOF
#
# public real fft frontends
#
-echo "Generating public real FFT frontends" >&2
+#echo "Generating public real FFT frontends" >&2
cat <<__EOF
void
gsl_power2_fftar (const unsigned int n_values,
diff --git a/bse/gsl-fftgen.pl b/bse/gsl-fftgen.pl
index 7c48b62..264bffa 100755
--- a/bse/gsl-fftgen.pl
+++ b/bse/gsl-fftgen.pl
@@ -22,6 +22,7 @@ my $negate_sign = 1;
my $func_name = "analysis";
my $scale = 0;
my $Wtest = 0;
+my $verbose = 1;
#
# parse options
@@ -40,6 +41,8 @@ while ($_ = $ARGV[0], defined $_ && /^-/) {
elsif (/^--split-at$/) { $min_split = shift }
elsif (/^--min-compress$/) { $min_compress = shift }
elsif (/^--single-stage$/) { $single_stage = shift }
+ elsif (/^--verbose$/) { $verbose = 1 }
+ elsif (/^--no-verbose$/) { $verbose = 0 }
}
# parse arguments
@@ -818,8 +821,10 @@ print " */\n";
my $fft_size = $max_fft_size;
my $skip2 = uc ($arguments[1]) eq 'S';
- printf STDERR "FFT-%-5u: ", $fft_size;
-
+ if ($verbose) {
+ printf STDERR "FFT-%-5u: ", $fft_size;
+ }
+
printf "static void\n";
printf("gsl_power2_fft%u%s%s (const %s *X, %s *Y)\n{\n",
$fft_size, $func_name,
@@ -828,17 +833,21 @@ print " */\n";
printf "%sregister uint butterfly, block, offset;\n", $indent;
printf "%sregister %s Wre, Wim;\n\n", $indent, $tmp_ieee_type, $tmp_ieee_type;
printf "%sbutterfly = block = offset = 0, Wre = Wim = 0.0; /* silence compiler */\n", $indent;
-
+
my $seen_rule = 0;
for (my $i = 1; $i < @arguments && 1 << $i <= $fft_size; $i++) {
my $stage = uc ($arguments[$i]);
- printf STDERR "%u-%s ", 1 << $i, $stage;
+ if ($verbose) {
+ printf STDERR "%u-%s ", 1 << $i, $stage;
+ }
die "X follows non Skip" if ($stage eq "X" && $seen_rule);
gen_stage ($fft_size, 1 << $i, $stage);
$seen_rule |= (1 << $i) > 2 && !($stage eq "S");
}
printf "}\n";
- printf STDERR "\n";
+ if ($verbose) {
+ printf STDERR "\n";
+ }
}
print "\n/*\n";
print " * Generated data ends here\n";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]