Net/main.cpp
Saturneic 3138d0f68a 调整结构
调整了CPart 的结构与计算模块获取参数的方式,使之更加合理。为以后的对更加复杂的传参要求的支持奠定了基础。
2019-01-18 22:57:54 +08:00

48 lines
882 B
C++

//
// net.cpp
// Net
//
// Created by 胡一兵 on 2019/1/13.
// Copyright © 2019年 Bakantu. All rights reserved.
//
#include "type.h"
#include "memory.h"
#include "clock.h"
#include "net.h"
#include "cpart.h"
#include "cmap.h"
#include "cthread.h"
void CPMT(void){
CMap map("./PCS");
CThread thread(&map);
thread.Analyse();
thread.DoLine();
thread.SetDaemon();
thread.CancelChildPCS(0);
}
int main(void){
initClock();
CPart ncp("./PCS","a.cpp","A");
void *a = main_pool.bv_malloc<double>(2.0);
void *b = main_pool.bv_malloc<double>(3.5);
void *c = main_pool.bv_malloc<int>(5);
ncp.AddCPArgsIn(a);
ncp.AddCPArgsIn(b);
ncp.AddCPArgsIn(c);
ncp.Run();
void *oa = ncp.args_out[0];
printf("%d",*((int *)oa));
main_pool.b_free(a);
main_pool.b_free(b);
main_pool.b_free(c);
return 0;
}