Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Abdelwahab HEBA
kaldi_2015
Commits
5c01929a
Commit
5c01929a
authored
Aug 01, 2015
by
Daniel Povey
Browse files
Fixing various minor cosmetic issues; adding some scripts for this in misc/maintenance/.
parent
dc20fb65
Changes
51
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
206 additions
and
3 deletions
+206
-3
.gitignore
.gitignore
+4
-0
misc/maintenance/check_usage_messages.sh
misc/maintenance/check_usage_messages.sh
+13
-0
misc/maintenance/fix_apache_headers.sh
misc/maintenance/fix_apache_headers.sh
+27
-0
misc/maintenance/fix_include_guards.sh
misc/maintenance/fix_include_guards.sh
+25
-0
src/bin/copy-gselect.cc
src/bin/copy-gselect.cc
+1
-2
src/cudamatrix/cu-common.cc
src/cudamatrix/cu-common.cc
+19
-0
src/cudamatrix/cu-sp-matrix.cc
src/cudamatrix/cu-sp-matrix.cc
+20
-0
src/cudamatrix/cu-sp-matrix.h
src/cudamatrix/cu-sp-matrix.h
+20
-0
src/cudamatrix/cu-test.cc
src/cudamatrix/cu-test.cc
+19
-1
src/cudamatrix/cu-tp-matrix.cc
src/cudamatrix/cu-tp-matrix.cc
+20
-0
src/cudamatrix/cu-vector.cc
src/cudamatrix/cu-vector.cc
+20
-0
src/feat/pitch-functions-test.cc
src/feat/pitch-functions-test.cc
+2
-0
src/feat/pitch-functions.cc
src/feat/pitch-functions.cc
+2
-0
src/feat/pitch-functions.h
src/feat/pitch-functions.h
+2
-0
src/feat/resample-test.cc
src/feat/resample-test.cc
+2
-0
src/feat/resample.cc
src/feat/resample.cc
+2
-0
src/feat/resample.h
src/feat/resample.h
+2
-0
src/feat/sinusoid-detection-test.cc
src/feat/sinusoid-detection-test.cc
+2
-0
src/feat/sinusoid-detection.cc
src/feat/sinusoid-detection.cc
+2
-0
src/feat/sinusoid-detection.h
src/feat/sinusoid-detection.h
+2
-0
No files found.
.gitignore
View file @
5c01929a
...
...
@@ -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
...
...
misc/maintenance/check_usage_messages.sh
0 → 100755
View file @
5c01929a
#!/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"; } '
misc/maintenance/fix_apache_headers.sh
0 → 100755
View file @
5c01929a
#!/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
misc/maintenance/fix_include_guards.sh
0 → 100755
View file @
5c01929a
#!/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
src/bin/copy-gselect.cc
View file @
5c01929a
...
...
@@ -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
;
...
...
src/cudamatrix/cu-common.cc
View file @
5c01929a
// 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_
...
...
src/cudamatrix/cu-sp-matrix.cc
View file @
5c01929a
// 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>
...
...
src/cudamatrix/cu-sp-matrix.h
View file @
5c01929a
// 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_
...
...
src/cudamatrix/cu-test.cc
View file @
5c01929a
// 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>
...
...
src/cudamatrix/cu-tp-matrix.cc
View file @
5c01929a
// 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>
...
...
src/cudamatrix/cu-vector.cc
View file @
5c01929a
// 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>
...
...
src/feat/pitch-functions-test.cc
View file @
5c01929a
...
...
@@ -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
...
...
src/feat/pitch-functions.cc
View file @
5c01929a
...
...
@@ -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
...
...
src/feat/pitch-functions.h
View file @
5c01929a
...
...
@@ -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
...
...
src/feat/resample-test.cc
View file @
5c01929a
...
...
@@ -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
...
...
src/feat/resample.cc
View file @
5c01929a
...
...
@@ -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
...
...
src/feat/resample.h
View file @
5c01929a
...
...
@@ -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
...
...
src/feat/sinusoid-detection-test.cc
View file @
5c01929a
...
...
@@ -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
...
...
src/feat/sinusoid-detection.cc
View file @
5c01929a
...
...
@@ -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
...
...
src/feat/sinusoid-detection.h
View file @
5c01929a
...
...
@@ -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
...
...
Prev
1
2
3
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment