search for: shadowlist

Displaying 6 results from an estimated 6 matches for "shadowlist".

Did you mean: shadow_list
2011 Mar 30
4
a for loop to lapply
Dear all, I am trying to learn lapply. I would like, as a test case, to try the lapply alternative for the Shadowlist<-array(data=NA,dim=c(dimx,dimy,dimmaps)) for (i in c(1:dimx)){ Shadowlist[,,i]<-i } ---so I wrote the following--- returni <-function(i,ShadowMatrix) {ShadowMatrix<-i} lapply(seq(1:dimx),Shadowlist[,,seq(1:dimx)],returni) So far I do not get same results with both ways. Could y...
2011 Apr 27
1
Eval to write many files
Dear all I am looking for a shorter way and more elegant to write the following for (i in c(1:length(Shadowlist))){ filename<-paste('/home/apa/maps/',model,i,'.mat',sep="") varname<-paste(model,'_shadow',i,sep="") eval(parse(text=paste('writeMat(filename,',varname,'=Shadowlist[[i]])',sep=""))) } actually I do not like eval at...
2011 Apr 11
1
Comparing execution times
...lapply will be. I thought it might be interesting for some people to look at the results. Even though are not accurate, still might be a good indicator how much improvement there can be. A.Case. The classic: for 1:100 for (i in c(1:dimz)){ print(sprintf('Creating the %d map',i)); Shadowlist[,,i]<- GaussRF(x=x, y=y, model=model, grid=TRUE,param=c(mean,variance,nugget,scale,Whit.alpha)) } user system elapsed 1825.699 303.100 1063.352 -------------------------------------------------------------------------- B.Case. Same as above but with lapply instead of for Shadowlist...
2011 Apr 11
1
Mclapply and print statement
...am using the mclapply function to split my code to the many cores my system has. It seems that is working fine. This is the parallel version of lcapply. The only problem that I seem to have is that the printf cannot print messages. The ideal to me is to have fro my function an output of the form Shadowlist<-mclapply(1:dimz, function(i) { print(sprintf('Creating the %d map',i)); GaussRF(x=x, y=y, model=model, grid=TRUE,param=c(mean,variance,nugget,scale,Whit.alpha)) } ) 'I am the processor %d and I work with the task %d',processorid,i So far I get no...
2011 Jul 22
0
Mclapply prints once
Dear all I have the following code that works in paraller (and is pretty fast actually) The only problem I still have is that every core just prints only once. dimz<-1000 Shadowlist<-mclapply(1:dimz, function(i) { ????????????????????????????? print(sprintf('Creating the %d map',i)); ????????????????????????????? createField(x=x, y=y, model=model, grid=TRUE,param=c(mean,variance,nugget,scale)) ??????????????????????????? } ??????????? ) In a four core system you...
2011 Sep 23
2
[LLVMdev] What CCAssignToXXXWithShadow means?
Hi, all On the website, it says, CCAssignToRegWithShadow <registerList, shadowList> — similar to CCAssignToReg, but with a shadow list of registers I don't know when we should use CCAssignToRegWithShadow. Because I am not a architecture expert, please bear with my naive question. Take ARMCallingConv.td as an example, CCIfType<[i32], CCIfAlign<"8", CCA...