Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

- Adds command buffers support for deferred structural operations (#670).
- Adds the possibility to specify that a query column is read-only (#677).
- Adds `DiskVector` and `DiskStructArray` to use the disk for components in very large simulations (#656).
- Adds `GPUVector{:CPU}` and `GPUStructArray{:CPU}` to use a GPU storage on devices
which do not have a GPU (#701).
- Adds the `boxed` keyword argument to the world constructor, which cuts the compilation cost of Ark, at the price of some slowdown in performance.
Expand Down
4 changes: 0 additions & 4 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ authors = ["Martin Lange <martin_lange_@gmx.net>", "Adriano Meligrana <adriano.m
[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
FieldViews = "ff5a1669-b1f2-423e-bbd7-b7fa0f7e0224"
FileWatching = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee"
FunctionWrappers = "069b7b12-0de2-55c6-9aab-29f3d0a68a2e"
Mmap = "a63ad114-7e13-5084-954f-fe012c677804"
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
Preferences = "21216c6a-2e73-6563-6e65-726566657250"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Expand Down Expand Up @@ -37,10 +35,8 @@ Adapt = "4"
AMDGPU = "2"
CUDA = "5, 6"
FieldViews = "0.3.2"
FileWatching = "1"
FunctionWrappers = "1"
Metal = "1"
Mmap = "1"
Mooncake = "0.4, 0.5"
oneAPI = "2"
OpenCL = "0.10"
Expand Down
2 changes: 0 additions & 2 deletions docs/src/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ set_relations!
```@docs
Storage
StructArray
DiskVector
DiskStructArray
GPUVector
GPUStructArray
```
Expand Down
19 changes: 1 addition & 18 deletions docs/src/manual/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,23 +140,6 @@ For these columns, Ark offers storage types for both CPU anf GPU computing by de
- ≈10-20% runtime overhead for component operations and entity creation.
- Slower component access with [get_components](@ref get_components(::World, ::Entity, ::Tuple)) and [set_components!](@ref set_components!(::World, ::Entity, ::Tuple)).

#### Disk-Backed Storages

- **[DiskVector](@ref) storage** stores components in temporary memory-mapped files on disk.
It can be useful for large component columns that cannot be backed by ordinary
Julia heap arrays. [DiskVector](@ref) is working storage, not persistent world serialization:
files are managed by Ark and removed automatically when the storage is garbage-collected.
[DiskVector](@ref) storage has some limitations:
- Only allowed for isbits component types.
- Not allowed for zero-size component types, like label components.

- **[DiskStructArray](@ref) storage** stores components in an SoA data structure like
[StructArray](@ref), with each field vector backed by a [DiskVector](@ref).
It combines the field-vector access of [StructArray](@ref) storage in [queries](@ref Queries)
with the out-of-core storage of [DiskVector](@ref).
The limitations of both [StructArray](@ref) and [DiskVector](@ref) storage apply,
with the isbits and nonzero-size requirements holding for each field of the component.

### GPU Storages

#### Unified Memory Storages
Expand All @@ -174,7 +157,7 @@ The storage mode can be selected per component type by using the [Storage](@ref)
world = World(
Position => Storage{Vector},
Velocity => Storage{StructArray},
Health => Storage{DiskVector},
Health,
)
# output
Expand Down
12 changes: 1 addition & 11 deletions src/Ark.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,12 @@ module Ark

using Adapt
using FieldViews
using FileWatching
using Mmap
using Preferences
using StaticArrays
using FunctionWrappers: FunctionWrapper
using Random

const THREAD_SAFE_LOCK = @load_preference("THREAD_SAFE_LOCK", default = "true")
const TMP_ARK_DIR = @load_preference("TMP_ARK_DIR", default = joinpath(@__DIR__, "tmp_ark"))

isdefined(@__MODULE__, :Memory) || const Memory = Vector # Compat for Julia < 1.11

Expand All @@ -22,8 +19,6 @@ include("collections.jl")
include("structarray.jl")
include("gpu_vector.jl")
include("gpu_structarray.jl")
include("disk_vector.jl")
include("disk_structarray.jl")
include("structarray_interface.jl")
include("fieldsview.jl")
include("entity.jl")
Expand Down Expand Up @@ -53,11 +48,6 @@ include("unchecked.jl")
include("command_buffer.jl")
!_is_testing() && include("precompile.jl")

function __init__()
_sweep_stale_ark_sessions!()
return nothing
end

#include("docs.jl") # doctest setup

export World
Expand Down Expand Up @@ -96,6 +86,6 @@ export SetComponentsCommand, SetRelationsCommand

export Relation

export Storage, StructArray, GPUStructArray, GPUVector, DiskVector, DiskStructArray
export Storage, StructArray, GPUStructArray, GPUVector

end
4 changes: 2 additions & 2 deletions src/abstract.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ struct Relation{T} end
Storage{T}
Marks component types for using `T` as a [storage](@ref component-storages) in the
world constructor. Built-in storages include `Vector`, `StructArray`, `DiskVector`,
`DiskStructArray`, `GPUVector` and `GPUStructArray`.
world constructor. Built-in storages include `Vector`, `StructArray`, `GPUVector`
and `GPUStructArray`.
If, during world construction, the storage mode is not specified, it defaults to `Storage{Vector}`.
Expand Down
86 changes: 0 additions & 86 deletions src/disk_structarray.jl

This file was deleted.

Loading
Loading