Examples of sizeOf()


Examples of anvil.core.Any.sizeOf()

          break;
        case IS_INT:
          _access.write(value.toInt());
          break;
        case IS_BINARY:
          n = value.sizeOf();
          if (n > 0) {
            _access.write(value.toBinary(), 0, n);
          }
          break;
        default:
View Full Code Here

Examples of anvil.core.Any.sizeOf()

      try {
        for (int i=0; i<parameters.length; i++) {
          Any param = parameters[i];

          if (param.isBinary()) {
            update(param.toBinary(), 0, param.sizeOf());

          } else if (param instanceof AnyFile) {
            update(context, (File)param.toObject());

          } else if (param instanceof AnyURL) {
View Full Code Here

Examples of anvil.core.Any.sizeOf()

          break;
        case IS_INT:
          _output.write(value.toInt());
          break;
        case IS_BINARY:
          int len = value.sizeOf();
          if (n > 0) {
            _output.write(value.toBinary(), 0, len);
          }
          break;
        default:
View Full Code Here

Examples of anvil.core.Any.sizeOf()

        Any param = parameters[0];
        byte[] data;
        int size;
        if (param.isBinary()) {
          data = param.toBinary();
          size = param.sizeOf();
        } else {
          data = anvil.util.Conversions.getBytes(param.toString());
          size = data.length;
        }
        if (parameters.length > 2) {
View Full Code Here

Examples of anvil.core.Any.sizeOf()

        Any param = parameters[0];
        byte[] data;
        int size;
        if (param.isBinary()) {
          data = param.toBinary();
          size = param.sizeOf();
        } else {
          data = anvil.util.Conversions.getBytes(param.toString());
          size = data.length;
        }
        if (parameters.length > 2) {
View Full Code Here

Examples of anvil.core.Array.sizeOf()

    int length;
    switch(value.typeOf()) {
    case Any.IS_ARRAY:
      {
        Array array = value.toArray();
        ensureSpace(array.sizeOf());
        Enumeration e = array.elements();
        while(e.hasMoreElements()) {
          add((Any)e.nextElement());
        }
      }
View Full Code Here

Examples of com.clearspring.analytics.stream.cardinality.ICardinality.sizeof()

   
    ICardinality other = HyperLogLogPlus.Builder.build(buffer);
   
    // if hll estimator hasn't been allocated yet, just set it equal to the partial
    if (hll == null) {
      LOG.debug("hll is null; other.sizeof = " + other.sizeof());
      hll = other;
      precision = (int) Math.ceil(Math.log(other.sizeof())/Math.log(2.0));
      LOG.debug("precision set to: " + precision);
    } else {
      hll.merge(other);
View Full Code Here

Examples of com.clearspring.analytics.stream.cardinality.ICardinality.sizeof()

   
    // if hll estimator hasn't been allocated yet, just set it equal to the partial
    if (hll == null) {
      LOG.debug("hll is null; other.sizeof = " + other.sizeof());
      hll = other;
      precision = (int) Math.ceil(Math.log(other.sizeof())/Math.log(2.0));
      LOG.debug("precision set to: " + precision);
    } else {
      hll.merge(other);
    }
  }
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.jol.datamodel.CurrentDataModel.sizeOf()

                int scale = VMSupport.U.arrayIndexScale(Class.forName(data.arrayClass()));

                int instanceSize = VMSupport.align(base + (data.arrayLength()) * scale, 8);

                SortedSet<FieldLayout> result = new TreeSet<FieldLayout>();
                result.add(new FieldLayout(FieldData.create(data.arrayClass(), "length", "int"), model.headerSize(), model.sizeOf("int")));
                result.add(new FieldLayout(FieldData.create(data.arrayClass(), "<elements>", data.arrayComponentType()), base, scale * data.arrayLength()));
                return new ClassLayout(data, result, model.headerSize(), instanceSize, false);
            } catch (ClassNotFoundException e) {
                throw new IllegalStateException("Should not reach here.", e);
            }
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.jol.datamodel.CurrentDataModel.sizeOf()

        Collection<FieldData> fields = data.fields();

        SortedSet<FieldLayout> result = new TreeSet<FieldLayout>();
        for (FieldData f : fields) {
            result.add(new FieldLayout(f, f.vmOffset(), model.sizeOf(f.typeClass())));
        }

        int instanceSize;
        if (result.isEmpty()) {
            instanceSize = VMSupport.align(model.headerSize());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.