BluFedora Job System v1.0.0
This is a C++ job system library for use in game engines.
job_init_token.hpp
Go to the documentation of this file.
1/******************************************************************************/
11/******************************************************************************/
12#ifndef JOB_INITALIZATION_TOKEN_HPP
13#define JOB_INITALIZATION_TOKEN_HPP
14
15namespace Job
16{
17 struct JobSystemMemoryRequirements;
18 struct InitializationToken;
19
20 InitializationToken Initialize(const JobSystemMemoryRequirements& memory_requirements, void* const memory) noexcept;
21
23 {
24 unsigned int num_workers_created;
25
26 private:
29 {
30 }
31
32 friend InitializationToken Initialize(const JobSystemMemoryRequirements& memory_requirements, void* const memory) noexcept;
33 };
34} // namespace Job
35
36#endif // JOB_INITALIZATION_TOKEN_HPP
37
38/******************************************************************************/
39/*
40 MIT License
41
42 Copyright (c) 2023-2024 Shareef Abdoul-Raheem
43
44 Permission is hereby granted, free of charge, to any person obtaining a copy
45 of this software and associated documentation files (the "Software"), to deal
46 in the Software without restriction, including without limitation the rights
47 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
48 copies of the Software, and to permit persons to whom the Software is
49 furnished to do so, subject to the following conditions:
50
51 The above copyright notice and this permission notice shall be included in all
52 copies or substantial portions of the Software.
53
54 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
55 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
56 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
57 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
58 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
59 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
60 SOFTWARE.
61*/
62/******************************************************************************/
Definition: job_api.hpp:30
InitializationToken Initialize(const JobSystemMemoryRequirements &memory_requirements={}, void *const memory=nullptr) noexcept
Sets up the Job system and creates all the worker threads. The thread that calls 'Job::Initialize' is...
Definition: job_system.cpp:741
InitializationToken(const unsigned int num_workers_created)
friend InitializationToken Initialize(const JobSystemMemoryRequirements &memory_requirements, void *const memory) noexcept
Sets up the Job system and creates all the worker threads. The thread that calls 'Job::Initialize' is...
unsigned int num_workers_created
The memory requirements for a given configuration JobSystemCreateOptions.
Definition: job_api.hpp:100