Merge pull request #12454 from samcake/workload-engine

Drafting the Classification Tracker job and adding it as a no op to the workload engine
This commit is contained in:
Andrew Meadows 2018-02-21 12:59:37 -08:00 committed by GitHub
commit 2bf9b4f4a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 74 additions and 0 deletions

View file

@ -0,0 +1,24 @@
//
// ClassificationTracker.cpp
// libraries/workload/src/workload
//
// Created by Andrew Meadows 2018.02.21
// Copyright 2018 High Fidelity, Inc.
//
// Originally from lighthouse3d. Modified to utilize glm::vec3 and clean up to our coding standards
// Simple plane class.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include "ClassificationTracker.h"
using namespace workload;
void ClassificationTracker::configure(const Config& config) {
}
void ClassificationTracker::run(const workload::WorkloadContextPointer& renderContext, Outputs& outputs) {
}

View file

@ -0,0 +1,45 @@
//
// ClassificationTracker.h
// libraries/workload/src/workload
//
// Created by Andrew Meadows 2018.02.21
// Copyright 2018 High Fidelity, Inc.
//
// Originally from lighthouse3d. Modified to utilize glm::vec3 and clean up to our coding standards
// Simple plane class.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef hifi_workload_ClassificationTracker_h
#define hifi_workload_ClassificationTracker_h
#include "Space.h"
#include "Engine.h"
namespace workload {
class ClassificationTrackerConfig : public Job::Config {
Q_OBJECT
public:
ClassificationTrackerConfig() : Job::Config(true) {}
};
class ClassificationTracker {
public:
using Config = ClassificationTrackerConfig;
using Outputs = Classifications;
using JobModel = workload::Job::ModelO<ClassificationTracker, Outputs, Config>;
ClassificationTracker() {}
void configure(const Config& config);
void run(const workload::WorkloadContextPointer& renderContext, Outputs& outputs);
protected:
};
} // namespace workload
#endif // hifi_workload_ClassificationTracker_h

View file

@ -16,6 +16,8 @@
#include <iostream>
#include "ClassificationTracker.h"
namespace workload {
// the "real Job"
@ -47,6 +49,8 @@ namespace workload {
using JobModel = Task::Model<EngineModel>;
void build(EngineModel& model, const Varying& in, Varying& out) {
model.addJob<HelloWorld>("helloWorld");
auto classifications = model.addJob<ClassificationTracker>("classificationTracker");
}
};

View file

@ -85,6 +85,7 @@ private:
};
using SpacePointer = std::shared_ptr<Space>;
using Classifications = std::vector<Space::Change>;
} // namespace workload