Skip to content

Commit b6d129f

Browse files
committed
Revert include removal of <pybind11/complex.h> from full_ctor.cpp
- FullContigFactory is instantiated for all types including complex types - full_contig_impl<dstTy> uses py::cast<dstTy>: dstTy fill_v = py::cast<dstTy>(py_value); - When dstTy is std::complex<float> or std::complex<double>, pybind11 needs to know how to convert a Python object to that C++ type - <pybind11/complex.h> registers the type caster for std::complex<T>, enabling py::cast<std::complex<T>>() to work
1 parent 3ca9cf6 commit b6d129f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

dpctl_ext/tensor/libtensor/source/full_ctor.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
#include <sycl/sycl.hpp>
4242

4343
#include "dpnp4pybind11.hpp"
44+
#include <pybind11/complex.h> // py::cast<std::complex<T>>
4445
#include <pybind11/pybind11.h>
4546

4647
#include "kernels/constructors.hpp"

0 commit comments

Comments
 (0)