From f11767af7a702df22597e378614ab707357678db Mon Sep 17 00:00:00 2001 From: Myrice Date: Mon, 6 Oct 2014 15:40:49 -0700 Subject: Fixed mac build fails 1. ptx_sim.h::473, stack cannot use incomplete type "operand_info" which is a forward declaration. The reason is underlying implementation of stack is deque which need a complete type. It is better to remove forward declaration by break circular dependence for future fixes. It is also benefit unit test 2. shader.h::1334, this hack cannot pass clang. Clang does not allow a array with not a explicit size. Please fix this hack by correct implementation as soon as possible 3. The default parameter causes clang to fail because it frustrate the compiler. This is still under discussion whether such implementation is correct. http://stackoverflow.com/questions/18313509/default-argument-gcc-vs-clang. I changed it to two constructors to avoid confusion. --- src/gpuwattch/cacti/nuca.cc | 9 +++++++-- src/gpuwattch/cacti/nuca.h | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'src/gpuwattch') diff --git a/src/gpuwattch/cacti/nuca.cc b/src/gpuwattch/cacti/nuca.cc index 9518791..f31b0c8 100644 --- a/src/gpuwattch/cacti/nuca.cc +++ b/src/gpuwattch/cacti/nuca.cc @@ -42,8 +42,13 @@ unsigned int MIN_BANKSIZE=65536; int cont_stats[2 /*l2 or l3*/][5/* cores */][ROUTER_TYPES][7 /*banks*/][8 /* cycle time */]; - Nuca::Nuca( - TechnologyParameter::DeviceType *dt = &(g_tp.peri_global) +Nuca::Nuca():deviceType(&(g_tp.peri_global)) +{ + init_cont(); +} + +Nuca::Nuca( + TechnologyParameter::DeviceType *dt ):deviceType(dt) { init_cont(); diff --git a/src/gpuwattch/cacti/nuca.h b/src/gpuwattch/cacti/nuca.h index 89fec19..bbdee7d 100644 --- a/src/gpuwattch/cacti/nuca.h +++ b/src/gpuwattch/cacti/nuca.h @@ -75,6 +75,7 @@ class nuca_org_t { class Nuca : public Component { public: + Nuca(); Nuca( TechnologyParameter::DeviceType *dt); void print_router(); -- cgit v1.3