1 #pragma once
2 
3 #include <absl/types/optional.h>
4 
5 #include "chainerx/array.h"
6 #include "chainerx/axes.h"
7 
8 namespace chainerx {
9 
10 Array Sum(const Array& a, const OptionalAxes& axis = absl::nullopt, bool keepdims = false);
11 
12 // Returns the LogSumExp (LSE) of x, reduced along the specified axes.
13 // If no axes are specified, all axes will be reduced.
14 Array LogSumExp(const Array& x, const OptionalAxes& axis = absl::nullopt, bool keepdims = false);
15 
16 // Returns the logarithm of the softmax of x along the specified axes.
17 // If no axes are specified, the softmax is applied on the second axis.
18 Array LogSoftmax(const Array& x, const OptionalAxes& axis = absl::nullopt);
19 
20 Array Softmax(const Array& x, const OptionalAxes& axis = absl::nullopt);
21 
22 Array Cumsum(const Array& a, absl::optional<int8_t> axis = absl::nullopt);
23 
24 Array Nansum(const Array& a, const OptionalAxes& axis = absl::nullopt, bool keepdims = false);
25 
26 }  // namespace chainerx
27