Mercurial > hg > Members > kono > Cerium
changeset 273:3e9c0039e15c
merge
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 04 Jun 2009 00:12:47 +0900 |
parents | f3b406eecf1c |
children | 6ecb2b8a2505 |
files | Document/Cerium_2009.mm TaskManager/Cell/CellTaskManagerImpl.cc TaskManager/Cell/spe/CellDmaManager.cc TaskManager/Cell/spe/SchedMail.cc TaskManager/Test/test_render/Makefile.def TaskManager/Test/test_render/spe/DrawSpan.cpp TaskManager/Test/test_render/spe/DrawSpanRenew.cpp TaskManager/Test/test_render/task/CreateSpan.cpp TaskManager/Test/test_render/task/DrawSpan.cpp TaskManager/Test/test_render/task/update_sgp.cpp TaskManager/Test/test_render/viewer.cpp TaskManager/kernel/main.cc example/HelloWorld/Makefile.def include/TaskManager/CellDmaManager.h include/TaskManager/SchedExit.h |
diffstat | 15 files changed, 8 insertions(+), 290 deletions(-) [+] |
line wrap: on
line diff
--- a/Document/Cerium_2009.mm Thu Jun 04 00:08:48 2009 +0900 +++ b/Document/Cerium_2009.mm Thu Jun 04 00:12:47 2009 +0900 @@ -13,16 +13,9 @@ <icon BUILTIN="button_ok"/> <node CREATED="1243576115273" ID="Freemind_Link_1443523938" MODIFIED="1243576166041" TEXT="1周するのに59秒"/> </node> -<<<<<<< local -<node CREATED="1243578458067" ID="Freemind_Link_1713267557" MODIFIED="1243943407812" TEXT="Program 終了時に busy_rate 表示"> -======= <node CREATED="1243578458067" ID="Freemind_Link_1713267557" MODIFIED="1244013305391" TEXT="Program 終了時に busy_rate 表示"> ->>>>>>> other <icon BUILTIN="full-1"/> -<<<<<<< local -======= <icon BUILTIN="button_ok"/> ->>>>>>> other <node CREATED="1243578499039" ID="Freemind_Link_1478568979" MODIFIED="1243944044789" TEXT="hiroki"/> </node> </node>
--- a/TaskManager/Cell/CellTaskManagerImpl.cc Thu Jun 04 00:08:48 2009 +0900 +++ b/TaskManager/Cell/CellTaskManagerImpl.cc Thu Jun 04 00:12:47 2009 +0900 @@ -221,7 +221,8 @@ * ここでは TaskList を allocate(new) して登録してやろうか */ - speThreads->add_output_tasklist(command, &alloc_info[1], alloc_size); + speThreads->add_output_tasklist(command, alloc_info[1], alloc_size); + speThreads->send_mail(id, 2, alloc_info); } else if (data > MY_SPE_NOP) { __debug_ppe("[PPE] recv from [SPE %d] : 0x%x\n", id, data);
--- a/TaskManager/Cell/spe/CellDmaManager.cc Thu Jun 04 00:08:48 2009 +0900 +++ b/TaskManager/Cell/spe/CellDmaManager.cc Thu Jun 04 00:12:47 2009 +0900 @@ -2,9 +2,6 @@ #include <stdlib.h> #include "CellDmaManager.h" -unsigned int CellDmaManager::wait_time, CellDmaManager::busy_time; -unsigned long long CellDmaManager::global_busy_time, CellDmaManager::global_wait_time; - /** * DMA Load * @@ -40,31 +37,22 @@ * * @param[in] mask Tag for Wait DMA process */ - -static void +void CellDmaManager::start_dmawait_profile() { wait_time = spu_readch(SPU_RdDec); - // global 紊違 global_busy_time += busy_time - wait_time; spu_writech(SPU_WrDec, 0xffffffff); } -static void +void CellDmaManager::end_dmawait_profile() { wait_time = spu_readch(SPU_RdDec); - // global 紊違 global_wait_time += 0xffffffff - wait_time; busy_time = wait_time; } -// с潟ppu眼 Task -void -CellDmaManager::print_wait() -{ -} - void CellDmaManager::show_dma_wait(int cpu) {
--- a/TaskManager/Cell/spe/SchedMail.cc Thu Jun 04 00:08:48 2009 +0900 +++ b/TaskManager/Cell/spe/SchedMail.cc Thu Jun 04 00:12:47 2009 +0900 @@ -13,22 +13,12 @@ { delete p; - // dma wait - scheduler->start_dmawait_profile(); params_addr = scheduler->mail_read(); - scheduler->end_dmawait_profile(); __debug("[SchedMail:%s]\n", __FUNCTION__); -<<<<<<< local - if ((int)params_addr == MY_SPE_COMMAND_EXIT) { - // ppu 眼 spu 絎茵倶茵腓榊 Task - // counter global - return new SchedExit(m); -======= if ((int)params_addr == MY_SPE_COMMAND_EXIT) { return new SchedExit(); ->>>>>>> other } else { return new SchedTaskList(params_addr, m); }
--- a/TaskManager/Test/test_render/Makefile.def Thu Jun 04 00:08:48 2009 +0900 +++ b/TaskManager/Test/test_render/Makefile.def Thu Jun 04 00:12:47 2009 +0900 @@ -1,19 +1,6 @@ TARGET = test_nogl -<<<<<<< local CERIUM = ../../.. -======= -# include/library path -# ex: macosx -#CERIUM = /Users/gongo/Source/Concurrency/Game_project/Cerium -#CERIUM = /Users/gongo/Source/hg/Cerium - -# ex: linux/ps3 -CERIUM = /home/gongo/Cerium -#CERIUM = /Users/tkaito/hg/Game/Cerium - -#CERIUM = ../../.. ->>>>>>> other CC = g++ CFLAGS = -O9 -g -Wall# -DDEBUG
--- a/TaskManager/Test/test_render/spe/DrawSpan.cpp Thu Jun 04 00:08:48 2009 +0900 +++ b/TaskManager/Test/test_render/spe/DrawSpan.cpp Thu Jun 04 00:12:47 2009 +0900 @@ -9,42 +9,23 @@ SchedDefineTask(DrawSpan); -<<<<<<< local #define TEX_LOAD1 0 #define TEX_LOAD2 1 #define SPAN_PACK_LOAD 2 #define FB_STORE 3 -======= -<<<<<<< local -static TileHashPtr hash; -======= -<<<<<<< local -static const int hashsize = 263; ->>>>>>> other -<<<<<<< local DrawSpan::~DrawSpan(void) { smanager->dma_wait(FB_STORE); free((void*)((int)linebuf*doneWrite)); } -======= -static TilePtr hash_table[hashsize] = {NULL}; ->>>>>>> other -<<<<<<< local inline vector float spu_re_nrm(vector float a) { vector float unit = (vector float){1.0, 1.0, 1.0, 1.0}; vector float approximation; -======= -unsigned short PRIME[8] = { - 0x002, 0x065, 0x0c7, 0x133, 0x191, 0x1f3, 0x259, 0x2bd, -}; ->>>>>>> other -<<<<<<< local approximation = spu_re(a); return spu_madd(spu_nmsub(approximation, a, unit), approximation, approximation); @@ -63,10 +44,6 @@ return getLocalPositionVec(x, split_screen_w); } -======= ->>>>>>> other -static TileListPtr tileList; ->>>>>>> other /** * 鴻cTEXTURE_SPLIT_PIXEL^2 蚊 @@ -125,9 +102,6 @@ int block = getTexBlock(tx, ty, tw); return tex_addr_top + block*TEXTURE_BLOCK_SIZE; } -======= -static unsigned char *tex; ->>>>>>> other /** * FrameBuffer 吾莨若 rgb @@ -210,11 +184,7 @@ tile->texture_addr = addr; -<<<<<<< local - //int index = hash->put(tile->texture_addr, tile); -======= hash->put(tile->texture_addr, tile); ->>>>>>> other smanager->dma_load(tile->pixel, (uint32)addr, sizeof(uint32)*TEXTURE_BLOCK_SIZE, tag); } @@ -627,26 +597,6 @@ int tl_tag_flg1 = 0; int tl_tag_flg2 = 1; -<<<<<<< local -======= - float *zRow = (float*)smanager->get_input(1); - int **linebuf = (int**)smanager->allocate(sizeof(int*)*rangey); - - for (int i = 0; i < rangey; i++) { - linebuf[i] = (int*)smanager->get_output(i); -<<<<<<< local - linebuf_init(linebuf[i], rangex, 0xffffffff); -======= -<<<<<<< local - linebuf_init(linebuf[i], rangex, 0xffffff); -======= - //linebuf_init(linebuf[i], rangex, 0x00ff00ff); - linebuf_init(linebuf[i], rangex, 0); ->>>>>>> other ->>>>>>> other - } - ->>>>>>> other do { /** * SpanPack->next 絖翫 @@ -660,7 +610,6 @@ next_spack = NULL; } -<<<<<<< local SpanPtr resume_span = &nop_span; int resume_span_x = 0; @@ -668,9 +617,6 @@ SpanPtr next_span; int next_span_x; -======= - for (int t = spack->info.start; t < spack->info.size; t++) { ->>>>>>> other span = &spack->span[t]; /** @@ -720,24 +666,5 @@ */ free(free_spack); -<<<<<<< local -======= - free(linebuf); -<<<<<<< local -======= - free(zRow); -<<<<<<< local -======= -<<<<<<< local - free(tileList); - free(tilist); - free(next_tilist); ->>>>>>> other ->>>>>>> other - -======= - free(tex); ->>>>>>> other ->>>>>>> other return 0; }
--- a/TaskManager/Test/test_render/spe/DrawSpanRenew.cpp Thu Jun 04 00:08:48 2009 +0900 +++ b/TaskManager/Test/test_render/spe/DrawSpanRenew.cpp Thu Jun 04 00:12:47 2009 +0900 @@ -216,10 +216,6 @@ free(zRow); free(args); -<<<<<<< local - //FINISH: -======= ->>>>>>> other /** * linebuf, zRow, args は RenewTask が引き継ぐ */
--- a/TaskManager/Test/test_render/task/CreateSpan.cpp Thu Jun 04 00:08:48 2009 +0900 +++ b/TaskManager/Test/test_render/task/CreateSpan.cpp Thu Jun 04 00:12:47 2009 +0900 @@ -128,8 +128,7 @@ /** - * span width Triangle height 絲障 - * texture width,height 罸鴻 + * span width,height texture width,height 罸鴻 * span 祉篏帥 texture 罸羆 * * @param[in] width Width of span @@ -400,13 +399,7 @@ * SIMD 荐菴違綽 */ -<<<<<<< local #endif -======= - //scale = (8 > tex_scale_max) ? tex_scale_max : 8; - - uint32 *tapestry = getTapestry(tex_width, tex_height, scale, tex_addr); ->>>>>>> other } @@ -448,18 +441,9 @@ for (int i = 0; i < pp->info.size; i++) { triPack = &pp->tri[i]; -<<<<<<< local TriangleTexInfoPtr tri_tex_info = &triPack->tex_info; -======= - // ф検吾鴻帥箙с祉祉 - // с緇絋鐚 ->>>>>>> other make_vertex(triPack, &vMin, &vMid, &vMax); -<<<<<<< local -======= - ->>>>>>> other make_vMid10(vMid10, vMin, vMid, vMax); /**
--- a/TaskManager/Test/test_render/task/DrawSpan.cpp Thu Jun 04 00:08:48 2009 +0900 +++ b/TaskManager/Test/test_render/task/DrawSpan.cpp Thu Jun 04 00:12:47 2009 +0900 @@ -580,7 +580,6 @@ next_spack = NULL; } -<<<<<<< local SpanPtr resume_span = &nop_span; int resume_span_x = 0; @@ -588,9 +587,6 @@ SpanPtr next_span; int next_span_x; -======= - for (int t = spack->info.start; t < spack->info.size; t++) { ->>>>>>> other span = &spack->span[t]; /**
--- a/TaskManager/Test/test_render/task/update_sgp.cpp Thu Jun 04 00:08:48 2009 +0900 +++ b/TaskManager/Test/test_render/task/update_sgp.cpp Thu Jun 04 00:12:47 2009 +0900 @@ -8,108 +8,6 @@ SchedDefineTask(Update_SGP); -<<<<<<< local -======= -typedef void (*moveFunc)(SceneGraphNodePtr, int, int); -typedef void (*collFunc)(SceneGraphNodePtr, int, int); - -static moveFunc moveList[3]; -static collFunc collList[3]; - -static void -move0(SceneGraphNodePtr node, int w, int h) -{ - static float dest_x = 0.3f; - static float dest_y = 0.5f; - - node->angle[1] += 1.0f; - if (node->angle[1] > 360.0f) { - node->angle[1] = 0.0f; - } - - node->obj_pos[0] += dest_x; - if ((int)node->obj_pos[0] > w || (int)node->obj_pos[0] < 0) { - dest_x = -dest_x; - } - - node->obj_pos[1] += dest_y; - if ((int)node->obj_pos[1] > h || (int)node->obj_pos[1] < 0) { - dest_y = -dest_y; - } -} - -static void -move1(SceneGraphNodePtr node, int w, int h) -{ - node->angle[1] += 1.0f; - if (node->angle[1] > 360.0f) { - node->angle[1] = 0.0f; - } - - static float dest_x = 0.5f; - static float dest_y = 1.3f; - - node->obj_pos[0] += dest_x; - if ((int)node->obj_pos[0] > w || (int)node->obj_pos[0] < 0) { - dest_x = -dest_x; - } - - node->obj_pos[1] += dest_y; - if ((int)node->obj_pos[1] > h || (int)node->obj_pos[1] < 0) { - dest_y = -dest_y; - } -} - -static void -move2(SceneGraphNodePtr node, int w, int h) -{ - node->angle[1] += 1.0f; - if (node->angle[1] > 360.0f) { - node->angle[1] = 0.0f; - } - - static float dest_x = 1.0f; - static float dest_y = 0.8f; - - node->obj_pos[0] += dest_x; - if ((int)node->obj_pos[0] > w || (int)node->obj_pos[0] < 0) { - dest_x = -dest_x; - } - - node->obj_pos[1] += dest_y; - if ((int)node->obj_pos[1] > h || (int)node->obj_pos[1] < 0) { - dest_y = -dest_y; - } -} - -static void -move4(SceneGraphNodePtr node, int w, int h) -{ - node->angle[1] += 1.0f; - if (node->angle[1] > 360.0f) { - node->angle[1] = 0.0f; - } -} - - -static void -coll(SceneGraphNodePtr node, int w, int h) -{ -} - -static void -init(void) -{ - moveList[0] = move0; - moveList[1] = move4; - moveList[2] = move2; - - collList[0] = coll; - collList[1] = coll; - collList[2] = coll; -} - ->>>>>>> other int Update_SGP::run(void *rbuf, void *wbuf) {
--- a/TaskManager/Test/test_render/viewer.cpp Thu Jun 04 00:08:48 2009 +0900 +++ b/TaskManager/Test/test_render/viewer.cpp Thu Jun 04 00:12:47 2009 +0900 @@ -336,9 +336,7 @@ //break; // Draw Background (憜紂ゃ吟) task_draw = manager->create_task(TASK_DRAW_BACK); -<<<<<<< local task_draw->add_param(0xffffffff); -<<<<<<< local for (int k = 0; k < rangey; k++) { task_draw->add_outData( @@ -352,23 +350,6 @@ //0xFFFFFFFF, (this->width)*sizeof(int)*rangey/sizeof(wchar_t)); break; #endif -======= -======= -<<<<<<< local - task_draw->add_param(0xffffff); -======= - //task_draw->add_param(0x00ffcc55); - task_draw->add_param(0); -//task_draw->add_param(st_rgb); ->>>>>>> other ->>>>>>> other - } - - for (int k = 0; k < rangey; k++) { - task_draw->add_outData( - &pixels[(startx-1)+this->width*(k+starty-1)], - (endx - startx + 1)*sizeof(int)); ->>>>>>> other } task_draw->add_param(startx);
--- a/TaskManager/kernel/main.cc Thu Jun 04 00:08:48 2009 +0900 +++ b/TaskManager/kernel/main.cc Thu Jun 04 00:12:47 2009 +0900 @@ -1,6 +1,5 @@ #include <stdlib.h> -//#include <string.h> -#include <string> +#include <string.h> #include <SDL.h> #include "TaskManager.h" @@ -12,15 +11,7 @@ defaultTMend(void) {} TaskManager *manager; -<<<<<<< local -<<<<<<< local -static std::string help_str = "\n\ -======= -static char help_str[] = "\n\ ->>>>>>> other -======= const char *help_str = "\n\ ->>>>>>> other * Cerium program option *\n\ -help Print this message \n\ -cpu Number of CPU (default 1) \n";
--- a/example/HelloWorld/Makefile.def Thu Jun 04 00:08:48 2009 +0900 +++ b/example/HelloWorld/Makefile.def Thu Jun 04 00:12:47 2009 +0900 @@ -5,12 +5,7 @@ #CERIUM = /Users/gongo/Source/Cerium # ex: linux/ps3 -<<<<<<< local -#CERIUM = /home/gongo/Cerium -CERIUM = /Users/e065746/Works/lab/hg/Cerium -======= CERIUM = ../../../Cerium ->>>>>>> other CC = g++ CFLAGS = -g -Wall -O9
--- a/include/TaskManager/CellDmaManager.h Thu Jun 04 00:08:48 2009 +0900 +++ b/include/TaskManager/CellDmaManager.h Thu Jun 04 00:12:47 2009 +0900 @@ -13,9 +13,6 @@ #define SPU_PROFILE 1 -extern unsigned int CellDmaManager::wait_time, CellDmaManager::busy_time; -extern unsigned long long CellDmaManager::global_busy_time, CellDmaManager::global_wait_time; - class CellDmaManager : public DmaManager { public: BASE_NEW_DELETE(CellDmaManager); @@ -26,7 +23,8 @@ } DmaList, *DmaListPtr; /* variables */ - + unsigned int wait_time, busy_time; + unsigned long long global_busy_time, global_wait_time; /* functions */ void dma_load(void *buf, uint32 addr, uint32 size, uint32 mask);
--- a/include/TaskManager/SchedExit.h Thu Jun 04 00:08:48 2009 +0900 +++ b/include/TaskManager/SchedExit.h Thu Jun 04 00:12:47 2009 +0900 @@ -17,13 +17,6 @@ public: BASE_NEW_DELETE(SchedExit); -<<<<<<< local - SchedExit(Scheduler *m) { - scheduler = m; - } - -======= ->>>>>>> other SchedTaskBase* next(Scheduler *, SchedTaskBase *); };