You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Nico Blodow (Created) (JIRA)" <de...@uima.apache.org> on 2011/12/12 13:52:30 UTC

[jira] [Created] (UIMA-2307) BasicArrayFS has two unimplemented Functions: copyToArray, copyFromArray.

BasicArrayFS has two unimplemented Functions: copyToArray, copyFromArray.
-------------------------------------------------------------------------

                 Key: UIMA-2307
                 URL: https://issues.apache.org/jira/browse/UIMA-2307
             Project: UIMA
          Issue Type: Bug
          Components: C++ Framework
         Environment: Ubuntu 11.10
            Reporter: Nico Blodow
         Attachments: first_impl_of_copyToArray_and_copyFromArray_for_ByteArrayFS.patch

When trying to use any non-atomic type in an ArrayFS, two functions are vital to copy from / to the FS:

void 	copyToArray (size_t uiStart, size_t uiEnd, T *destArray, size_t uiDestOffset) const 
void 	copyFromArray (T const *sourceArray, size_t uiStart, size_t uiEnd, size_t uiOffset)

As far as I can tell, these need FSHeap::get8BitArray etc to be public.

These raise a NotYetImplementedError. Will attach a patch if I find out how to.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Re: [jira] [Commented] (UIMA-2307) BasicArrayFS has two unimplemented Functions: copyToArray, copyFromArray.

Posted by Bhavani Iyer <bh...@gmail.com>.
Nico
Thanks for testing and reporting.
I'd like to modify the API to be consistent with the method in UIMA Java.
The two methods would be as follows:
/**
   * Copy the contents of the array from <code>start</code> for
<code>length</code> to the
   * destination <code>destArray</code> with destination offset
<code>destOffset</code>.
   *
   * @param srcOffset      The index of the first element to copy.
   * @param destArray         The array to copy to.
   * @param destOffset    Where to start copying into <code>dest</code>.
   * @param length        The number of elements to copy.
   * @throws InvalidFSObjectException
   * @throws FSArrayOutOfBoundsException
   *        If <code>srcOffset &lt; 0</code> or <code>length >
size()</code> or
   *        <code>destOffset + length > destArray.length</code>.
   */
  void copyToArray(size_t srcOffset, T * destArray, size_t destOffset,
size_t length) const ;


 /**
   * Copy the contents of an external array into this array.
   *
   * @param srcArray          The source array.
   * @param srcOffset    Where to start copying in the source array.
   * @param destOffset   Where to start copying to in the destination array.
   * @param length       The number of elements to copy.
   * @throws InvalidFSObjectException
   * @throws FSArrayOutOfBoundsException If <code>srcOffset or destOffset
&lt; 0</code>
   * or <code>length > size()</code> or
   * <code>destOffset + length > size()</code>.
   */

  void copyFromArray(T const * srcArray, size_t srcOffset, size_t
destOffset, size_t length) ;

 Please let me know if that would be ok ,
Bhavani

On Fri, Jan 27, 2012 at 5:31 AM, Nico Blodow (Commented) (JIRA) <
dev@uima.apache.org> wrote:

>
>    [
> https://issues.apache.org/jira/browse/UIMA-2307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13194596#comment-13194596]
>
> Nico Blodow commented on UIMA-2307:
> -----------------------------------
>
> Cool, thank you Bhavani!
>
> There is just one minor issue left, the API says that uiEnd is supposed to
> be the length, but right now it treats it as length-1, so if you want to
> copy an array of length 10, you have to pass it 9 (which is the index of
> the last element).
>
> > BasicArrayFS has two unimplemented Functions: copyToArray, copyFromArray.
> > -------------------------------------------------------------------------
> >
> >                 Key: UIMA-2307
> >                 URL: https://issues.apache.org/jira/browse/UIMA-2307
> >             Project: UIMA
> >          Issue Type: Bug
> >          Components: C++ Framework
> >         Environment: Ubuntu 11.10
> >            Reporter: Nico Blodow
> >            Assignee: Bhavani Iyer
> >             Fix For: 2.4.0C
> >
> >         Attachments:
> first_impl_of_copyToArray_and_copyFromArray_for_ByteArrayFS.patch
> >
> >
> > When trying to use any non-atomic type in an ArrayFS, two functions are
> vital to copy from / to the FS:
> > void  copyToArray (size_t uiStart, size_t uiEnd, T *destArray, size_t
> uiDestOffset) const
> > void  copyFromArray (T const *sourceArray, size_t uiStart, size_t uiEnd,
> size_t uiOffset)
> > As far as I can tell, these need FSHeap::get8BitArray etc to be public.
> > These raise a NotYetImplementedError. Will attach a patch if I find out
> how to.
>
> --
> This message is automatically generated by JIRA.
> If you think it was sent incorrectly, please contact your JIRA
> administrators:
> https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
>

[jira] [Updated] (UIMA-2307) BasicArrayFS has two unimplemented Functions: copyToArray, copyFromArray.

Posted by "Nico Blodow (Updated) (JIRA)" <de...@uima.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-2307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nico Blodow updated UIMA-2307:
------------------------------

    Attachment:     (was: first_impl_of_copyToArray_and_copyFromArray_for_ByteArrayFS.patch)
    
> BasicArrayFS has two unimplemented Functions: copyToArray, copyFromArray.
> -------------------------------------------------------------------------
>
>                 Key: UIMA-2307
>                 URL: https://issues.apache.org/jira/browse/UIMA-2307
>             Project: UIMA
>          Issue Type: Bug
>          Components: C++ Framework
>         Environment: Ubuntu 11.10
>            Reporter: Nico Blodow
>         Attachments: first_impl_of_copyToArray_and_copyFromArray_for_ByteArrayFS.patch
>
>
> When trying to use any non-atomic type in an ArrayFS, two functions are vital to copy from / to the FS:
> void 	copyToArray (size_t uiStart, size_t uiEnd, T *destArray, size_t uiDestOffset) const 
> void 	copyFromArray (T const *sourceArray, size_t uiStart, size_t uiEnd, size_t uiOffset)
> As far as I can tell, these need FSHeap::get8BitArray etc to be public.
> These raise a NotYetImplementedError. Will attach a patch if I find out how to.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (UIMA-2307) BasicArrayFS has two unimplemented Functions: copyToArray, copyFromArray.

Posted by "Bhavani Iyer (Commented) (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13173167#comment-13173167 ] 

Bhavani Iyer commented on UIMA-2307:
------------------------------------

Thanks Nico for reporting this and for the initial implementation.  I've checked in  a modified version that does not require FSHeap nethods to be made public, extended it to support the other primitive types and added test cases.  Copy to/from string arrays and FS arrays are not supported.  
                
> BasicArrayFS has two unimplemented Functions: copyToArray, copyFromArray.
> -------------------------------------------------------------------------
>
>                 Key: UIMA-2307
>                 URL: https://issues.apache.org/jira/browse/UIMA-2307
>             Project: UIMA
>          Issue Type: Bug
>          Components: C++ Framework
>         Environment: Ubuntu 11.10
>            Reporter: Nico Blodow
>         Attachments: first_impl_of_copyToArray_and_copyFromArray_for_ByteArrayFS.patch
>
>
> When trying to use any non-atomic type in an ArrayFS, two functions are vital to copy from / to the FS:
> void 	copyToArray (size_t uiStart, size_t uiEnd, T *destArray, size_t uiDestOffset) const 
> void 	copyFromArray (T const *sourceArray, size_t uiStart, size_t uiEnd, size_t uiOffset)
> As far as I can tell, these need FSHeap::get8BitArray etc to be public.
> These raise a NotYetImplementedError. Will attach a patch if I find out how to.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (UIMA-2307) BasicArrayFS has two unimplemented Functions: copyToArray, copyFromArray.

Posted by "Nico Blodow (Commented) (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13194596#comment-13194596 ] 

Nico Blodow commented on UIMA-2307:
-----------------------------------

Cool, thank you Bhavani!

There is just one minor issue left, the API says that uiEnd is supposed to be the length, but right now it treats it as length-1, so if you want to copy an array of length 10, you have to pass it 9 (which is the index of the last element).
                
> BasicArrayFS has two unimplemented Functions: copyToArray, copyFromArray.
> -------------------------------------------------------------------------
>
>                 Key: UIMA-2307
>                 URL: https://issues.apache.org/jira/browse/UIMA-2307
>             Project: UIMA
>          Issue Type: Bug
>          Components: C++ Framework
>         Environment: Ubuntu 11.10
>            Reporter: Nico Blodow
>            Assignee: Bhavani Iyer
>             Fix For: 2.4.0C
>
>         Attachments: first_impl_of_copyToArray_and_copyFromArray_for_ByteArrayFS.patch
>
>
> When trying to use any non-atomic type in an ArrayFS, two functions are vital to copy from / to the FS:
> void 	copyToArray (size_t uiStart, size_t uiEnd, T *destArray, size_t uiDestOffset) const 
> void 	copyFromArray (T const *sourceArray, size_t uiStart, size_t uiEnd, size_t uiOffset)
> As far as I can tell, these need FSHeap::get8BitArray etc to be public.
> These raise a NotYetImplementedError. Will attach a patch if I find out how to.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (UIMA-2307) BasicArrayFS has two unimplemented Functions: copyToArray, copyFromArray.

Posted by "Nico Blodow (Updated) (JIRA)" <de...@uima.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-2307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nico Blodow updated UIMA-2307:
------------------------------

    Attachment: first_impl_of_copyToArray_and_copyFromArray_for_ByteArrayFS.patch

This implements the resp. functions for the case of ByteArrayFS.
                
> BasicArrayFS has two unimplemented Functions: copyToArray, copyFromArray.
> -------------------------------------------------------------------------
>
>                 Key: UIMA-2307
>                 URL: https://issues.apache.org/jira/browse/UIMA-2307
>             Project: UIMA
>          Issue Type: Bug
>          Components: C++ Framework
>         Environment: Ubuntu 11.10
>            Reporter: Nico Blodow
>         Attachments: first_impl_of_copyToArray_and_copyFromArray_for_ByteArrayFS.patch
>
>
> When trying to use any non-atomic type in an ArrayFS, two functions are vital to copy from / to the FS:
> void 	copyToArray (size_t uiStart, size_t uiEnd, T *destArray, size_t uiDestOffset) const 
> void 	copyFromArray (T const *sourceArray, size_t uiStart, size_t uiEnd, size_t uiOffset)
> As far as I can tell, these need FSHeap::get8BitArray etc to be public.
> These raise a NotYetImplementedError. Will attach a patch if I find out how to.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (UIMA-2307) BasicArrayFS has two unimplemented Functions: copyToArray, copyFromArray.

Posted by "Bhavani Iyer (JIRA)" <de...@uima.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-2307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bhavani Iyer resolved UIMA-2307.
--------------------------------

    Resolution: Fixed
    
> BasicArrayFS has two unimplemented Functions: copyToArray, copyFromArray.
> -------------------------------------------------------------------------
>
>                 Key: UIMA-2307
>                 URL: https://issues.apache.org/jira/browse/UIMA-2307
>             Project: UIMA
>          Issue Type: Bug
>          Components: C++ Framework
>         Environment: Ubuntu 11.10
>            Reporter: Nico Blodow
>            Assignee: Bhavani Iyer
>             Fix For: 2.4.0C
>
>         Attachments: first_impl_of_copyToArray_and_copyFromArray_for_ByteArrayFS.patch
>
>
> When trying to use any non-atomic type in an ArrayFS, two functions are vital to copy from / to the FS:
> void 	copyToArray (size_t uiStart, size_t uiEnd, T *destArray, size_t uiDestOffset) const 
> void 	copyFromArray (T const *sourceArray, size_t uiStart, size_t uiEnd, size_t uiOffset)
> As far as I can tell, these need FSHeap::get8BitArray etc to be public.
> These raise a NotYetImplementedError. Will attach a patch if I find out how to.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (UIMA-2307) BasicArrayFS has two unimplemented Functions: copyToArray, copyFromArray.

Posted by "Bhavani Iyer (Resolved) (JIRA)" <de...@uima.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-2307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bhavani Iyer resolved UIMA-2307.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.4.0C
         Assignee: Bhavani Iyer

Implemented and added test cases.
                
> BasicArrayFS has two unimplemented Functions: copyToArray, copyFromArray.
> -------------------------------------------------------------------------
>
>                 Key: UIMA-2307
>                 URL: https://issues.apache.org/jira/browse/UIMA-2307
>             Project: UIMA
>          Issue Type: Bug
>          Components: C++ Framework
>         Environment: Ubuntu 11.10
>            Reporter: Nico Blodow
>            Assignee: Bhavani Iyer
>             Fix For: 2.4.0C
>
>         Attachments: first_impl_of_copyToArray_and_copyFromArray_for_ByteArrayFS.patch
>
>
> When trying to use any non-atomic type in an ArrayFS, two functions are vital to copy from / to the FS:
> void 	copyToArray (size_t uiStart, size_t uiEnd, T *destArray, size_t uiDestOffset) const 
> void 	copyFromArray (T const *sourceArray, size_t uiStart, size_t uiEnd, size_t uiOffset)
> As far as I can tell, these need FSHeap::get8BitArray etc to be public.
> These raise a NotYetImplementedError. Will attach a patch if I find out how to.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (UIMA-2307) BasicArrayFS has two unimplemented Functions: copyToArray, copyFromArray.

Posted by "Nico Blodow (Updated) (JIRA)" <de...@uima.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-2307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nico Blodow updated UIMA-2307:
------------------------------

    Attachment: first_impl_of_copyToArray_and_copyFromArray_for_ByteArrayFS.patch

Rough implementations for the resp. functions for the cas of ByteArrayFS. For all other cases, it uses the old implementation (fallthrough to NotYetImplementedError).
                
> BasicArrayFS has two unimplemented Functions: copyToArray, copyFromArray.
> -------------------------------------------------------------------------
>
>                 Key: UIMA-2307
>                 URL: https://issues.apache.org/jira/browse/UIMA-2307
>             Project: UIMA
>          Issue Type: Bug
>          Components: C++ Framework
>         Environment: Ubuntu 11.10
>            Reporter: Nico Blodow
>         Attachments: first_impl_of_copyToArray_and_copyFromArray_for_ByteArrayFS.patch, first_impl_of_copyToArray_and_copyFromArray_for_ByteArrayFS.patch
>
>
> When trying to use any non-atomic type in an ArrayFS, two functions are vital to copy from / to the FS:
> void 	copyToArray (size_t uiStart, size_t uiEnd, T *destArray, size_t uiDestOffset) const 
> void 	copyFromArray (T const *sourceArray, size_t uiStart, size_t uiEnd, size_t uiOffset)
> As far as I can tell, these need FSHeap::get8BitArray etc to be public.
> These raise a NotYetImplementedError. Will attach a patch if I find out how to.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Reopened] (UIMA-2307) BasicArrayFS has two unimplemented Functions: copyToArray, copyFromArray.

Posted by "Bhavani Iyer (Reopened) (JIRA)" <de...@uima.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-2307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bhavani Iyer reopened UIMA-2307:
--------------------------------


Reopened to fix uiEnd offset issue reported by Nico Blodow
                
> BasicArrayFS has two unimplemented Functions: copyToArray, copyFromArray.
> -------------------------------------------------------------------------
>
>                 Key: UIMA-2307
>                 URL: https://issues.apache.org/jira/browse/UIMA-2307
>             Project: UIMA
>          Issue Type: Bug
>          Components: C++ Framework
>         Environment: Ubuntu 11.10
>            Reporter: Nico Blodow
>            Assignee: Bhavani Iyer
>             Fix For: 2.4.0C
>
>         Attachments: first_impl_of_copyToArray_and_copyFromArray_for_ByteArrayFS.patch
>
>
> When trying to use any non-atomic type in an ArrayFS, two functions are vital to copy from / to the FS:
> void 	copyToArray (size_t uiStart, size_t uiEnd, T *destArray, size_t uiDestOffset) const 
> void 	copyFromArray (T const *sourceArray, size_t uiStart, size_t uiEnd, size_t uiOffset)
> As far as I can tell, these need FSHeap::get8BitArray etc to be public.
> These raise a NotYetImplementedError. Will attach a patch if I find out how to.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira