forked from arrayfire/arrayfire
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbilateral.cpp
More file actions
44 lines (35 loc) · 1.26 KB
/
bilateral.cpp
File metadata and controls
44 lines (35 loc) · 1.26 KB
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
43
44
/*******************************************************
* Copyright (c) 2014, ArrayFire
* All rights reserved.
*
* This file is distributed under 3-clause BSD license.
* The complete license agreement can be obtained at:
* http://arrayfire.com/licenses/BSD-3-Clause
********************************************************/
#include <bilateral.hpp>
#include <Array.hpp>
#include <kernel/bilateral.hpp>
#include <platform.hpp>
#include <af/dim4.hpp>
using af::dim4;
namespace cpu {
template<typename inType, typename outType>
Array<outType> bilateral(const Array<inType> &in, const float &sSigma,
const float &cSigma) {
Array<outType> out = createEmptyArray<outType>(in.dims());
getQueue().enqueue(kernel::bilateral<outType, inType>, out, in, sSigma,
cSigma);
return out;
}
#define INSTANTIATE(inT, outT) \
template Array<outT> bilateral<inT, outT>(const Array<inT> &, \
const float &, const float &);
INSTANTIATE(double, double)
INSTANTIATE(float, float)
INSTANTIATE(char, float)
INSTANTIATE(int, float)
INSTANTIATE(uint, float)
INSTANTIATE(uchar, float)
INSTANTIATE(short, float)
INSTANTIATE(ushort, float)
} // namespace cpu