Commit fa6b275c authored by Sven Liefgen's avatar Sven Liefgen
Browse files

First version of xlap in rust

This version uses hardcoded values ,doesn't print all the header
fields and uses indices in the code to refer to the correct timestamp
but it is a first working version that gives the correct output.
parent 305f2090
......@@ -4,3 +4,4 @@ xlap.egg-info/
.ipynb_checkpoints/
.venv/
Pipfile.lock
target/
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
[[package]]
name = "linked-hash-map"
version = "0.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3"
[[package]]
name = "xlap"
version = "0.1.0"
dependencies = [
"yaml-rust",
]
[[package]]
name = "yaml-rust"
version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85"
dependencies = [
"linked-hash-map",
]
[package]
name = "xlap"
version = "0.1.0"
authors = ["Sven Liefgen <sven@liefgen.lu>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
[build-dependencies]
yaml-rust = "0.4"
use std::env;
use std::fs;
use std::path::Path;
use yaml_rust::YamlLoader;
fn main() {
//let out_dir = env::var("OUT_DIR").unwrap();
//let dest_path = Path::new(&out_dir).join("xlap_generated.rs");
//let yaml = fs::read_to_string("xlap.yml").unwrap();
//let yaml = YamlLoader::load_from_str(yaml.as_str()).unwrap();
//fs::write(
//&dest_path,
//format!(
//"{:?}\
//",
//yaml
//)
//)
//.unwrap();
//println!("cargo::rerun-if-changed=build.rs");
//println!("cargo::rerun-if-changed=src/lib.rs");
}
This diff is collapsed.
This diff is collapsed.
data_files:
sender: "sender.csv"
receiver: "receiver.csv"
threads:
- app_send
- trans_send
- trans_recv
- app_recv
cycle_reference:
app_send:
Start: PrrtSendStart
Stop: PrrtSendEnd
trans_send:
Start: PrrtTransmitStart
Stop: LinkTransmitEnd
trans_recv:
Start: LinkReceive
Stop: PrrtReturnPackage
app_recv:
Start: PrrtReceivePackage
Stop: PrrtDeliver
time_reference:
sender:
Start: PrrtSendStart
Stop: LinkTransmitEnd
receiver:
Start: LinkReceive
Stop: PrrtDeliver
stamps:
PrrtSendStart:
Source: sender
Thread: app_send
Type: time
PrrtSubmitPackage:
Source: sender
Thread: app_send
Type: cycle
PrrtSendEnd:
Source: sender
Thread: app_send
Type: time
PrrtTransmitStart:
Source: sender
Thread: trans_send
Type: time
PrrtTransmitEnd:
Source: sender
Thread: trans_send
Type: cycle
PrrtEncodeStart:
Source: sender
Thread: trans_send
Type: cycle
PrrtEncodeEnd:
Source: sender
Thread: trans_send
Type: cycle
LinkTransmitStart:
Source: sender
Thread: trans_send
Type: cycle
ChannelTransmit:
Source: sender
Thread: trans_send
Type: time
LinkTransmitEnd:
Source: sender
Thread: trans_send
Type: time
ChannelReceive:
Source: receiver
Thread: trans_recv
Type: time
LinkReceive:
Source: receiver
Thread: trans_recv
Type: time
SendFeedbackStart:
Source: receiver
Thread: trans_recv
Type: cycle
SendFeedbackEnd:
Source: receiver
Thread: trans_recv
Type: cycle
DecodeStart:
Source: receiver
Thread: trans_recv
Type: cycle
DecodeEnd:
Source: receiver
Thread: trans_recv
Type: cycle
HandlePacketStart:
Source: receiver
Thread: trans_recv
Type: cycle
HandlePacketEnd:
Source: receiver
Thread: trans_recv
Type: cycle
PrrtReturnPackage:
Source: receiver
Thread: trans_recv
Type: time
PrrtDeliver:
Source: receiver
Thread: app_recv
Type: time
CopyOutputStart:
Source: receiver
Thread: app_recv
Type: cycle
CopyOutputEnd:
Source: receiver
Thread: app_recv
Type: cycle
PrrtReceivePackage:
Source: receiver
Thread: app_recv
Type: time
durations:
Send:
Start: PrrtSendStart
Stop: PrrtSendEnd
Source: sender
PrrtTransmit:
Start: PrrtTransmitStart
Stop: PrrtTransmitEnd
Source: sender
LinkTransmit:
Start: LinkTransmitStart
Stop: LinkTransmitEnd
Source: sender
Submit:
Start: PrrtSendStart
Stop: PrrtSubmitPackage
Source: sender
Enqueue:
Start: PrrtSubmitPackage
Stop: PrrtSendEnd
Source: sender
SenderIPC:
Start: PrrtSubmitPackage
Stop: PrrtTransmitStart
Source: sender
SenderEnqueued:
Start: PrrtSendEnd
Stop: LinkTransmitStart
Source: sender
ReceiverIPC:
Start: PrrtReturnPackage
Stop: PrrtReceivePackage
Source: receiver
HandlePacket:
Start: HandlePacketStart
Stop: HandlePacketEnd
Source: receiver
Feedback:
Start: SendFeedbackStart
Stop: SendFeedbackEnd
Source: receiver
Decoding:
Start: DecodeStart
Stop: DecodeEnd
Source: receiver
packet_types:
Data: 0
Redundancy: 1
/*
* pp.h
*
* This file contains some useful preprocessor macros.
*
* Warning: This file is auto-generated. Do not edit.
*/
#ifndef __PP_H__
#define __PP_H__ 1
/*
* PP__cmn_* macros
*
* PP common macros
*/
#define PP__cmn_id(...) __VA_ARGS__
#define PP__cmn_call(m,...) m(__VA_ARGS__)
/*
* PP__arg_* macros
*
* PP macros that operate on argument lists.
*/
#define PP_arg_count(...) PP__arg_cnt(__VA_ARGS__)
#define PP__arg_cnt(...) PP__arg_cnt_2(__VA_ARGS__,128,127,126,125,124,123,122,121,120,119,118,117,116,115,114,113,112,111,110,109,108,107,106,105,104,103,102,101,100,99,98,97,96,95,94,93,92,91,90,89,88,87,86,85,84,83,82,81,80,79,78,77,76,75,74,73,72,71,70,69,68,67,66,65,64,63,62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0)
#define PP__arg_cnt_2(_a1,_a2,_a3,_a4,_a5,_a6,_a7,_a8,_a9,_a10,_a11,_a12,_a13,_a14,_a15,_a16,_a17,_a18,_a19,_a20,_a21,_a22,_a23,_a24,_a25,_a26,_a27,_a28,_a29,_a30,_a31,_a32,_a33,_a34,_a35,_a36,_a37,_a38,_a39,_a40,_a41,_a42,_a43,_a44,_a45,_a46,_a47,_a48,_a49,_a50,_a51,_a52,_a53,_a54,_a55,_a56,_a57,_a58,_a59,_a60,_a61,_a62,_a63,_a64,_a65,_a66,_a67,_a68,_a69,_a70,_a71,_a72,_a73,_a74,_a75,_a76,_a77,_a78,_a79,_a80,_a81,_a82,_a83,_a84,_a85,_a86,_a87,_a88,_a89,_a90,_a91,_a92,_a93,_a94,_a95,_a96,_a97,_a98,_a99,_a100,_a101,_a102,_a103,_a104,_a105,_a106,_a107,_a108,_a109,_a110,_a111,_a112,_a113,_a114,_a115,_a116,_a117,_a118,_a119,_a120,_a121,_a122,_a123,_a124,_a125,_a126,_a127,_a128,_x,...) _x
/*
* argument list map-reduce macros
*/
#define PP__mapreduce_1(reduce,eol,map,a) eol(map(a))
#define PP__mapreduce_2(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_1(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_3(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_2(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_4(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_3(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_5(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_4(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_6(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_5(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_7(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_6(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_8(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_7(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_9(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_8(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_10(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_9(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_11(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_10(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_12(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_11(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_13(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_12(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_14(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_13(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_15(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_14(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_16(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_15(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_17(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_16(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_18(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_17(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_19(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_18(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_20(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_19(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_21(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_20(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_22(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_21(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_23(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_22(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_24(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_23(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_25(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_24(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_26(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_25(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_27(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_26(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_28(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_27(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_29(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_28(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_30(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_29(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_31(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_30(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_32(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_31(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_33(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_32(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_34(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_33(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_35(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_34(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_36(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_35(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_37(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_36(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_38(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_37(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_39(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_38(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_40(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_39(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_41(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_40(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_42(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_41(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_43(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_42(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_44(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_43(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_45(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_44(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_46(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_45(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_47(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_46(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_48(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_47(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_49(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_48(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_50(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_49(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_51(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_50(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_52(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_51(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_53(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_52(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_54(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_53(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_55(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_54(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_56(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_55(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_57(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_56(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_58(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_57(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_59(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_58(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_60(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_59(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_61(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_60(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_62(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_61(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_63(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_62(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_64(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_63(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_65(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_64(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_66(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_65(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_67(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_66(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_68(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_67(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_69(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_68(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_70(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_69(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_71(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_70(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_72(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_71(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_73(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_72(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_74(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_73(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_75(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_74(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_76(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_75(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_77(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_76(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_78(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_77(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_79(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_78(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_80(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_79(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_81(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_80(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_82(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_81(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_83(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_82(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_84(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_83(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_85(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_84(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_86(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_85(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_87(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_86(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_88(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_87(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_89(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_88(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_90(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_89(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_91(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_90(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_92(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_91(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_93(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_92(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_94(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_93(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_95(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_94(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_96(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_95(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_97(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_96(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_98(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_97(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_99(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_98(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_100(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_99(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_101(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_100(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_102(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_101(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_103(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_102(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_104(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_103(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_105(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_104(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_106(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_105(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_107(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_106(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_108(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_107(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_109(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_108(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_110(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_109(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_111(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_110(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_112(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_111(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_113(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_112(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_114(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_113(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_115(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_114(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_116(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_115(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_117(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_116(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_118(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_117(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_119(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_118(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_120(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_119(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_121(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_120(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_122(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_121(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_123(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_122(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_124(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_123(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_125(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_124(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_126(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_125(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_127(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_126(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce_128(reduce,eol,map,head,...) reduce(map(head),PP__mapreduce_127(reduce,eol,map,__VA_ARGS__))
#define PP__mapreduce(reduce,eol,map,...) PP__mapreduce__i(PP__arg_cnt(__VA_ARGS__),reduce,eol,map,__VA_ARGS__)
#define PP__mapreduce__i(n,reduce,eol,map,...) PP__mapreduce__ii(n,reduce,eol,map,__VA_ARGS__)
#define PP__mapreduce__ii(n,reduce,eol,map,...) PP__mapreduce_##n(reduce,eol,map,__VA_ARGS__)
/*
* foreach loop
*/
#define PP_foreach(join,map,...) PP__mapreduce(join,PP__cmn_id,map,__VA_ARGS__)
/*
* common join and map operations
*/
#define PP_join_space(a,b) a b
#define PP_join_comma(a,b) a,b
#define PP_join_plus(a,b) a+b
#define PP_join_minus(a,b) a-b
#define PP_join_mul(a,b) a*b
#define PP_join_or(a,b) a|b
#define PP_join_and(a,b) a&b
#define PP_join_lor(a,b) a||b
#define PP_join_land(a,b) a&&b
#define PP_join_xor(a,b) a^b
#define PP_join_glue(a,b) PP__join_glue(a,b)
#define PP__join_glue(a,b) a##b
#define PP_id(...) __VA_ARGS__
#define PP_stringify(x) PP__stringify(x)
#define PP__stringify(x) #x
#endif /* __PP_H__ */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment