parallel101 / course

高性能并行编程与优化 - 课件

Home Page:https://space.bilibili.com/263032155

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

报错:no suitable user-defined conversion from "CudaAllocator<int>" to "CudaAllocator<std::_Container_proxy>" exists

anzisheng opened this issue · comments

在08课程04_sugar\01下面生成 visual studio 2022 项目之后,运行报错如下:
“no suitable user-defined conversion from "CudaAllocator" to "CudaAllocatorstd::_Container_proxy" exists”,请问老师如何修改?

    template <class U> // cihou shabi wendous
    constexpr CudaAllocator(CudaAllocator<U> const &other) noexcept {
    }

    constexpr bool operator==(CudaAllocator<T> const &other) const {
        return this == &other;
    }

@archibate 小彭老师,我试验了一下,好像没有效果,仍然保一样的错。