return function (a, b, c) {
	    if ( c === undefined ) {
	 	dima = typed.dim(a);
	 	dimb = typed.dim(b);

		if ( dima.length > dimb.length ) {
		    shape = dima;
		} else {
		    shape = dimb;
		} 
	    	c = b; b = a; a = typed.array(shape, b);
	    }

	    return ops(a, b, c);
	};
	return function (a, b) {
	    if ( b === undefined ) { b = a; a = typed.array(typed.dim(b), b); }

	    return ops(a, b);
	};
Ejemplo n.º 3
0
console.log("inlineY: ", timeit(n, function (){ addYYY(typed.array(typed.dim(f)), f, g); }));
Ejemplo n.º 4
0
console.log("typed O: ", timeit(n, function (){ typed.addeq(typed.array(typed.dim(f)), f, g); }));
Ejemplo n.º 5
0
	});

    //console.log(x.toString())

    x(a, b, c);



    process.exit(0);
}


if ( 0 ) {
    typed.addeq(b, 1);

    typed.print(typed.array([3], "int32", 0));

    a = add(typed.array([3], "int32", 0), b);

    typed.print(b);
    typed.print(a);


    process.exit(0);
}



//x(a, b)
//x = typed({ consider: { a: false }}, "function (a, b ) { a[index[1]] += b }");