Displaying 7 results from an estimated 7 matches for "arrayindex".
Did you mean:
array_index
2013 Apr 02
1
R doesn't recognize utils functions, such as arrayIndex( )
Hi all,
When I called arrayIndex(20:23, dim=c(4,3,3)), it says "Error: could not
find function "arrayIndex"in R". So I called ls("package:utils") to see the
functions inside:
[1] "?"
[2] "adist"
[3] "alarm"
[4] "apropos"
[5] "aregexec"
[6]...
2010 Nov 23
6
[LLVMdev] draft rule for naming types/functions/variables
...es, things with small lifetimes where having a simple short name is good, and things with longer lifetimes where you want something descriptive.
>
> For example, naming a variable i here is perfectly fine:
>
> for (unsigned i = 0; i != 100; ++i)
> A[i] = 0;
>
> Naming it "ArrayIndex" would not make it more clear :)
Good point. I actually have this in the example:
828 VehicleMaker m; // Bad (abbreviation and non-descriptive); might be
829 // OK for a local variable if its role is obvious.
I'll reword the rule to match what you have in mind...
2010 Nov 23
0
[LLVMdev] draft rule for naming types/functions/variables
...mes where having a simple short name is good, and things with longer lifetimes where you want something descriptive.
>>
>> For example, naming a variable i here is perfectly fine:
>>
>> for (unsigned i = 0; i != 100; ++i)
>> A[i] = 0;
>>
>> Naming it "ArrayIndex" would not make it more clear :)
>
> Good point. I actually have this in the example:
>
> 828 VehicleMaker m; // Bad (abbreviation and non-descriptive); might be
> 829 // OK for a local variable if its role is obvious.
>
> I'll reword the rule...
2014 Mar 20
0
[PATCH] nvc0/ir: move sample id to second source arg to fix sampler2DMS
...rray source to the front
- if (dim != arg || i->tex.rIndirectSrc >= 0 || i->tex.sIndirectSrc >= 0) {
+ if (i->tex.target.isArray() || i->tex.rIndirectSrc >= 0 || i->tex.sIndirectSrc >= 0) {
LValue *src = new_LValue(func, FILE_GPR); // 0xttxsaaaa
Value *arrayIndex = i->tex.target.isArray() ? i->getSrc(lyr) : NULL;
@@ -728,6 +729,12 @@ NVC0LoweringPass::handleTEX(TexInstruction *i)
i->setSrc(0, src);
}
+ // for nvc0, the sample id ends up being treated as an offset, so we can't
+ // do offset and ms at the same time. on nve0, the...
2014 Aug 08
2
[PATCH 1/3] nvc0/ir: add base tex offset for fermi indirect tex case
...el, bld.mkImm(i->tex.r));
+ }
+ if (tscRel) {
i->setSrc(i->tex.sIndirectSrc, NULL);
+ if (i->tex.s)
+ tscRel = bld.mkOp2v(OP_ADD, TYPE_U32, bld.getScratch(),
+ tscRel, bld.mkImm(i->tex.s));
+ }
Value *arrayIndex = i->tex.target.isArray() ? i->getSrc(lyr) : NULL;
for (int s = dim; s >= 1; --s)
--
1.8.5.5
2010 Nov 29
8
[LLVMdev] draft rule for naming types/functions/variables
...good, and things with longer lifetimes where you want something
> descriptive.
> >>
> >> For example, naming a variable i here is perfectly fine:
> >>
> >> for (unsigned i = 0; i != 100; ++i)
> >> A[i] = 0;
> >>
> >> Naming it "ArrayIndex" would not make it more clear :)
> >
> > Good point. I actually have this in the example:
> >
> > 828 VehicleMaker m; // Bad (abbreviation and non-descriptive); might
> be
> > 829 // OK for a local variable if its role is
> obvious....
2006 Mar 08
0
survival
...53o7a0a4efatcd6e0cedfe5aa0f6 at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
This is a problem how to convert vector indices to array indices. Here
is a general solution utilizing the fact that matrices are stored
column by column in R (this extends to arrays of any dimension):
arrayIndex <- function(i, dim) {
ndim <- length(dim); # number of dimension
v <- cumprod(c(1,dim)); # base
# Allocate return matrix
j <- matrix(NA, nrow=length(i), ncol=ndim);
i <- (i-1); # one-based indices
for (kk in 1:ndim)
j[,kk] <- (i %% v[kk+1])/v[kk];
1 +...