public static <A extends RealType<A>> InplaceOp<A> inplace( final OpEnvironment ops, final Class<? extends Op> opType, final A arg, final Object... otherArgs) { return ops.inplace(opType, arg, otherArgs); }
@SuppressWarnings({"rawtypes", "unchecked"}) public static <I, O extends RealType<O>> HybridOp<I, O> hybrid( final OpEnvironment ops, final Class<? extends Op> opType, final I in, final Object... otherArgs) { return (HybridOp) ops.hybrid(opType, RealType.class, in, otherArgs); }
private CustomOpEnvironment( final Context context, final OpEnvironment parent, final Collection<? extends OpInfo> infos) { setContext(context); this.parent = parent; index = new OpIndex(); // NB: If this is not performant and/or dynamic enough, we could create/use // a concatenating collection (see e.g. Guava's Iterables.concat method) // that does not copy all the elements. if (parent != null) index.addOps(parent.infos()); index.addOps(infos); }
/** * Creates an op context with the same configuration as the given parent environment, plus the * specified additional ops. */ public CustomOpEnvironment(final OpEnvironment parent, final Collection<? extends OpInfo> infos) { this(parent.getContext(), parent, infos); }