Skip to content
Open
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
d20d386
Updated doc comments above DRef, poolget, poolset
jlim5634 Apr 11, 2026
08a9f30
updated index.md and make.jl for MemPool
jlim5634 Apr 11, 2026
3a0c9c8
updated PR and fixed Julian's comments
jlim5634 Apr 12, 2026
4f7f172
Remove assets folder from PR
jlim5634 Apr 12, 2026
3beb1c5
Update docs/src/index.md
jlim5634 Apr 24, 2026
70f8b26
Update docs/src/index.md
jlim5634 Apr 24, 2026
5ca4a83
Update docs/src/index.md
jlim5634 Apr 24, 2026
7b35686
Update docs/src/index.md
jlim5634 Apr 24, 2026
0b04553
Update docs/src/index.md
jlim5634 Apr 24, 2026
c410bbc
Update docs/make.jl
jlim5634 Apr 24, 2026
dc40742
Update docs/make.jl
jlim5634 Apr 24, 2026
1543138
Update docs/src/index.md
jlim5634 Apr 24, 2026
7693c35
Update docs/src/index.md
jlim5634 Apr 24, 2026
f47fcee
Update docs/src/index.md
jlim5634 Apr 24, 2026
c6924fc
Update docs/src/index.md
jlim5634 Apr 24, 2026
f309923
Update docs/src/index.md
jlim5634 Apr 24, 2026
41ef1fa
Update docs/src/index.md
jlim5634 Apr 24, 2026
64cc98b
Update docs/src/index.md
jlim5634 Apr 24, 2026
69d23fe
Update docs/src/index.md
jlim5634 Apr 24, 2026
0605254
Update docs/src/index.md
jlim5634 Apr 24, 2026
aeed2d8
Update docs/src/index.md
jlim5634 Apr 24, 2026
8613fb9
Update docs/src/index.md
jlim5634 Apr 24, 2026
477211f
Update docs/src/index.md
jlim5634 Apr 24, 2026
9998c3a
Update index.md
jlim5634 Apr 24, 2026
dbc6e45
Fixed changes that were copied from Dagger
jlim5634 Apr 24, 2026
99fd558
Merge branch 'setup-mempool-docs' of https://github.com/jlim5634/MemP…
jlim5634 Apr 24, 2026
6b61b0b
Update docs/make.jl
jlim5634 Apr 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/datastore.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ else
import Distributed: ClusterSerializer, worker_id_from_socket
end

"""
DRef(owner::Int, id::Int, size::UInt)

A Distributed Reference (DRef) which acts as a handle to store data in MemPool.
It tracks which worker 'owner' holds the data and a unique 'id' assigned to the data
Comment thread
jpsamaroo marked this conversation as resolved.
Outdated
"""
mutable struct DRef
owner::Int
id::Int
Expand Down Expand Up @@ -451,6 +457,12 @@ function ensure_memory_reserved(size::Integer=0; max_sweeps::Integer=MEM_RESERVE
end
end

"""
poolset(x, [pid]; kwargs...) -> DRef

Stores the value 'x' into the memory pool on worker 'pid' (defaults to myid())
and returns a 'DRef' handle
Comment thread
jpsamaroo marked this conversation as resolved.
Outdated
"""
function poolset(@nospecialize(x), pid=myid(); size=approx_size(x),
retain=false, restore=false,
device=GLOBAL_DEVICE[], leaf_device=initial_leaf_device(device),
Expand Down Expand Up @@ -523,6 +535,12 @@ function forwardkeyerror(f)
end
end

"""
poolget(ref::Dref)
Comment thread
jpsamaroo marked this conversation as resolved.
Outdated

Retrieves the data value referenced by 'ref'. If the data is remote or
on disk, MemPool handles the retrieval automatically
Comment thread
jpsamaroo marked this conversation as resolved.
Outdated
"""
function poolget(ref::DRef)
DEBUG_REFCOUNTING[] && _enqueue_work(Core.print, "?? (", ref.owner, ", ", ref.id, ") at ", myid(), "\n")
return access_ref(identity, ref)
Expand Down
Loading