-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.h
More file actions
42 lines (36 loc) · 842 Bytes
/
main.h
File metadata and controls
42 lines (36 loc) · 842 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/// @file main.h
/// @brief main boilerplate
/// @author Jeff Perry <jeffsp@gmail.com>
/// @version 1.0
/// @date 2014-09-02
#include "fast_filter.h"
#include "utils.h"
using namespace std;
using namespace fast_filter_ops;
void process ();
template<typename T>
void print (ostream &s, const T &p, const size_t rows, const size_t cols)
{
for (size_t i = 0; i < rows; ++i)
{
for (size_t j = 0; j < cols; ++j)
if (is_integral<typename T::value_type>::value)
s << ' ' << int (p [index (i, j, cols)]);
else
s << ' ' << p [index (i, j, cols)];
s << endl;
}
}
int main (int , char **)
{
try
{
process ();
return 0;
}
catch (const std::exception &e)
{
std::cerr << e.what () << std::endl;
return -1;
}
}