2016-02-10 12:31:39 -08:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
message Int {
|
|
|
|
int64 data = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message String {
|
|
|
|
string data = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Double {
|
|
|
|
double data = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message PyObj {
|
2016-02-22 13:55:06 -08:00
|
|
|
bytes data = 1;
|
2016-02-10 12:31:39 -08:00
|
|
|
}
|
|
|
|
|
2016-02-22 13:55:06 -08:00
|
|
|
// Union of possible object types
|
2016-02-10 12:31:39 -08:00
|
|
|
message Obj {
|
|
|
|
String string_data = 1;
|
|
|
|
Int int_data = 2;
|
|
|
|
Double double_data = 3;
|
|
|
|
PyObj pyobj_data = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message List {
|
|
|
|
repeated Obj elems = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Value {
|
|
|
|
uint64 ref = 1; // for pass by reference
|
|
|
|
Obj obj = 2; // for pass by value
|
|
|
|
}
|
|
|
|
|
2016-02-22 13:55:06 -08:00
|
|
|
message Call {
|
|
|
|
string name = 1;
|
2016-03-01 01:02:08 -08:00
|
|
|
repeated Value arg = 2;
|
2016-03-02 15:23:11 -08:00
|
|
|
repeated uint64 result = 3; // object references for result
|
2016-02-22 13:55:06 -08:00
|
|
|
}
|
|
|
|
|
2016-02-10 12:31:39 -08:00
|
|
|
enum DataType {
|
|
|
|
INT32 = 0;
|
|
|
|
INT64 = 1;
|
|
|
|
FLOAT32 = 2;
|
|
|
|
FLOAT64 = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Array {
|
|
|
|
repeated uint64 shape = 1;
|
|
|
|
DataType dtype = 2;
|
|
|
|
bytes data = 3;
|
|
|
|
}
|