You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.0 KiB
45 lines
1.0 KiB
6 years ago
|
#ifndef MODEL_H
|
||
|
#define MODEL_H
|
||
|
|
||
|
// gate this here
|
||
|
#define TEMPORAL
|
||
6 years ago
|
#define DESIRE
|
||
|
|
||
|
#ifdef DESIRE
|
||
|
#define DESIRE_SIZE 8
|
||
|
#endif
|
||
6 years ago
|
|
||
|
#include "common/mat.h"
|
||
|
#include "common/modeldata.h"
|
||
6 years ago
|
#include "common/util.h"
|
||
6 years ago
|
|
||
|
#include "commonmodel.h"
|
||
6 years ago
|
#include "runners/run.h"
|
||
6 years ago
|
|
||
6 years ago
|
#include "cereal/gen/cpp/log.capnp.h"
|
||
|
#include <czmq.h>
|
||
|
#include <capnp/serialize.h>
|
||
6 years ago
|
#include "messaging.hpp"
|
||
6 years ago
|
|
||
|
|
||
6 years ago
|
typedef struct ModelState {
|
||
|
ModelInput in;
|
||
|
float *output;
|
||
6 years ago
|
RunModel *m;
|
||
6 years ago
|
#ifdef DESIRE
|
||
|
float *desire;
|
||
|
#endif
|
||
6 years ago
|
} ModelState;
|
||
|
|
||
|
void model_init(ModelState* s, cl_device_id device_id,
|
||
|
cl_context context, int temporal);
|
||
|
ModelData model_eval_frame(ModelState* s, cl_command_queue q,
|
||
|
cl_mem yuv_cl, int width, int height,
|
||
6 years ago
|
mat3 transform, void* sock, float *desire_in);
|
||
6 years ago
|
void model_free(ModelState* s);
|
||
6 years ago
|
void poly_fit(float *in_pts, float *in_stds, float *out);
|
||
6 years ago
|
|
||
6 years ago
|
void model_publish(PubSocket* sock, uint32_t frame_id,
|
||
6 years ago
|
const ModelData data, uint64_t timestamp_eof);
|
||
6 years ago
|
#endif
|