Commit 5c01929a authored by Daniel Povey's avatar Daniel Povey
Browse files

Fixing various minor cosmetic issues; adding some scripts for this in misc/maintenance/.

parent dc20fb65
......@@ -60,6 +60,10 @@
/tools/env.sh
# /src/
/src/doc/table/
/src/doc/tools.dox
/src/htdocs/
/src/html.tar.gz
/src/kaldi.mk
/src/kaldi.mk.tmp
/src/kaldi.mk.bak
......
#!/usr/bin/env bash
# run this from the top level of the repo, as
# misc/maintenance/check_usage_messages.sh
set -e
cd src
echo "Any errors reported below must be fixed manually."
grep 'Usage:' *bin/*.cc | \
perl -ane '@A = split; $path =$A[0]; $A[0] =~ s|.+/(.+).cc:|$1|; if ($A[0] ne $A[2]) { print "$path: $A[0] ne $A[2]\n"; } '
#!/bin/bash
# makes sure the line See ../../COPYING for clarification regarding multiple
# authors appears in the apache headers in the source, and that source files
# have their Apache headers. Including this mainly for documentation, as I
# doubt the issue will occur much in future.
# run this from the top level of the repo, as
# misc/maintenance/fix_apache_headers.sh
set -e
cd src
rm -rf tmp
for x in */*.{h,cc,dox}; do
if [ $x != "util/basic-filebuf.h" ]; then
if ! grep 'COPYING for clarification' $x >/dev/null; then
echo Fixing $x;
if ! grep "Apache License" $x >/dev/null; then
echo "$0: warning: file $x may not have an Apache license header"
else
cp $x tmp; cat tmp | perl -ape ' if (m/Licensed under the Apache License/) {
print "// See ../../COPYING for clarification regarding multiple authors\n";
print "//\n";} ' > $x;
fi
fi
fi
done
#!/usr/bin/env bash
# To run this, cd to the top level of the repo and type
# misc/maintenance/fix_include_guards.sh
set -e
cd src
rm -rf tmp
for x in */*.h ; do
name=`echo $x | tr '[a-z]/.-' '[A-Z]___' `
m=KALDI_${name}_
n=`grep ifndef $x | awk '{print $2}' | head -n 1`
if [ "$m" != "$n" ]; then
echo "$m != $n";
if [ ! -z "$n" ]; then
cp $x tmp; sed s/$n/$m/ <tmp >$x;
else
echo "Something wrong for file $x, maybe no include guard."
fi
fi
done
......@@ -32,8 +32,7 @@ int main(int argc, char *argv[]) {
"Copy Gaussian indices for pruning, possibly making the\n"
"lists shorter (e.g. the --n=10 limits to the 10 best indices\n"
"See also gmm-gselect, fgmm-gselect\n"
"Usage: \n"
" copy-gselect [options] <gselect-rspecifier> <gselect-wspecifier>\n";
"Usage: copy-gselect [options] <gselect-rspecifier> <gselect-wspecifier>\n";
ParseOptions po(usage);
int32 num_gselect = 0;
......
// cudamatrix/cu-common.cc
// Copyright 2013 Karel Vesely
// See ../../COPYING for clarification regarding multiple authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
// WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
// MERCHANTABLITY OR NON-INFRINGEMENT.
// See the Apache 2 License for the specific language governing permissions and
// limitations under the License.
#ifndef KALDI_CUDAMATRIX_COMMON_H_
#define KALDI_CUDAMATRIX_COMMON_H_
......
// cudamatrix/cu-sp-matrix.cc
// Copyright 2013 Karel Vesely
// 2014-2015 Johns Hopkins University (author: Daniel Povey)
// See ../../COPYING for clarification regarding multiple authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
// WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
// MERCHANTABLITY OR NON-INFRINGEMENT.
// See the Apache 2 License for the specific language governing permissions and
// limitations under the License.
#if HAVE_CUDA == 1
#include <cuda_runtime_api.h>
#include <cublas.h>
......
// cudamatrix/cu-sp-matrix.h
// Copyright 2009-2013 Karel Vesely
// 2014 Johns Hopkins University (author: Daniel Povey)
// See ../../COPYING for clarification regarding multiple authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
// WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
// MERCHANTABLITY OR NON-INFRINGEMENT.
// See the Apache 2 License for the specific language governing permissions and
// limitations under the License.
#ifndef KALDI_CUDAMATRIX_CU_SP_MATRIX_H_
#define KALDI_CUDAMATRIX_CU_SP_MATRIX_H_
......
// cudamatrix/cuda-test.cc
// cudamatrix/cu-test.cc
// Copyright 2013 Karel Vesely
// 2014 LINSE/UFSC; Augusto Henrique Hentz
// 2013-2015 Johns Hopkins University (author: Daniel Povey)
// See ../../COPYING for clarification regarding multiple authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
// WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
// MERCHANTABLITY OR NON-INFRINGEMENT.
// See the Apache 2 License for the specific language governing permissions and
// limitations under the License.
#include <iostream>
#include <vector>
#include <cstdlib>
......
// cudamatrix/cu-tp-matrix.cc
// Copyright 2009-2013 Karel Vesely
// 2014-2015 Johns Hopkins University (author: Daniel Povey)
// See ../../COPYING for clarification regarding multiple authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
// WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
// MERCHANTABLITY OR NON-INFRINGEMENT.
// See the Apache 2 License for the specific language governing permissions and
// limitations under the License.
#if HAVE_CUDA==1
#include <cuda_runtime_api.h>
#include <cublas.h>
......
// cudamatrix/cu-vector.cc
// Copyright 2012-2013 Karel Vesely
// 2012-2014 Johns Hopkins University (author: Daniel Povey)
// See ../../COPYING for clarification regarding multiple authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
// WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
// MERCHANTABLITY OR NON-INFRINGEMENT.
// See the Apache 2 License for the specific language governing permissions and
// limitations under the License.
#if HAVE_CUDA == 1
#include <cuda_runtime_api.h>
#include <cublas.h>
......
......@@ -6,6 +6,8 @@
// Daniel Povey, Korbinian Riedhammer
// Xin Lei
// See ../../COPYING for clarification regarding multiple authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
......
......@@ -6,6 +6,8 @@
// Daniel Povey, Korbinian Riedhammer
// Xin Lei
// See ../../COPYING for clarification regarding multiple authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
......
......@@ -6,6 +6,8 @@
// Daniel Povey, Korbinian Riedhammer
// Xin Lei
// See ../../COPYING for clarification regarding multiple authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
......
......@@ -5,6 +5,8 @@
// 2014 Yanqing Sun, Junjie Wang
// 2014 Johns Hopkins University (author: Daniel Povey)
// See ../../COPYING for clarification regarding multiple authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
......
......@@ -5,6 +5,8 @@
// 2014 Yanqing Sun, Junjie Wang
// 2014 Johns Hopkins University (author: Daniel Povey)
// See ../../COPYING for clarification regarding multiple authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
......
......@@ -5,6 +5,8 @@
// 2014 Yanqing Sun, Junjie Wang
// 2014 Johns Hopkins University (author: Daniel Povey)
// See ../../COPYING for clarification regarding multiple authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
......
......@@ -2,6 +2,8 @@
// Copyright 2015 Johns Hopkins University (author: Daniel Povey)
// See ../../COPYING for clarification regarding multiple authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
......
......@@ -2,6 +2,8 @@
// Copyright 2015 Johns Hopkins University (author: Daniel Povey)
// See ../../COPYING for clarification regarding multiple authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
......
......@@ -2,6 +2,8 @@
// Copyright 2015 Johns Hopkins University (author: Daniel Povey)
// See ../../COPYING for clarification regarding multiple authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment