view Paper/src/context1.c @ 2:e9b59ddf626d

add xbb
author mir3636
date Fri, 24 Nov 2017 19:36:53 +0900
parents aa9a59aea7fa
children 845b7c1fb066
line wrap: on
line source

struct Context {
    enum Code next;
    struct Worker* worker;
    struct TaskManager* taskManager;
    int codeNum;
    __code (**code) (struct Context*);
    void* heapStart;
    void* heap;
    long heapLimit;
    int dataNum;
    int idgCount;
    int idg;
    int maxIdg;
    int odg;
    int maxOdg;
    int workerId;
    int gpu;
    struct Context* task;
    struct Queue* tasks;
    union Data **data;
};

union Data {
    struct Meta {
        enum DataType type;
        long size;
        struct Queue* wait;
    } meta;
    struct Task {
        enum Code code;
        struct Queue* dataGears;
        int idsCount;
    } Task;

    ...

    struct Element {
        union Data* data;
        struct Element* next;
    } Element;
};