Example #1
0
NDMaskPtr NDMask::DeepClone(const DeviceDescriptor& device) const
{
    NDMaskPtr newMask = MakeSharedObject<NDMask>(this->Shape(), device);
    newMask->CopyFrom(*this);

    return newMask;
}
Example #2
0
    NDMaskPtr NDMask::DeepClone() const
    {
        NDMaskPtr newMask = MakeSharedObject<NDMask>(this->Shape(), this->Device());
        newMask->CopyFrom(*this);

        return newMask;
    }
Example #3
0
    NDMaskPtr NDMask::DeepClone() const
    {
        NDMaskPtr newMask = new NDMask(this->Shape(), this->Device());
        newMask->CopyFrom(*this);

        return NDMaskPtr(newMask, [](ReferenceCount* ptr) { delete ptr; });
    }