code: func (mem DevicePtr) MemoryType() (typ MemoryType, err error) {
  	var p unsafe.Pointer
  	if p, err = mem.PtrAttribute(MemoryTypeAttr); err != nil {
  		return
  	}
  	t := *(*uint64)(p)
  	typ = MemoryType(byte(t))
  	return
  }
docs: // This file lists all the convenience functions and methods, not necessarily stuff that is covered in the API
  // MemoryType returns the MemoryType of the memory