Skip to content

Commit

Permalink
Untangled input type overloads for functions to get default type cate…
Browse files Browse the repository at this point in the history
…gory for queue/device
  • Loading branch information
oleksandr-pavlyk committed May 16, 2022
1 parent 2c3eea7 commit ea08c0e
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions dpctl/tensor/libtensor/source/tensor_py.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1946,28 +1946,34 @@ PYBIND11_MODULE(_tensor_impl, m)
py::arg("fill_value"), py::arg("dst"), py::arg("sycl_queue"),
py::arg("depends") = py::list());

m.def("default_device_fp_type", [](sycl::queue q) {
m.def("default_device_fp_type", [](sycl::queue q) -> std::string {
return get_default_device_fp_type(q.get_device());
});
m.def("default_device_fp_type",
[](sycl::device dev) { return get_default_device_fp_type(dev); });
m.def("default_device_fp_type_device", [](sycl::device dev) -> std::string {
return get_default_device_fp_type(dev);
});

m.def("default_device_int_type", [](sycl::queue q) {
m.def("default_device_int_type", [](sycl::queue q) -> std::string {
return get_default_device_int_type(q.get_device());
});
m.def("default_device_int_type",
[](sycl::device dev) { return get_default_device_int_type(dev); });
m.def("default_device_int_type_device",
[](sycl::device dev) -> std::string {
return get_default_device_int_type(dev);
});

m.def("default_device_bool_type", [](sycl::queue q) {
m.def("default_device_bool_type", [](sycl::queue q) -> std::string {
return get_default_device_bool_type(q.get_device());
});
m.def("default_device_bool_type",
[](sycl::device dev) { return get_default_device_bool_type(dev); });
m.def("default_device_bool_type_device",
[](sycl::device dev) -> std::string {
return get_default_device_bool_type(dev);
});

m.def("default_device_complex_type", [](sycl::queue q) {
m.def("default_device_complex_type", [](sycl::queue q) -> std::string {
return get_default_device_complex_type(q.get_device());
});
m.def("default_device_complex_type", [](sycl::device dev) {
return get_default_device_complex_type(dev);
});
m.def("default_device_complex_type_device",
[](sycl::device dev) -> std::string {
return get_default_device_complex_type(dev);
});
}

0 comments on commit ea08c0e

Please sign in to comment.