Skip to content

Commit 06a70d5

Browse files
committed
copyright statements
1 parent 11e9ffe commit 06a70d5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+1122
-221
lines changed

src/core/allocator.hpp

+18
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
//
2+
// Copyright (C) 2014 Aleksandar Zlateski <[email protected]>
3+
// ----------------------------------------------------------
4+
//
5+
// This program is free software: you can redistribute it and/or modify
6+
// it under the terms of the GNU General Public License as published by
7+
// the Free Software Foundation, either version 3 of the License, or
8+
// (at your option) any later version.
9+
//
10+
// This program is distributed in the hope that it will be useful,
11+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
// GNU General Public License for more details.
14+
//
15+
// You should have received a copy of the GNU General Public License
16+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
//
18+
119
#ifndef ZNN_ALLOCATOR_HPP_INCLUDED
220
#define ZNN_ALLOCATOR_HPP_INCLUDED
321

src/core/bf_conv.hpp

+22-16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
//
2+
// Copyright (C) 2014 Aleksandar Zlateski <[email protected]>
3+
// ----------------------------------------------------------
4+
//
5+
// This program is free software: you can redistribute it and/or modify
6+
// it under the terms of the GNU General Public License as published by
7+
// the Free Software Foundation, either version 3 of the License, or
8+
// (at your option) any later version.
9+
//
10+
// This program is distributed in the hope that it will be useful,
11+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
// GNU General Public License for more details.
14+
//
15+
// You should have received a copy of the GNU General Public License
16+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
//
18+
119
#ifndef ZNN_BF_CONV_HPP_INCLUDED
220
#define ZNN_BF_CONV_HPP_INCLUDED
321

@@ -186,9 +204,9 @@ inline double3d_ptr bf_conv_constant(const double3d_ptr& ap,
186204
inline double bf_conv_flipped_constant(const double3d_ptr& ap,
187205
const double3d_ptr& bp)
188206
{
189-
ZI_ASSERT(volume_size(ap)==volume_size(bp));
207+
ASSERT_SAME_SIZE(ap,bp);
190208

191-
std::size_t n = volume_elements(ap);
209+
std::size_t n = ap->num_elements();
192210

193211
double r = 0;
194212

@@ -215,7 +233,7 @@ inline double3d_ptr bf_conv_inverse_constant(const double3d_ptr& ap,
215233
double3d_ptr rp = volume_pool.get_double3d(ax,ay,az);
216234
double3d& r = *rp;
217235

218-
std::size_t n = volume_elements(ap);
236+
std::size_t n = ap->num_elements();
219237

220238
for ( std::size_t i = 0; i < n; ++i )
221239
{
@@ -253,8 +271,7 @@ inline double3d_ptr bf_conv_sparse(const double3d_ptr& ap,
253271
for ( std::size_t z = 0; z < rz; ++z )
254272
{
255273
r[x][y][z] = 0;
256-
257-
// [02/28/2014 kisuklee]
274+
258275
for ( std::size_t dx = x, wx = bx-1; dx < bx + x; dx += s[0], wx -= s[0] )
259276
for ( std::size_t dy = y, wy = by-1; dy < by + y; dy += s[1], wy -= s[1] )
260277
for ( std::size_t dz = z, wz = bz-1; dz < bz + z; dz += s[2], wz -= s[2] )
@@ -263,17 +280,6 @@ inline double3d_ptr bf_conv_sparse(const double3d_ptr& ap,
263280
a[dx][dy][dz] *
264281
b[wx][wy][wz];
265282
}
266-
//
267-
// original code was buggy
268-
//
269-
// for ( std::size_t dx = x, wx = (bx-1)*s[0]; dx < bx + x; dx += s[0], wx -= s[0] )
270-
// for ( std::size_t dy = y, wy = (by-1)*s[1]; dy < by + y; dy += s[1], wy -= s[1] )
271-
// for ( std::size_t dz = z, wz = (bz-1)*s[2]; dz < bz + z; dz += s[2], wz -= s[2] )
272-
// {
273-
// r[x][y][z] +=
274-
// a[dx][dy][dz] *
275-
// b[wx][wy][wz];
276-
// }
277283
}
278284

279285
return rp;

src/core/fftw.hpp

+18
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
//
2+
// Copyright (C) 2014 Aleksandar Zlateski <[email protected]>
3+
// ----------------------------------------------------------
4+
//
5+
// This program is free software: you can redistribute it and/or modify
6+
// it under the terms of the GNU General Public License as published by
7+
// the Free Software Foundation, either version 3 of the License, or
8+
// (at your option) any later version.
9+
//
10+
// This program is distributed in the hope that it will be useful,
11+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
// GNU General Public License for more details.
14+
//
15+
// You should have received a copy of the GNU General Public License
16+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
//
18+
119
#ifndef ZNN_FFTW_HPP_INCLUDED
220
#define ZNN_FFTW_HPP_INCLUDED
321

src/core/fftw_plans.hpp

+18
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
//
2+
// Copyright (C) 2014 Aleksandar Zlateski <[email protected]>
3+
// ----------------------------------------------------------
4+
//
5+
// This program is free software: you can redistribute it and/or modify
6+
// it under the terms of the GNU General Public License as published by
7+
// the Free Software Foundation, either version 3 of the License, or
8+
// (at your option) any later version.
9+
//
10+
// This program is distributed in the hope that it will be useful,
11+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
// GNU General Public License for more details.
14+
//
15+
// You should have received a copy of the GNU General Public License
16+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
//
18+
119
#ifndef ZNN_FFTW_PLANS_HPP_INCLUDED
220
#define ZNN_FFTW_PLANS_HPP_INCLUDED
321

src/core/generic_filter.hpp

+18
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
//
2+
// Copyright (C) 2014 Aleksandar Zlateski <[email protected]>
3+
// ----------------------------------------------------------
4+
//
5+
// This program is free software: you can redistribute it and/or modify
6+
// it under the terms of the GNU General Public License as published by
7+
// the Free Software Foundation, either version 3 of the License, or
8+
// (at your option) any later version.
9+
//
10+
// This program is distributed in the hope that it will be useful,
11+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
// GNU General Public License for more details.
14+
//
15+
// You should have received a copy of the GNU General Public License
16+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
//
18+
119
#ifndef ZNN_GENERIC_FILTER_HPP_INCLUDED
220
#define ZNN_GENERIC_FILTER_HPP_INCLUDED
321

src/core/measure.hpp

+18
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
//
2+
// Copyright (C) 2014 Aleksandar Zlateski <[email protected]>
3+
// ----------------------------------------------------------
4+
//
5+
// This program is free software: you can redistribute it and/or modify
6+
// it under the terms of the GNU General Public License as published by
7+
// the Free Software Foundation, either version 3 of the License, or
8+
// (at your option) any later version.
9+
//
10+
// This program is distributed in the hope that it will be useful,
11+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
// GNU General Public License for more details.
14+
//
15+
// You should have received a copy of the GNU General Public License
16+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
//
18+
119
#ifndef ZNN_PROFILER_HPP_INCLUDED
220
#define ZNN_PROFILER_HPP_INCLUDED
321

src/core/network.hpp

+20-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
//
2+
// Copyright (C) 2014 Aleksandar Zlateski <[email protected]>
3+
// Kisuk Lee <[email protected]>
4+
// ----------------------------------------------------------
5+
//
6+
// This program is free software: you can redistribute it and/or modify
7+
// it under the terms of the GNU General Public License as published by
8+
// the Free Software Foundation, either version 3 of the License, or
9+
// (at your option) any later version.
10+
//
11+
// This program is distributed in the hope that it will be useful,
12+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
// GNU General Public License for more details.
15+
//
16+
// You should have received a copy of the GNU General Public License
17+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
//
19+
120
#ifndef ZNN_NETWORK_HPP_INCLUDED
221
#define ZNN_NETWORK_HPP_INCLUDED
322

@@ -23,7 +42,6 @@
2342
#include <cstdlib>
2443
#include <iomanip>
2544

26-
2745
namespace zi {
2846
namespace znn {
2947

@@ -228,9 +246,8 @@ class network
228246
std::cout << "Will run " << run_times << " iterations per test." << std::endl;
229247

230248
double best = run_n_times(run_times, sample, scanning);
231-
std::cout << "Best so far (all ffts): " << best << std::endl;
249+
std::cout << "Best so far (all ffts): " << best << std::endl;
232250

233-
// [02/11/2014 kisuklee] TODO
234251
// temporary solution for layer-wise fft opimization
235252
// should be refactored
236253
FOR_EACH( it, net_->node_groups_ )

src/core/node.hpp

+19
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
//
2+
// Copyright (C) 2014 Aleksandar Zlateski <[email protected]>
3+
// Kisuk Lee <[email protected]>
4+
// ----------------------------------------------------------
5+
//
6+
// This program is free software: you can redistribute it and/or modify
7+
// it under the terms of the GNU General Public License as published by
8+
// the Free Software Foundation, either version 3 of the License, or
9+
// (at your option) any later version.
10+
//
11+
// This program is distributed in the hope that it will be useful,
12+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
// GNU General Public License for more details.
15+
//
16+
// You should have received a copy of the GNU General Public License
17+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
//
19+
120
#ifndef ZNN_NODE_HPP_INCLUDED
221
#define ZNN_NODE_HPP_INCLUDED
322

src/core/types.hpp

+18-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
//
2+
// Copyright (C) 2014 Aleksandar Zlateski <[email protected]>
3+
// ----------------------------------------------------------
4+
//
5+
// This program is free software: you can redistribute it and/or modify
6+
// it under the terms of the GNU General Public License as published by
7+
// the Free Software Foundation, either version 3 of the License, or
8+
// (at your option) any later version.
9+
//
10+
// This program is distributed in the hope that it will be useful,
11+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
// GNU General Public License for more details.
14+
//
15+
// You should have received a copy of the GNU General Public License
16+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
//
18+
119
#ifndef ZNN_TYPES_HPP_INCLUDED
220
#define ZNN_TYPES_HPP_INCLUDED
321

@@ -19,9 +37,6 @@ typedef boost::multi_array<std::complex<double>, 3, allocator< std::complex<doub
1937
typedef boost::shared_ptr<double3d> double3d_ptr ;
2038
typedef boost::shared_ptr<complex3d> complex3d_ptr;
2139

22-
// [07/08/2013 kisuklee]
23-
// For mask
24-
// [zlateski]
2540
// std::allocator is more efficient for basic data structs that will not
2641
// require fft operations
2742

src/core/utils.hpp

+19
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
//
2+
// Copyright (C) 2014 Aleksandar Zlateski <[email protected]>
3+
// Kisuk Lee <[email protected]>
4+
// ----------------------------------------------------------
5+
//
6+
// This program is free software: you can redistribute it and/or modify
7+
// it under the terms of the GNU General Public License as published by
8+
// the Free Software Foundation, either version 3 of the License, or
9+
// (at your option) any later version.
10+
//
11+
// This program is distributed in the hope that it will be useful,
12+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
// GNU General Public License for more details.
15+
//
16+
// You should have received a copy of the GNU General Public License
17+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
//
19+
120
#ifndef ZNN_UTILS_HPP_INCLUDED
221
#define ZNN_UTILS_HPP_INCLUDED
322

src/core/volume_pool.hpp

+18
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
//
2+
// Copyright (C) 2014 Aleksandar Zlateski <[email protected]>
3+
// ----------------------------------------------------------
4+
//
5+
// This program is free software: you can redistribute it and/or modify
6+
// it under the terms of the GNU General Public License as published by
7+
// the Free Software Foundation, either version 3 of the License, or
8+
// (at your option) any later version.
9+
//
10+
// This program is distributed in the hope that it will be useful,
11+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
// GNU General Public License for more details.
14+
//
15+
// You should have received a copy of the GNU General Public License
16+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
//
18+
119
#ifndef ZNN_VOLUME_POOL_HPP_INCLUDED
220
#define ZNN_VOLUME_POOL_HPP_INCLUDED
321

0 commit comments

Comments
 (0)