java.nio.IntBuffer#capacity ( )源码实例Demo

下面列出了java.nio.IntBuffer#capacity ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: BIMserver   文件: GeometryRunner.java
private boolean detectTwoFaceTriangles(HashMapVirtualObject ifcProduct, IntBuffer indicesAsInt, DoubleBuffer verticesAsDouble, float margin) {
	Set<ComplexLine2> complexLines = new TreeSet<>();
	for (int i=0; i<indicesAsInt.capacity(); i+=3) {
		for (int j=0; j<3; j++) {
			int index1 = indicesAsInt.get(i + j);
			int index2 = indicesAsInt.get(i + (j + 1) % 3);
			
			ComplexLine2 line2 = new ComplexLine2(index1, index2, verticesAsDouble, margin);
			if (complexLines.contains(line2)) {
				complexLines.remove(line2);
			} else {
				complexLines.add(line2);
			}
		}
	}
	if (!complexLines.isEmpty()) {
		LOGGER.debug("Probably a non-closed object in " + ifcProduct.eClass().getName() + " (" + complexLines.size() + ")");
		return true;
	}
	return false;
}
 
@Test
public void T_chooseDictionaryIndexMaker_Short_1() throws IOException{
  UnsafeOptimizeLongColumnBinaryMaker.IDictionaryIndexMaker indexMaker = UnsafeOptimizeLongColumnBinaryMaker.chooseDictionaryIndexMaker( 0xFFFF );
  assertEquals( ( Short.BYTES * -1 ) , indexMaker.calcBinarySize( -1 ) );
  assertEquals( ( Short.BYTES * 0 ) , indexMaker.calcBinarySize( 0 ) );
  assertEquals( ( Short.BYTES * 256 ) , indexMaker.calcBinarySize( 256 ) );

  int[] dicIndex = new int[128];
  for( int i = 0,n = ( 0xFFFF - 256 ) ; i < dicIndex.length ; i++,n+=2 ){
    dicIndex[i] = n;
  }
  byte[] b = new byte[indexMaker.calcBinarySize( dicIndex.length ) ];
  indexMaker.create( dicIndex , b , 0 , b.length , ByteOrder.nativeOrder() );
  IntBuffer intBuffer = indexMaker.getIndexIntBuffer( b , 0 , b.length , ByteOrder.nativeOrder() );
  for( int i = 0 ; i < intBuffer.capacity() ; i++ ){
    assertEquals( dicIndex[i] , intBuffer.get() );
  }
}
 
@Test
public void T_chooseDictionaryIndexMaker_Byte_1() throws IOException{
  UnsafeOptimizeLongColumnBinaryMaker.IDictionaryIndexMaker indexMaker = UnsafeOptimizeLongColumnBinaryMaker.chooseDictionaryIndexMaker( 127 );
  assertEquals( ( Byte.BYTES * -1 ) , indexMaker.calcBinarySize( -1 ) );
  assertEquals( ( Byte.BYTES * 0 ) , indexMaker.calcBinarySize( 0 ) );
  assertEquals( ( Byte.BYTES * 256 ) , indexMaker.calcBinarySize( 256 ) );

  int[] dicIndex = new int[128];
  for( int i = 0,n = 0 ; i < dicIndex.length ; i++,n+=2 ){
    dicIndex[i] = n;
  }
  byte[] b = new byte[indexMaker.calcBinarySize( dicIndex.length ) ];
  indexMaker.create( dicIndex , b , 0 , b.length , ByteOrder.nativeOrder() );
  IntBuffer intBuffer = indexMaker.getIndexIntBuffer( b , 0 , b.length , ByteOrder.nativeOrder() );
  for( int i = 0 ; i < intBuffer.capacity() ; i++ ){
    assertEquals( dicIndex[i] , intBuffer.get() );
  }
}
 
@Test
public void T_chooseDictionaryIndexMaker_Short_1() throws IOException{
  UnsafeOptimizeLongColumnBinaryMaker.IDictionaryIndexMaker indexMaker = UnsafeOptimizeLongColumnBinaryMaker.chooseDictionaryIndexMaker( 0xFFFF );
  assertEquals( ( Short.BYTES * -1 ) , indexMaker.calcBinarySize( -1 ) );
  assertEquals( ( Short.BYTES * 0 ) , indexMaker.calcBinarySize( 0 ) );
  assertEquals( ( Short.BYTES * 256 ) , indexMaker.calcBinarySize( 256 ) );

  int[] dicIndex = new int[128];
  for( int i = 0,n = ( 0xFFFF - 256 ) ; i < dicIndex.length ; i++,n+=2 ){
    dicIndex[i] = n;
  }
  byte[] b = new byte[indexMaker.calcBinarySize( dicIndex.length ) ];
  indexMaker.create( dicIndex , b , 0 , b.length , ByteOrder.nativeOrder() );
  IntBuffer intBuffer = indexMaker.getIndexIntBuffer( b , 0 , b.length , ByteOrder.nativeOrder() );
  for( int i = 0 ; i < intBuffer.capacity() ; i++ ){
    assertEquals( dicIndex[i] , intBuffer.get() );
  }
}
 
源代码5 项目: JglTF   文件: ImageUtils.java
/**
 * Interpret the given byte buffer as pixels, swizzle the bytes
 * of these pixels according to the given shifts, and return a 
 * a direct byte buffer containing the corresponding new pixels
 * 
 * @param pixels The input pixels
 * @param s0 The right-shift for byte 0 
 * @param s1 The right-shift for byte 1 
 * @param s2 The right-shift for byte 2
 * @param s3 The right-shift for byte 3
 * @return The output pixels
 */
private static ByteBuffer swizzle(ByteBuffer pixels,
    int s0, int s1, int s2, int s3)
{
    IntBuffer iBuffer = pixels.asIntBuffer();
    ByteBuffer oByteBuffer = ByteBuffer
        .allocateDirect(iBuffer.capacity() * Integer.BYTES)
        .order(pixels.order());
    IntBuffer oBuffer = oByteBuffer.asIntBuffer();
    for (int i = 0; i < iBuffer.capacity(); i++)
    {
        int input = iBuffer.get(i);
        int output = swizzle(input, s0, s1, s2, s3);
        oBuffer.put(i, output);
    }
    return oByteBuffer;
}
 
源代码6 项目: netcdf-java   文件: TestStructureArrayBB.java
private void fillStructureArray(ArrayStructureBB sa) {
  ByteBuffer bb = sa.getByteBuffer();
  IntBuffer ibb = bb.asIntBuffer();
  int count = 0;
  for (int i = 0; i < ibb.capacity(); i++)
    ibb.put(i, count++);
}
 
源代码7 项目: MikuMikuStudio   文件: FloatToFixed.java
private static void convertToFloat(IntBuffer input, FloatBuffer output){
    if (output.capacity() < input.capacity())
        throw new RuntimeException("Output must be at least as large as input!");

    input.clear();
    output.clear();
    for (int i = 0; i < input.capacity(); i++){
        output.put( ((float)input.get() / (float)(1<<16)) );
    }
    output.flip();
}
 
源代码8 项目: netty-4.1.22   文件: UnitHelp.java
/**
 * Display contents of a buffer.
 */
public static void logBuffer(final String title, final IntBuffer buffer) {
    for (int index = 0; index < buffer.capacity(); index++) {
        final int value = buffer.get(index);
        if (value == 0) {
            continue;
        }
        log.info(String.format("%s [id: 0x%08x]", title, value));
    }
}
 
源代码9 项目: netty-4.1.22   文件: UnitHelp.java
public static boolean socketPresent(final SocketUDT socket,
        final IntBuffer buffer) {
    for (int index = 0; index < buffer.capacity(); index++) {
        if (buffer.get(index) == socket.id()) {
            return true;
        }
    }
    return false;
}
 
源代码10 项目: JglTF   文件: Buffers.java
/**
 * Convert the given input buffer into a direct byte buffer with native
 * byte order, by casting all elements to <code>byte</code>.
 * 
 * @param buffer The input buffer
 * @return The byte buffer
 */
public static ByteBuffer castToByteBuffer(IntBuffer buffer)
{
    ByteBuffer byteBuffer = 
        ByteBuffer.allocateDirect(buffer.capacity())
        .order(ByteOrder.nativeOrder());
    for (int i = 0; i < buffer.capacity(); i++)
    {
        byteBuffer.put(i, (byte) buffer.get(i));
    }
    return byteBuffer;
}
 
protected long getOffHeapMemUsed() {
  ValueToDictId valueToDictId = _valueToDict;
  long size = 0;
  for (IntBuffer iBuf : valueToDictId._iBufList) {
    size = size + iBuf.capacity() * Integer.BYTES;
  }
  return size;
}
 
public ArrayCellManager( final Spread spread , final IntBuffer buffer ){
  int length = buffer.capacity();
  cellArray = new ICell[length];
  int currentIndex = 0;
  for( int i = 0 ; i < length ; i++ ){
    int arrayLength = buffer.get();
    if( arrayLength != 0 ){
      int start = currentIndex;
      int end = start + arrayLength;
      cellArray[i] = new ArrayCell( new SpreadArrayLink( spread , i , start , end ) );
      currentIndex += arrayLength;
    }
  }
}
 
源代码13 项目: systemsgenetics   文件: HashingOutputStream.java
public static String hashString(byte[] bytes) {
    // assumes hash is a multiple of 4
    IntBuffer ib = ByteBuffer.wrap(bytes).asIntBuffer();
    StringBuilder sb = new StringBuilder();
    while (ib.position() < ib.capacity()) {
        long val = ib.get();
        if (val < 0) {
            val = -val + Integer.MAX_VALUE;
        }
        sb.append(Long.toString(val, 36));
    }
    return sb.toString();
}
 
源代码14 项目: Kylin   文件: BitMapContainer.java
private ConciseSet bytesToSet(ImmutableBytesWritable bytes) {
    if (bytes.get() == null || bytes.getLength() == 0) {
        return new ConciseSet();
    } else {
        IntBuffer intBuffer = ByteBuffer.wrap(bytes.get(), bytes.getOffset(), bytes.getLength()).asIntBuffer();
        int[] words = new int[intBuffer.capacity()];
        intBuffer.get(words);
        return new ConciseSet(words, false);
    }
}
 
源代码15 项目: tango   文件: FrameRenderer.java
@Override
public void onDrawFrame(GL10 gl) {
    activity_.updateTexture(TangoCameraIntrinsics.TANGO_CAMERA_COLOR);

    if (!saveNextFrame_) {
        glBindBuffer(GL_ARRAY_BUFFER, videoVertexBuffer_);
        glVertexAttribPointer(videoVertexAttribute_, 2, GL_BYTE, false, 0, 0);
        glEnableVertexAttribArray(videoVertexAttribute_);
        glActiveTexture(GL_TEXTURE0);
        glBindTexture(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, videoTextureName_);
        glTexParameteri(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
        glTexParameteri(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
        glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
    }
    else {
        Log.i(activity_.TAG, "Saving Image");
        // Switch to the offscreen buffer.
        glBindFramebuffer(GL_FRAMEBUFFER, offscreenBuffer_);

        // Save current viewport and change to offscreen size.
        IntBuffer viewport = IntBuffer.allocate(4);
        glGetIntegerv(GL_VIEWPORT, viewport);
        glViewport(0, 0, offscreenSize_.x, offscreenSize_.y);

        // Render in capture mode. Setting this flags tells the shader
        // program to draw the texture right-side up and change the color
        // order to ARGB for compatibility with Bitmap.
        glUniform1i(glGetUniformLocation(videoProgram_, "cap"), 1);

        // Render.
        glBindBuffer(GL_ARRAY_BUFFER, videoVertexBuffer_);
        glVertexAttribPointer(videoVertexAttribute_, 2, GL_BYTE, false, 0, 0);
        glEnableVertexAttribArray(videoVertexAttribute_);
        glActiveTexture(GL_TEXTURE0);
        glBindTexture(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, videoTextureName_);
        glTexParameteri(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
        glTexParameteri(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
        glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);

        // Read offscreen buffer.
        IntBuffer intBuffer = ByteBuffer.allocateDirect(offscreenSize_.x * offscreenSize_.y * 4)
                .order(ByteOrder.nativeOrder())
                .asIntBuffer();
        glReadPixels(0, 0, offscreenSize_.x, offscreenSize_.y, GL_RGBA, GL_UNSIGNED_BYTE, intBuffer.rewind());

        // Restore onscreen state.
        glBindFramebuffer(GL_FRAMEBUFFER, 0);
        glViewport(viewport.get(0), viewport.get(1), viewport.get(2), viewport.get(3));
        glUniform1i(glGetUniformLocation(videoProgram_, "cap"), 0);

        // Convert to an array for Bitmap.createBitmap().
        int[] pixels = new int[intBuffer.capacity()];
        intBuffer.rewind();
        intBuffer.get(pixels);
        saveNextFrame_ = false;

        try {
            // Create/access a pictures subdirectory.
            File directory = new File(
                    Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS),
                    "myScans");
            if (!directory.mkdirs() && !directory.isDirectory()) {
                Toast.makeText(
                        activity_,
                        "Could not access save directory",
                        Toast.LENGTH_SHORT).show();
                return;
            }

            // Get the current capture index to construct a unique filename.
            SharedPreferences prefs = activity_.getPreferences(Context.MODE_PRIVATE);

            // Create the capture file.
            String filename = String.format("tango%05d.png", activity_.scanNumber-1);
            Log.i(activity_.TAG, String.format("Saving to %s", filename));
            File file = new File(directory, filename);
            FileOutputStream fileOutputStream = new FileOutputStream(file);

            // Bitmap conveniently provides file output.
            Bitmap bitmap = Bitmap.createBitmap(pixels, offscreenSize_.x, offscreenSize_.y, Bitmap.Config.ARGB_8888);
            bitmap.compress(Bitmap.CompressFormat.PNG, 90, fileOutputStream);
            fileOutputStream.close();

            // Make the new file visible to other apps.
            activity_.sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, Uri.fromFile(file)));
        }
        catch (Exception e) {
            e.printStackTrace();
        }
    }
}
 
源代码16 项目: netty4.0.27Learn   文件: UnitHelp.java
/**
 * Zero out buffer.
 */
public static void clear(final IntBuffer buffer) {
    for (int index = 0; index < buffer.capacity(); index++) {
        buffer.put(index, 0);
    }
}
 
源代码17 项目: offheap-store   文件: OffHeapHashMap.java
@Override
public long getTableCapacity() {
  IntBuffer table = hashtable;
  return table == null ? 0 : table.capacity() / ENTRY_SIZE;
}
 
public BufferDirectDictionaryLinkCellManager( final ColumnType columnType , final IDicManager dicManager , final IntBuffer dicIndexIntBuffer ){
  this.columnType = columnType;
  this.dicManager = dicManager;
  this.dicIndexIntBuffer = dicIndexIntBuffer;
  indexSize = dicIndexIntBuffer.capacity();
}
 
源代码19 项目: jogl-samples   文件: Gl_450_query_statistics_arb.java
@Override
protected boolean render(GL gl) {

    GL4 gl4 = (GL4) gl;

    {
        gl4.glBindBuffer(GL_UNIFORM_BUFFER, bufferName.get(Buffer.TRANSFORM));
        ByteBuffer pointer = gl4.glMapBufferRange(GL_UNIFORM_BUFFER, 0, Mat4.SIZE,
                GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_BUFFER_BIT);

        Mat4 projection = glm.perspectiveFov_((float) Math.PI * 0.25f, windowSize.x, windowSize.y, 0.1f, 100.0f);
        Mat4 model = new Mat4(1.0f);
        pointer.asFloatBuffer().put(projection.mul(viewMat4()).mul(model).toFa_());

        // Make sure the uniform buffer is uploaded
        gl4.glUnmapBuffer(GL_UNIFORM_BUFFER);
    }

    gl4.glViewportIndexedf(0, 0, 0, windowSize.x, windowSize.y);
    gl4.glClearBufferfv(GL_COLOR, 0, new float[]{1.0f, 1.0f, 1.0f, 1.0f}, 0);

    gl4.glBindProgramPipeline(pipelineName.get(0));
    gl4.glActiveTexture(GL_TEXTURE0);
    gl4.glBindTexture(GL_TEXTURE_2D_ARRAY, textureName.get(0));
    gl4.glBindVertexArray(vertexArrayName.get(0));
    gl4.glBindBufferBase(GL_UNIFORM_BUFFER, Semantic.Uniform.TRANSFORM0, bufferName.get(Buffer.TRANSFORM));

    gl4.glBeginQuery(GL_VERTICES_SUBMITTED_ARB, queryName.get(Statistics.VERTICES_SUBMITTED));
    gl4.glBeginQuery(GL_PRIMITIVES_SUBMITTED_ARB, queryName.get(Statistics.PRIMITIVES_SUBMITTED));
    gl4.glBeginQuery(GL_VERTEX_SHADER_INVOCATIONS_ARB, queryName.get(Statistics.VERTEX_SHADER_INVOCATIONS));
    gl4.glBeginQuery(GL_TESS_CONTROL_SHADER_PATCHES_ARB, queryName.get(Statistics.TESS_CONTROL_SHADER_PATCHES));
    gl4.glBeginQuery(GL_TESS_EVALUATION_SHADER_INVOCATIONS_ARB,
            queryName.get(Statistics.TESS_EVALUATION_SHADER_INVOCATIONS));
    gl4.glBeginQuery(GL_GEOMETRY_SHADER_INVOCATIONS, queryName.get(Statistics.GEOMETRY_SHADER_INVOCATIONS));
    gl4.glBeginQuery(GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED_ARB,
            queryName.get(Statistics.GEOMETRY_SHADER_PRIMITIVES_EMITTED));
    gl4.glBeginQuery(GL_FRAGMENT_SHADER_INVOCATIONS_ARB, queryName.get(Statistics.FRAGMENT_SHADER_INVOCATIONS));
    gl4.glBeginQuery(GL_COMPUTE_SHADER_INVOCATIONS_ARB, queryName.get(Statistics.COMPUTE_SHADER_INVOCATIONS));
    gl4.glBeginQuery(GL_CLIPPING_INPUT_PRIMITIVES_ARB, queryName.get(Statistics.CLIPPING_INPUT_PRIMITIVES));
    gl4.glBeginQuery(GL_CLIPPING_OUTPUT_PRIMITIVES_ARB, queryName.get(Statistics.CLIPPING_OUTPUT_PRIMITIVES));
    {
        gl4.glDrawElementsInstancedBaseVertexBaseInstance(GL_TRIANGLES, elementCount, GL_UNSIGNED_SHORT, 0, 1, 0, 0);
    }
    gl4.glEndQuery(GL_VERTICES_SUBMITTED_ARB);
    gl4.glEndQuery(GL_PRIMITIVES_SUBMITTED_ARB);
    gl4.glEndQuery(GL_VERTEX_SHADER_INVOCATIONS_ARB);
    gl4.glEndQuery(GL_TESS_CONTROL_SHADER_PATCHES_ARB);
    gl4.glEndQuery(GL_TESS_EVALUATION_SHADER_INVOCATIONS_ARB);
    gl4.glEndQuery(GL_GEOMETRY_SHADER_INVOCATIONS);
    gl4.glEndQuery(GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED_ARB);
    gl4.glEndQuery(GL_FRAGMENT_SHADER_INVOCATIONS_ARB);
    gl4.glEndQuery(GL_COMPUTE_SHADER_INVOCATIONS_ARB);
    gl4.glEndQuery(GL_CLIPPING_INPUT_PRIMITIVES_ARB);
    gl4.glEndQuery(GL_CLIPPING_OUTPUT_PRIMITIVES_ARB);

    IntBuffer queryResult = GLBuffers.newDirectIntBuffer(Statistics.MAX);
    for (int i = 0; i < queryResult.capacity(); ++i) {
        gl4.glGetQueryObjectuiv(queryName.get(i), GL_QUERY_RESULT, queryResult);
    }
    System.out.println("Verts: " + queryResult.get(Statistics.VERTICES_SUBMITTED)
            + "; Prims: (" + queryResult.get(Statistics.PRIMITIVES_SUBMITTED) + ", "
            + queryResult.get(Statistics.GEOMETRY_SHADER_PRIMITIVES_EMITTED)
            + "); Shaders(" + queryResult.get(Statistics.VERTEX_SHADER_INVOCATIONS) + ", "
            + queryResult.get(Statistics.TESS_CONTROL_SHADER_PATCHES) + ", "
            + queryResult.get(Statistics.TESS_EVALUATION_SHADER_INVOCATIONS) + ", "
            + queryResult.get(Statistics.GEOMETRY_SHADER_INVOCATIONS) + ", "
            + queryResult.get(Statistics.FRAGMENT_SHADER_INVOCATIONS) + ", "
            + queryResult.get(Statistics.COMPUTE_SHADER_INVOCATIONS)
            + "); Clip(" + queryResult.get(Statistics.CLIPPING_INPUT_PRIMITIVES) + ", "
            + queryResult.get(Statistics.CLIPPING_OUTPUT_PRIMITIVES) + ")\r");

    return true;
}
 
源代码20 项目: jogl-samples   文件: Gl_430_perf_monitor_amd.java
public Monitor(GL2 gl2, Gl_430_perf_monitor_amd app) {

            name = GLBuffers.newDirectIntBuffer(1);

            int GROUP_NAME_SIZE = 256;

            IntBuffer groupSize = GLBuffers.newDirectIntBuffer(1);
            gl2.glGetPerfMonitorGroupsAMD(groupSize, 0, null);

            IntBuffer groups_ = GLBuffers.newDirectIntBuffer(groupSize.get(0));
            gl2.glGetPerfMonitorGroupsAMD(null, groupSize.get(0), groups_);

            for (int groupIndex = 0; groupIndex < groups_.capacity(); groupIndex++) {

                ByteBuffer groupName = GLBuffers.newDirectByteBuffer(GROUP_NAME_SIZE);
                gl2.glGetPerfMonitorGroupStringAMD(groups_.get(groupIndex), GROUP_NAME_SIZE, null, groupName);

                IntBuffer numCounters = GLBuffers.newDirectIntBuffer(1);
                IntBuffer maxActiveCounters = GLBuffers.newDirectIntBuffer(1);
                gl2.glGetPerfMonitorCountersAMD(groups_.get(groupIndex), numCounters, maxActiveCounters, 0, null);

                IntBuffer counters = GLBuffers.newDirectIntBuffer(numCounters.get(0));
                gl2.glGetPerfMonitorCountersAMD(groups_.get(groupIndex), null, null, numCounters.get(0), counters);

                for (int counterIndex = 0; counterIndex < counters.capacity(); counterIndex++) {

                    ByteBuffer counterName = GLBuffers.newDirectByteBuffer(GROUP_NAME_SIZE);

                    gl2.glGetPerfMonitorCounterStringAMD(groups_.get(groupIndex), counters.get(counterIndex),
                            GROUP_NAME_SIZE, null, counterName);

                    BufferUtils.destroyDirectBuffer(counterName);
                }

                String groupString = "";
                for (int i = 0; i < groupName.capacity(); ++i) {
                    if ((char) (groupName.get(i) & 0xff) == '\0') {
                        break;
                    } else {
                        groupString += (char) (groupName.get(i) & 0xff);
                    }
                }

                groups.put(groups_.get(groupIndex), new Group(groupString, counters));
                stringToGroup.put(groupString, groups_.get(groupIndex));

                BufferUtils.destroyDirectBuffer(groupName);
                BufferUtils.destroyDirectBuffer(numCounters);
                BufferUtils.destroyDirectBuffer(maxActiveCounters);
                BufferUtils.destroyDirectBuffer(counters);
            }

            gl2.glGenPerfMonitorsAMD(1, name);
        }