void egHWU::D2F() { _Yflt.resize(_Y.rows(),_Y.cols()); for(int i=0; i<_Y.rows(); i++){ for(int j=0;j<_Y.cols();j++){ _Yflt(i,j)=float( _Y(i,j) ); } } _Xflt.resize(_X.rows(),_X.cols()); for(int i=0; i<_X.rows(); i++){ for(int j=0;j<_X.cols();j++){ _Xflt(i,j)=float( _X(i,j) ); } } _XXinvflt.resize(_XXinv.rows(),_XXinv.cols()); for(int i=0; i<_XXinv.rows(); i++){ for(int j=0;j<_XXinv.cols();j++){ _XXinvflt(i,j)=float( _XXinv(i,j) ); } } _Kappaflt.resize(_Kappa.rows(),_Kappa.cols()); for(int i=0; i<_Kappa.rows(); i++){ for(int j=0;j<_Kappa.cols();j++){ _Kappaflt(i,j)=float( _Kappa(i,j) ); } } }
void egHWU::rankY() { vector<double> ytmp; ytmp=_org_y; Stat_fuc::crank(ytmp); _Y.resize(_n_sub,1); for(int i=0; i<_n_sub; i++){ _Y(i,0)=ytmp[i]; } }
Real CylindricalBesselGenerator::Y(const UnsignedInteger n, const Real z) const { if(n > getMaxNY()) { return _Y(n, z); } const cb_table::Table* table(getCYTable(n)); assert(table != 0); const Real minz(table->x_start + table->delta_x * 3); const Real maxz(table->x_start + table->delta_x * (table->N-3)); if(z >= minz && z < maxz) { return _Y_table(n, z); } else { return _Y(n, z); } }
FE_TMPL std::complex<float> FE_SYS::_I(int n,int m,glm::vec3 x){ glm::vec3 s = cart2sph(x); return std::pow(std::complex<float>(0,-1),-std::abs(m)) * _A(n,m) * std::pow(s.x,n) * _Y(n,m,s.y,s.z); }
// Now, fill used entries with actual jump addresses. #include "jump_table.h" blr } // ----------------------------------------------------------------------- // This functions loads the PC with the address stored at 0xFFFC // and clears registers which effectively resets the CPU. asm void N6502::_Reset() { li r4,0 // init registers stb r4,_A(r3) stb r4,_X(r3) stb r4,_Y(r3) stw r4,_CycleBK(r3) stw r4,_IntReq(r3) li r5,R_FLAG|Z_FLAG stb r5,_F(r3) li r6,0xFF stb r6,_SP(r3) li r9,0 lwz r7,_MEM_X(r3) // load PC with reset vector ori r9,r9,RESET_VECTOR lwz r7,ROMSeg4_Ind(r7) lhbrx r8,r9,r7 sth r8,_PC(r3) blr
_OPC("ldmidr1", 0x32, F_RR , FS_EXTOP , _Z(TSREG|TLM0M1)), //0x11 _OPC("ldmidr2", 0x32, F_RR , FS_EXTOP , _Z(TSREG|TLM0M1)), //0x12 _OPC("ldmidr3", 0x32, F_RR , FS_EXTOP , _Z(TSREG|TLM0M1)), //0x13 /* TODO: why do we repeat lmir 4 times here?! */ _OPC("lmir" , 0x32, F_RR , FS_EXTOP , _YZ(TSOFT,TSREG|TLM0M1)), //0x14 _OPC("lmir" , 0x32, F_RR , FS_EXTOP , _YZ(TSOFT,TSREG|TLM0M1)), //0x15 _OPC("lmir" , 0x32, F_RR , FS_EXTOP , _YZ(TSOFT,TSREG|TLM0M1)), //0x16 _OPC("lmir" , 0x32, F_RR , FS_EXTOP , _YZ(TSOFT,TSREG|TLM0M1)), //0x17 /* TODO: what is ldpmmr? not documented anywhere ... */ _OPC("ldpmmr", 0x32, F_RR , FS_EXTOP , _Z(TLM0M1)), //0x18 /* originally, ldjidr was _YZ(TSOFT,TSREG|TLM0M1); docs say, it's only _Z(TSREG|TLM0M1) */ _OPC("ldjidr", 0x32, F_RR , FS_EXTOP , _Z(TSREG|TLM0M1)), //0x19 /* TODO: what is ldhrr? not documented anywhere ... */ _OPC("ldhrr" , 0x32, F_RR , FS_EXTOP , _YZ(TSOFT,TSREG|TLM0M1)), //0x1a _OPC("sal" , 0x33, F_RR , 0 , _XZ(TSREG, TSREG|TLM0M1)), _OPC("ldt" , 0x34, F_RR , 0 , _Y(TSREG|TLI127)), _OPC("lex" , 0x35, F_RR , 0 , _Y(TSREG|TLI127)), _OPC("lvx" , 0x36, F_RR , 0 , _Y(TSREG|TLI127)), _OPC("lve" , 0x37, F_RR , 0 , _Y(TSREG|TLI127)), _OPC("inh" , 0x38, F_RR , 0 , _NA), _OPC("eni" , 0x39, F_RR , 0 , _NA), _OPC("lpm" , 0x3a, F_RR , 0 , _Y(TSREG|TLI127)), _OPC("lsm" , 0x3b, F_RR , 0 , _Y(TSREG|TLI127)), _OPC("rcr" , 0x3c, F_RR , 0 , _Y(TLI127)), _OPC("diag" , 0x3d, F_RR , 0 , _Y(TLI127)), _OPC("wait" , 0x3e, F_RR , 0 , _NA), _OPC("monc" , 0x3f, F_RR , 0 , _XYZ(TSOFT, TSOFT, TSOFT)), _OPC("tscr" , 0x40, F_RR , FS_EXTOP , _XYZ(TSREG, TSREG|TLI127, TSREG|TLM0M1)), _OPC("scrns", 0x41, F_RR , FS_EXTOP , _XYZ(TSREG, TSREG|TLI127, TSREG|TLM0M1)), _OPC("ts1am", 0x42, F_RR , 0 , _XYZ(TSREG, TSREG|TLI127, TSREG)), _OPC("ts2am", 0x43, F_RR , 0 , _XYZ(TSREG, TSREG|TLI127, TSREG)),
static struct yaffs_obj *h_find_object(struct yaffs_dev *dev, struct yaffs_obj *dir, const char *pathname, const char **out_of_fs) { YCHAR str[YAFFS_MAX_NAME_LENGTH+1]; int i; char sux[NAME_MAX]; /* RTEMS sometimes calls eval_path with pathloc already pointing to the file to look for * and name being the name of the file. Deal with this case. * And no, I have no idea either. */ if(strchr(pathname, '/') == NULL) { yaffs_get_obj_name(dir, sux, NAME_MAX); if(strcmp(sux, pathname) == 0) return dir; } *out_of_fs = NULL; if(!dev->is_mounted) return NULL; if(dir == NULL) dir = dev->root_dir; while(dir) { /* * parse off /. * curve ball: also throw away surplus '/' * eg. "/ram/x////ff" gets treated the same as "/ram/x/ff" */ while(is_path_divider(*pathname)) pathname++; /* get rid of '/' */ i = 0; str[0] = 0; while(*pathname && !is_path_divider(*pathname)) { if (i < YAFFS_MAX_NAME_LENGTH) { str[i] = *pathname; str[i+1] = '\0'; i++; } pathname++; } if(strcmp(str, _Y(".")) == 0) { /* Do nothing */ } else if(strcmp(str, _Y("..")) == 0) { if(dir->parent != NULL) dir = dir->parent; else { while(is_path_divider(*pathname)) pathname++; /* get rid of '/' */ *out_of_fs = pathname; return NULL; } } else { if(str[0] != 0) { if(dir->variant_type != YAFFS_OBJECT_TYPE_DIRECTORY) return NULL; dir = yaffs_find_by_name(dir, str); } dir = h_follow_link(dir, out_of_fs); } if(!*pathname) /* got to the end of the string */ return dir; } return NULL; }