forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
scaled_modified_bessel_k1.cpp
42 lines (35 loc) · 1.36 KB
/
scaled_modified_bessel_k1.cpp
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
#define TORCH_ASSERT_NO_OPERATORS
#include <ATen/native/UnaryOps.h>
#include <cmath>
#include <limits>
#include <type_traits>
#include <ATen/Config.h>
#include <ATen/Context.h>
#include <ATen/Dispatch.h>
#include <ATen/Parallel.h>
#include <ATen/cpu/vec/functional.h>
#include <ATen/cpu/vec/vec.h>
#include <ATen/cpu/vml.h>
#include <ATen/native/TensorIterator.h>
#include <ATen/native/cpu/Loops.h>
#include <ATen/native/cpu/zmath.h>
#include <ATen/OpMathType.h>
#include <c10/util/math_compat.h>
#include <c10/util/MathConstants.h>
#include <c10/core/Scalar.h>
#include <c10/util/irange.h>
namespace at {
namespace native {
inline namespace CPU_CAPABILITY {
static void scaled_modified_bessel_k1_kernel(TensorIteratorBase& iterator) {
TORCH_INTERNAL_ASSERT(iterator.ntensors() == 2);
AT_DISPATCH_FLOATING_TYPES(iterator.common_dtype(), "scaled_modified_bessel_k1_cpu", [&]() {
cpu_kernel(iterator, [](scalar_t x) {
return scaled_modified_bessel_k1_forward(x);
});
});
} // scaled_modified_bessel_k1_kernel(TensorIteratorBase& iterator)
} // namespace CPU_CAPABILITY
REGISTER_DISPATCH(special_scaled_modified_bessel_k1_stub, &CPU_CAPABILITY::scaled_modified_bessel_k1_kernel);
} // namespace native
} // namespace at