2024-06-29 04:23:55 +02:00
|
|
|
|
/*
|
|
|
|
|
|
TEST-RAND-ONTOLOGY.hpp - placeholder for a domain-ontology working on dummy data frames
|
|
|
|
|
|
|
Copyright: clarify and simplify the file headers
* Lumiera source code always was copyrighted by individual contributors
* there is no entity "Lumiera.org" which holds any copyrights
* Lumiera source code is provided under the GPL Version 2+
== Explanations ==
Lumiera as a whole is distributed under Copyleft, GNU General Public License Version 2 or above.
For this to become legally effective, the ''File COPYING in the root directory is sufficient.''
The licensing header in each file is not strictly necessary, yet considered good practice;
attaching a licence notice increases the likeliness that this information is retained
in case someone extracts individual code files. However, it is not by the presence of some
text, that legally binding licensing terms become effective; rather the fact matters that a
given piece of code was provably copyrighted and published under a license. Even reformatting
the code, renaming some variables or deleting parts of the code will not alter this legal
situation, but rather creates a derivative work, which is likewise covered by the GPL!
The most relevant information in the file header is the notice regarding the
time of the first individual copyright claim. By virtue of this initial copyright,
the first author is entitled to choose the terms of licensing. All further
modifications are permitted and covered by the License. The specific wording
or format of the copyright header is not legally relevant, as long as the
intention to publish under the GPL remains clear. The extended wording was
based on a recommendation by the FSF. It can be shortened, because the full terms
of the license are provided alongside the distribution, in the file COPYING.
2024-11-17 23:42:55 +01:00
|
|
|
|
Copyright (C)
|
|
|
|
|
|
2024, Hermann Vosseler <Ichthyostega@web.de>
|
2024-06-29 04:23:55 +02:00
|
|
|
|
|
Copyright: clarify and simplify the file headers
* Lumiera source code always was copyrighted by individual contributors
* there is no entity "Lumiera.org" which holds any copyrights
* Lumiera source code is provided under the GPL Version 2+
== Explanations ==
Lumiera as a whole is distributed under Copyleft, GNU General Public License Version 2 or above.
For this to become legally effective, the ''File COPYING in the root directory is sufficient.''
The licensing header in each file is not strictly necessary, yet considered good practice;
attaching a licence notice increases the likeliness that this information is retained
in case someone extracts individual code files. However, it is not by the presence of some
text, that legally binding licensing terms become effective; rather the fact matters that a
given piece of code was provably copyrighted and published under a license. Even reformatting
the code, renaming some variables or deleting parts of the code will not alter this legal
situation, but rather creates a derivative work, which is likewise covered by the GPL!
The most relevant information in the file header is the notice regarding the
time of the first individual copyright claim. By virtue of this initial copyright,
the first author is entitled to choose the terms of licensing. All further
modifications are permitted and covered by the License. The specific wording
or format of the copyright header is not legally relevant, as long as the
intention to publish under the GPL remains clear. The extended wording was
based on a recommendation by the FSF. It can be shortened, because the full terms
of the license are provided alongside the distribution, in the file COPYING.
2024-11-17 23:42:55 +01:00
|
|
|
|
**Lumiera** is free software; you can redistribute it and/or modify it
|
|
|
|
|
|
under the terms of the GNU General Public License as published by the
|
|
|
|
|
|
Free Software Foundation; either version 2 of the License, or (at your
|
|
|
|
|
|
option) any later version. See the file COPYING for further details.
|
2024-06-29 04:23:55 +02:00
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
2024-10-31 23:50:59 +01:00
|
|
|
|
/** @file test-rand-ontology.hpp
|
2024-06-29 04:23:55 +02:00
|
|
|
|
** A faked »media calculation« environment to validate the render node network.
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef STEAM_ENGINE_TEST_RAND_ONTOLOGY_H
|
|
|
|
|
|
#define STEAM_ENGINE_TEST_RAND_ONTOLOGY_H
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-10-31 23:50:59 +01:00
|
|
|
|
#include "lib/error.hpp"
|
2024-11-28 23:41:56 +01:00
|
|
|
|
#include "lib/symbol.hpp"
|
2024-11-05 21:23:13 +01:00
|
|
|
|
#include "lib/depend.hpp"
|
2024-11-28 23:41:56 +01:00
|
|
|
|
#include "lib/nocopy.hpp"
|
|
|
|
|
|
#include "lib/format-string.hpp"
|
2024-06-29 04:23:55 +02:00
|
|
|
|
#include "steam/engine/testframe.hpp"
|
|
|
|
|
|
|
2024-10-13 03:49:01 +02:00
|
|
|
|
#include <array>
|
2024-11-03 22:55:06 +01:00
|
|
|
|
#include <string>
|
2024-10-13 03:49:01 +02:00
|
|
|
|
|
2024-06-29 04:23:55 +02:00
|
|
|
|
|
|
|
|
|
|
namespace steam {
|
|
|
|
|
|
namespace engine{
|
|
|
|
|
|
namespace test {
|
|
|
|
|
|
|
2024-11-03 22:55:06 +01:00
|
|
|
|
using std::string;
|
2024-11-28 23:41:56 +01:00
|
|
|
|
using lib::Literal;
|
|
|
|
|
|
using util::_Fmt;
|
2024-11-05 21:23:13 +01:00
|
|
|
|
|
|
|
|
|
|
/** produce sequences of frames with (reproducible) random data */
|
2024-11-27 15:31:50 +01:00
|
|
|
|
void generateFrame (TestFrame* buff, size_t frameNr =0, uint flavour =0);
|
2024-11-05 21:23:13 +01:00
|
|
|
|
|
|
|
|
|
|
/** produce planar multi channel output of random data frames */
|
2024-11-27 15:31:50 +01:00
|
|
|
|
void generateMultichan (TestFrame* buffArry, uint chanCnt, size_t frameNr =0, uint flavour =0);
|
2024-11-05 21:23:13 +01:00
|
|
|
|
|
2024-11-28 02:15:59 +01:00
|
|
|
|
/** create an identical clone copy of the planar multi channel frame array */
|
|
|
|
|
|
void duplicateMultichan (TestFrame* outArry, TestFrame* inArry, uint chanCnt);
|
|
|
|
|
|
|
|
|
|
|
|
/** »process« a planar multi channel array of data frames in-place */
|
|
|
|
|
|
void manipulateMultichan (TestFrame* buffArry, uint chanCnt, uint64_t param);
|
|
|
|
|
|
|
2024-11-20 21:44:50 +01:00
|
|
|
|
/** »process« random frame date by hash-chaining with a parameter */
|
|
|
|
|
|
void manipulateFrame (TestFrame* out, TestFrame const* in, uint64_t param);
|
2024-11-05 21:23:13 +01:00
|
|
|
|
|
|
|
|
|
|
/** mix two random data frames by a parameter-controlled proportion */
|
2024-11-27 15:31:50 +01:00
|
|
|
|
void combineFrames (TestFrame* out, TestFrame const* srcA, TestFrame const* srcB, double mix);
|
2024-11-05 21:23:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
2024-10-13 03:49:01 +02:00
|
|
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1367 : Dummy / Placeholder
|
2024-10-26 03:03:11 +02:00
|
|
|
|
using NoArg = std::array<char*, 0>;
|
2024-10-13 03:49:01 +02:00
|
|
|
|
using SoloArg = std::array<char*, 1>;
|
2024-10-31 23:50:59 +01:00
|
|
|
|
|
2024-11-03 22:55:06 +01:00
|
|
|
|
extern const string DUMMY_FUN_ID;
|
2024-10-31 23:50:59 +01:00
|
|
|
|
|
2024-10-13 03:49:01 +02:00
|
|
|
|
/** @todo a placeholder operation to wire a prototypical render node
|
|
|
|
|
|
*/
|
|
|
|
|
|
inline void
|
2024-10-26 03:03:11 +02:00
|
|
|
|
dummyOp (NoArg in, SoloArg out)
|
2024-10-13 03:49:01 +02:00
|
|
|
|
{
|
|
|
|
|
|
UNIMPLEMENTED ("a sincerely nonsensical operation");
|
|
|
|
|
|
}
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1367 : Dummy / Placeholder
|
2024-06-29 04:23:55 +02:00
|
|
|
|
/**
|
|
|
|
|
|
* A fake _Domain Ontology_ to describe mocked »render operations« on
|
|
|
|
|
|
* dummy data frames filled with random numbers.
|
|
|
|
|
|
*
|
|
|
|
|
|
* @see TestFrame_test
|
|
|
|
|
|
* @see NodeDevel_test
|
|
|
|
|
|
* @see NodeLinkage_test
|
|
|
|
|
|
*
|
|
|
|
|
|
*/
|
|
|
|
|
|
class TestRandOntology
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
2024-11-28 23:41:56 +01:00
|
|
|
|
struct Spec;
|
|
|
|
|
|
|
2024-06-29 04:23:55 +02:00
|
|
|
|
~TestRandOntology() = default;
|
|
|
|
|
|
TestRandOntology() = default;
|
|
|
|
|
|
|
2024-11-28 23:41:56 +01:00
|
|
|
|
Spec setupGenerator (string qual ="");
|
2024-06-29 04:23:55 +02:00
|
|
|
|
private:
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-11-28 23:41:56 +01:00
|
|
|
|
struct TestRandOntology::Spec
|
|
|
|
|
|
: util::Cloneable
|
|
|
|
|
|
{
|
|
|
|
|
|
const string PROTO;
|
|
|
|
|
|
|
|
|
|
|
|
Spec (Literal kind
|
|
|
|
|
|
,Literal type
|
|
|
|
|
|
)
|
|
|
|
|
|
: PROTO{_Fmt{"%s-%s"} % kind % type}
|
|
|
|
|
|
{ }
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
inline TestRandOntology::Spec
|
|
|
|
|
|
TestRandOntology::setupGenerator (string qual)
|
|
|
|
|
|
{
|
|
|
|
|
|
Spec spec{"generate","TestFrame"};
|
|
|
|
|
|
return spec;
|
|
|
|
|
|
}
|
2024-06-29 04:23:55 +02:00
|
|
|
|
|
2024-11-28 23:41:56 +01:00
|
|
|
|
/** Singleton accessor */
|
|
|
|
|
|
extern lib::Depend<TestRandOntology> testRand;
|
2024-06-29 04:23:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}}} // namespace steam::engine::test
|
|
|
|
|
|
#endif
|