--- layout: stdlib-reference --- # Ptr\\.init ## Description ## Signature
Ptr<T, Access access, AddressSpace addrSpace, L>.init<U, Access accessOther>(
    Ptr<U, AddressSpace.Generic, DefaultDataLayout> ptr)
    where L : IBufferDataLayout;

Ptr<T, Access access, AddressSpace addrSpace, L>.init(
    uint64_t val)
    where L : IBufferDataLayout;

Ptr<T, Access access, AddressSpace addrSpace, L>.init(
    int64_t val)
    where L : IBufferDataLayout;

Ptr<T, AddressSpace.Generic, DefaultDataLayout>.init(
    NativeString nativeStr)
    where T == void
    where addrSpace == AddressSpace.Device
    where L == DefaultDataLayout;

Ptr<T, AddressSpace.Generic, DefaultDataLayout>.init<T, Access access, AddressSpace addrSpace, L>(
    Ptr<T, AddressSpace.Generic, DefaultDataLayout> ptr)
    where L : IBufferDataLayout
    where T == void
    where addrSpace == AddressSpace.Device
    where L == DefaultDataLayout;

Ptr<T, AddressSpace.Generic, DefaultDataLayout>.init<T>(
    NativeRef<T> ptr)
    where T == void
    where addrSpace == AddressSpace.Device
    where L == DefaultDataLayout;

## Generic Parameters #### U #### accessOther : Access #### T #### access : Access #### addrSpace : AddressSpace #### L: [IBufferDataLayout](../../interfaces/ibufferdatalayout-017b/index.html) ## Parameters #### ptr : [Ptr](index.html)\ #### val : uint64\_t #### val : int64\_t #### nativeStr : [NativeString](../nativestring-06/index.html) #### ptr : [Ptr](index.html)\<[T](index.html#typeparam-T), AddressSpace\.Generic, [DefaultDataLayout](../defaultdatalayout-07b/index.html)\> #### ptr : NativeRef\<[T](init.html#typeparam-T)\>