Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
nop-job-functor.hpp
Go to the documentation of this file.
1/*
2 NOP-JOB-FUNCTOR.hpp - a render job to do nothing
3
4 Copyright (C)
5 2023, Hermann Vosseler <Ichthyostega@web.de>
6
7  **Lumiera** is free software; you can redistribute it and/or modify it
8  under the terms of the GNU General Public License as published by the
9  Free Software Foundation; either version 2 of the License, or (at your
10  option) any later version. See the file COPYING for further details.
11
12*/
13
14
25#ifndef VAULT_GEAR_NOP_JOB_FUNCTOR_H
26#define VAULT_GEAR_NOP_JOB_FUNCTOR_H
27
28
29
30#include "lib/hash-standard.hpp"
31#include "lib/hash-combine.hpp"
33#include "vault/gear/job.h"
34
35#include <string>
36
37
38namespace vault{
39namespace gear {
40
41 using lib::time::Time;
42 using lib::HashVal;
43
44
50 : public JobClosure
51 {
52
53 /* === JobFunctor Interface === */
54
56 getJobKind() const
57 {
58 return META_JOB;
59 }
60
61 std::string
62 diagnostic() const override
63 {
64 return "NopJobFunctor";
65 }
66
68 buildInstanceID (HashVal) const override
69 {
70 return InvocationInstanceID();
71 }
72
73 size_t
74 hashOfInstance (InvocationInstanceID invoKey) const override
75 {
77 HashVal res = hashr (invoKey.frameNumber);
78 lib::hash::combine (res, hashr (invoKey.part.t));
79 return res;
80 }
81
82 void
84 {
85 /* NOP */
86 }
87
88 public:
90 };
91
92
93}} // namespace vault::gear
94#endif /*VAULT_GEAR_NOP_JOB_FUNCTOR_H*/
Lumiera's internal time value datatype.
Interface of the closure for frame rendering jobs.
Definition job.h:244
Stub/Test implementation of the JobFunctor interface for a render job to do nothing at all
void invokeJobOperation(JobParameter) override
InvocationInstanceID buildInstanceID(HashVal) const override
size_t hashOfInstance(InvocationInstanceID invoKey) const override
std::string diagnostic() const override
Hash combine function extracted from LibBoost 1.67 Combine two hash values to form a composite depend...
Helper to use a single extension point for specialised hash functions.
Definition of a render job.
JobKind
Definition job.h:64
@ META_JOB
render process self organisation
Definition job.h:67
struct InvocationInstanceID::@62 part
FrameCnt frameNumber
Definition job.h:109
opaque ID attached to each individual job invocation.
Definition job.h:105
void combine(size_t &combinedHash, size_t additionalHash)
meld the additional hash value into the given base hash value.
size_t HashVal
a STL compatible hash value
Definition hash-value.h:52
lumiera_jobParameter const & JobParameter
Definition job.h:205
Vault-Layer implementation namespace root.
Primary class template for std::hash.
a family of time value like entities and their relationships.