Skip to content

Commit

Permalink
[DOC] Update date information.
Browse files Browse the repository at this point in the history
  • Loading branch information
paintdream committed May 9, 2024
1 parent f3af066 commit b4ebd5f
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 27 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2014-2023 PaintDream
Copyright (c) 2014-2024 PaintDream

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion src/iris_buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This software is a C++ 11 Header-Only reimplementation of core part from project
The MIT License (MIT)
copyright (c) 2014-2023 PaintDream
copyright (c) 2014-2024 PaintDream
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion src/iris_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This software is a C++ 11 Header-Only reimplementation of core part from project
The MIT License (MIT)
Copyright (c) 2014-2023 PaintDream
Copyright (c) 2014-2024 PaintDream
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion src/iris_common.inl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This software is a C++ 11 Header-Only reimplementation of core part from project
The MIT License (MIT)
Copyright (c) 2014-2023 PaintDream
Copyright (c) 2014-2024 PaintDream
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions src/iris_coroutine.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This software is a C++ 20 Header-Only reimplementation of core part from project
The MIT License (MIT)
Copyright (c) 2014-2023 PaintDream
Copyright (c) 2014-2024 PaintDream
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -1051,7 +1051,7 @@ namespace iris {
}

~iris_listen_dispatch_t() noexcept {
assert(routine == nullptr);
IRIS_ASSERT(routine == nullptr);
}

template <typename... args_t>
Expand Down
7 changes: 3 additions & 4 deletions src/iris_dispatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This software is a C++ 11 Header-Only reimplementation of core part from project
The MIT License (MIT)
Copyright (c) 2014-2023 PaintDream
Copyright (c) 2014-2024 PaintDream
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -295,7 +295,7 @@ namespace iris {
// execute remaining tasks on destruction
while (!join<true, true>()) {}

assert(parallel_task_head.load(std::memory_order_relaxed) == nullptr);
IRIS_ASSERT(parallel_task_head.load(std::memory_order_relaxed) == nullptr);
}

// get stack warp pointer
Expand Down Expand Up @@ -706,7 +706,6 @@ namespace iris {
async_worker_t& async_worker; // host async worker
std::atomic<iris_warp_t**> thread_warp; // save the running thread warp address.
std::atomic<size_t> suspend_count; // current suspend count
std::atomic<size_t> interrupting; // is interrupting by external request?
std::atomic<size_t> queueing; // is flush request sent to async_worker? 0 : not yet, 1 : yes, 2 : is to flush right away.
std::atomic<task_t*> parallel_task_head; // linked-list for pending parallel tasks
impl::storage_t<queue_buffer_t, strand> storage; // task storage
Expand Down Expand Up @@ -1176,7 +1175,7 @@ namespace iris {
}

void queue_task(task_t* task, size_t priority = 0) {
assert(task != nullptr && task->next == nullptr);
IRIS_ASSERT(task != nullptr && task->next == nullptr);
if (!is_terminated()) {
IRIS_ASSERT(!threads.empty());
priority = std::min(priority, std::max(internal_thread_count, (size_t)1) - 1u);
Expand Down
6 changes: 3 additions & 3 deletions src/iris_lua.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This software is a C++ 17 Header-Only reimplementation of core part from project
The MIT License (MIT)
Copyright (c) 2014-2023 PaintDream
Copyright (c) 2014-2024 PaintDream
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -499,7 +499,7 @@ namespace iris {
template <typename type_t, typename meta_t, typename... args_t>
refptr_t<type_t> make_object_view(meta_t&& meta, type_t* object) {
IRIS_PROFILE_SCOPE(__FUNCTION__);
assert(object != nullptr);
IRIS_ASSERT(object != nullptr);

lua_State* L = state;
stack_guard_t guard(L);
Expand Down Expand Up @@ -913,7 +913,7 @@ namespace iris {
static return_t method_functor_adapter(iris_lua_t lua, std::remove_reference_t<args_t>&&... args) {
lua_State* L = lua.get_state();
type_t* ptr = reinterpret_cast<type_t*>(lua_touserdata(L, lua_upvalueindex(1)));
assert(ptr != nullptr);
IRIS_ASSERT(ptr != nullptr);

if constexpr (!std::is_void_v<return_t>) {
return (ptr->*method)(std::move(args)...);
Expand Down
2 changes: 1 addition & 1 deletion src/iris_system.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This software is a C++ 11 Header-Only reimplementation of core part from project
The MIT License (MIT)
Copyright (c) 2014-2023 PaintDream
Copyright (c) 2014-2024 PaintDream
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion src/iris_tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This software is a C++ 11 Header-Only reimplementation of core part from project
The MIT License (MIT)
Copyright (c) 2014-2023 PaintDream
Copyright (c) 2014-2024 PaintDream
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
10 changes: 5 additions & 5 deletions test/iris_buffer_demo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ int main(void) {
iris_union_set_join(union_set, 7u, 5u);
iris_union_set_join(union_set, 1u, 5u);

assert(iris_union_set_find(union_set, 1u) == iris_union_set_find(union_set, 7u));
assert(iris_union_set_find(union_set, 4u) != iris_union_set_find(union_set, 6u));
assert(iris_union_set_find(union_set, 2u) == iris_union_set_find(union_set, 8u));
assert(iris_union_set_find(union_set, 5u) != iris_union_set_find(union_set, 9u));
assert(iris_union_set_find(union_set, 0u) != iris_union_set_find(union_set, 3u));
IRIS_ASSERT(iris_union_set_find(union_set, 1u) == iris_union_set_find(union_set, 7u));
IRIS_ASSERT(iris_union_set_find(union_set, 4u) != iris_union_set_find(union_set, 6u));
IRIS_ASSERT(iris_union_set_find(union_set, 2u) == iris_union_set_find(union_set, 8u));
IRIS_ASSERT(iris_union_set_find(union_set, 5u) != iris_union_set_find(union_set, 9u));
IRIS_ASSERT(iris_union_set_find(union_set, 0u) != iris_union_set_find(union_set, 3u));

iris_bytes_t bytes;
iris_buffer_t<uint8_t> buffer;
Expand Down
2 changes: 1 addition & 1 deletion test/iris_dispatcher_demo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,6 @@ void update_version() {
}

worker.join();
assert(final_version == version_count);
IRIS_ASSERT(final_version == version_count);
printf("Success of update %d/%d\n", success_count.load(std::memory_order_acquire), version_count);
}
2 changes: 1 addition & 1 deletion test/iris_engine_demo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ struct engine_t {

co_await sync_event;
printf("coroutine async after event\n");
assert(warp_t::get_current_warp() != nullptr);
IRIS_ASSERT(warp_t::get_current_warp() != nullptr);

co_await iris_switch(&warp_script);
printf("coroutine async script ticks\n");
Expand Down
10 changes: 5 additions & 5 deletions test/iris_system_demo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ int main(void) {

matrix_system.for_each<entity_t, iris_component_matrix_t>([](entity_t entity, iris_component_matrix_t& matrix) {
// initialize with identity matrix
assert(matrix.values[0][0] == 1);
IRIS_ASSERT(matrix.values[0][0] == 1);
});

matrix_system.for_entity<iris_component_matrix_t>(0, [](iris_component_matrix_t& matrix) {
Expand All @@ -130,7 +130,7 @@ int main(void) {

systems.for_each_batch<iris_component_matrix_t>(4, [](size_t count, iris_queue_list_t<iris_component_matrix_t, block_allocator_t>::iterator it) {
while (count-- != 0) {
assert(it->values[3][3] == 2);
IRIS_ASSERT(it->values[3][3] == 2);
it++;
}
});
Expand All @@ -139,21 +139,21 @@ int main(void) {
systems.for_each<entity_t, uint8_t>([&counter](entity_t e, uint8_t& i) {
counter--;
});
assert(counter == 5);
IRIS_ASSERT(counter == 5);
systems.attach(other_system);

systems.for_each<float>([&counter](float& i) {
counter--;
});

assert(counter == 0);
IRIS_ASSERT(counter == 0);

iris_system_t<entity_t, block_allocator_t, uint8_t> re_system;
systems.attach(re_system);
re_system.insert(0, 1u);
systems.remove(0);
re_system.for_each<entity_t>([](entity_t entity) {
assert(false); // already removed
IRIS_ASSERT(false); // already removed
});

re_system.clear();
Expand Down

0 comments on commit b4ebd5f

Please sign in to comment.