Skip to content

Commit 049b523

Browse files
Added missing include statements
1 parent 6d71e46 commit 049b523

File tree

7 files changed

+47
-2
lines changed

7 files changed

+47
-2
lines changed

dpctl/tensor/libtensor/include/kernels/elementwise_functions/abs.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#pragma once
22
#include <CL/sycl.hpp>
3+
#include <cmath>
4+
#include <cstddef>
5+
#include <cstdint>
6+
#include <type_traits>
37

48
#include "kernels/elementwise_functions/common.hpp"
59

dpctl/tensor/libtensor/include/kernels/elementwise_functions/add.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#pragma once
22
#include <CL/sycl.hpp>
3+
#include <cstddef>
34
#include <cstdint>
5+
#include <type_traits>
46

57
#include "utils/offset_utils.hpp"
68
#include "utils/type_dispatch.hpp"

dpctl/tensor/libtensor/include/kernels/elementwise_functions/common.hpp

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,33 @@
1+
//=== common.hpp - -----------------------------------*-C++-*--/===//
2+
//= Implementation of tensor elementwise operation kernels ------===//
3+
//
4+
// Data Parallel Control (dpctl)
5+
//
6+
// Copyright 2020-2022 Intel Corporation
7+
//
8+
// Licensed under the Apache License, Version 2.0 (the "License");
9+
// you may not use this file except in compliance with the License.
10+
// You may obtain a copy of the License at
11+
//
12+
// http://www.apache.org/licenses/LICENSE-2.0
13+
//
14+
// Unless required by applicable law or agreed to in writing, software
15+
// distributed under the License is distributed on an "AS IS" BASIS,
16+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
// See the License for the specific language governing permissions and
18+
// limitations under the License.
19+
//
20+
//===----------------------------------------------------------------------===//
21+
///
22+
/// \file
23+
/// This file defines kernels for elementwise operations over tensor .
24+
//===----------------------------------------------------------------------===//
25+
126
#pragma once
227
#include <CL/sycl.hpp>
28+
#include <cstddef>
29+
#include <cstdint>
30+
#include <pybind11/pybind11.h>
331

432
namespace dpctl
533
{
@@ -216,8 +244,8 @@ struct UnaryStridedFunctor
216244
resT *const &out = res_;
217245

218246
auto offsets_ = inp_out_indexer_(wid.get(0));
219-
const ssize_t &inp_offset = offsets_.get_first_offset();
220-
const ssize_t &out_offset = offsets_.get_second_offset();
247+
const py::ssize_t &inp_offset = offsets_.get_first_offset();
248+
const py::ssize_t &out_offset = offsets_.get_second_offset();
221249

222250
UnaryOpT op{};
223251

dpctl/tensor/libtensor/include/kernels/elementwise_functions/cos.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#pragma once
22
#include <CL/sycl.hpp>
3+
#include <cmath>
4+
#include <cstddef>
35
#include <cstdint>
6+
#include <type_traits>
47

58
#include "kernels/elementwise_functions/common.hpp"
69

dpctl/tensor/libtensor/include/kernels/elementwise_functions/isfinite.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#pragma once
22
#include <CL/sycl.hpp>
3+
#include <cmath>
4+
#include <cstddef>
35
#include <cstdint>
6+
#include <type_traits>
47

58
#include "utils/offset_utils.hpp"
69
#include "utils/type_dispatch.hpp"

dpctl/tensor/libtensor/include/kernels/elementwise_functions/isinf.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#pragma once
22
#include <CL/sycl.hpp>
3+
#include <cmath>
4+
#include <cstddef>
35
#include <cstdint>
6+
#include <type_traits>
47

58
#include "utils/offset_utils.hpp"
69
#include "utils/type_dispatch.hpp"

dpctl/tensor/libtensor/include/kernels/elementwise_functions/isnan.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#pragma once
22
#include <CL/sycl.hpp>
3+
#include <cstddef>
34
#include <cstdint>
5+
#include <type_traits>
46

57
#include "utils/offset_utils.hpp"
68
#include "utils/type_dispatch.hpp"

0 commit comments

Comments
 (0)