Results 1 to 5 of 5

Thread: Whrere can I find the sample source about dynamic 'ami' and 'amd'

  1. #1
    cnhome is offline Registered User
    Name: Li Wenzhi
    Organization: FreeLaner
    Project: Train Enquiries for Android
    Join Date
    Apr 2005
    Location
    Beijing, China
    Posts
    64

    Whrere can I find the sample source about dynamic 'ami' and 'amd'

    I read the online manual again. I recognize using dynamic 'ami' and 'amd' can reduce the copy time by using Ice.BaseStream. But I can't find more sample code expect the online manual. Can anybody show me some. Thanks a lot.

  2. #2
    bernard's Avatar
    bernard is offline ZeroC Staff
    Name: Bernard Normier
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Palm Beach Gardens, FL
    Posts
    1,294
    Hi Liwzh,

    The Ice/async demo illustrates both AMI and AMD.

    I recognize using dynamic 'ami' and 'amd' can reduce the copy time by using Ice.BaseStream.
    Can you describe in more details what you are trying to do?

    Cheers,
    Bernard
    Bernard Normier
    ZeroC, Inc.

  3. #3
    cnhome is offline Registered User
    Name: Li Wenzhi
    Organization: FreeLaner
    Project: Train Enquiries for Android
    Join Date
    Apr 2005
    Location
    Beijing, China
    Posts
    64
    For example, I have a big bytes array in which the part is available.

    When using the Ice::ByteSeq, I have no choice but copy this. Beacause I can't give the function such as 'writeByteSeq(byte[],int offset,int length)' function.

    Is there any way not to do this extra copy? !

  4. #4
    bernard's Avatar
    bernard is offline ZeroC Staff
    Name: Bernard Normier
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Palm Beach Gardens, FL
    Posts
    1,294
    This byte-array optimization is unrelated to AMI or AMD.

    The relevant Ice for Java feature is "metadata", which allows you select the Java type used by Ice for your Slice types/parameters: Customizing the Java Mapping

    But unfortunately, there is no Java metadata that allows you to send just a subset of a byte-array. (We have such metadata in C++, but not Java).

    The only solution I see is creating a temporary array for your sub-array, using for example System.arraycopy.

    Cheers,
    Bernard
    Bernard Normier
    ZeroC, Inc.

  5. #5
    cnhome is offline Registered User
    Name: Li Wenzhi
    Organization: FreeLaner
    Project: Train Enquiries for Android
    Join Date
    Apr 2005
    Location
    Beijing, China
    Posts
    64
    I see. Thanks!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to find the master-slave source code
    By hisensewxz in forum Help Center
    Replies: 2
    Last Post: 09-27-2009, 04:19 AM
  2. AMD - AMI interactions
    By gesly in forum Help Center
    Replies: 14
    Last Post: 04-11-2007, 03:54 PM
  3. Asynchronous - AMI and AMD
    By mohdiarra in forum Help Center
    Replies: 10
    Last Post: 10-18-2006, 09:30 PM
  4. IceE and AMI/AMD
    By albertods in forum Help Center
    Replies: 1
    Last Post: 10-11-2006, 02:34 PM
  5. AMD Sample
    By enzo in forum Help Center
    Replies: 5
    Last Post: 12-08-2004, 09:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •