|
Ublas : |
From: David M Garza (David.M.Garza_at_[hidden])
Date: 2006-02-01 10:33:32
To answer my own question, I do need to use shallow_array_adaptor.
That said I noticed the discussion of carray_adaptor around August last
year. Has there been any more discussion of additional or replacement
shared array adaptors? Do I understand correctly that where things were
going with the shallow_array_adaptor vs carray_adaptor discussion would
be two different shared array adaptors, one supporting copy construction
and the other not, with the user selecting which he wanted to use?
Also, I seem to remember seeing a post in the past where someone asked
if it was possible to lock the nonzero structure and report an error if
an attempt to change it was made. At the time the answer was uBLAS
sparse matrices don't currently support this. Would the changes be as
simple as adding a lock flag then making checks at the right places,
like append_element?
David
David M Garza wrote:
> I wondered if this wouldn't be the case. :) Thanks for offering though.
>
> I've started working on using array adaptors to do the job. I've had to
> create constructors for the sparse arrays which take the adapted arrays
> as arguments.
>
> Should I be using shared_array_adaptor or can I just get away with
> array_adaptor? The copy I'm hoping to avoid is between the array passed
> in through the subroutine argument list and the value array in a uBLAS
> sparse matrix data structure. As long as I can wrap the array passed in
> through the argument list, I can work the rest of the code to avoid
> subsequent copies of the sparse matrix object. From what I can tell
> looking at array_adaptor and shared_array_adaptor, these are the copies
> I would avoid by using the shared_array_adaptor.
>
> David
>
> eeitan_at_[hidden] wrote:
>
>>i do not know this package and i understand this package is not a free ware
>>so...
>>Quoting David M Garza <David.M.Garza_at_[hidden]>:
>>
>>
>>
>>>SNOPT. I'm using the interface where it will expect the matrix in
>>>compressed column form. The argument list for the callback function
>>>only provides the value array--it expects you to remember the index
>>>arrays separately. I guess if you know SNOPT you know this already...
>>>Thanks!
>>>David
>>>
>>>eeitan_at_[hidden] wrote:
>>>
>>>
>>>>Quoting David M Garza <David.M.Garza_at_[hidden]>:
>>>>
>>>>
>>>>
>>>>
>>>>>I'm working with a numerical optimizer designed for large, sparse
>>>>>problems and written in Fortran. When the the optimizer calls back for
>>>>>a Jacobian evaluation it passes the array where it expects the Jacobian
>>>>>values to be placed. Is there a simple way to build a uBLAS sparse
>>>>>matrix object which simply wraps this array? My first thought is no,
>>>>>but my second thought is "I could make a custom allocator..." Has
>>>>>someone already tackled this problem? I expect this array to be big
>>>>>(10,000-100,000 elements) so I'd like to avoid just copying it.
>>>>>
>>>>>Thanks,
>>>>>David
>>>>>
>>>>>_______________________________________________
>>>>>ublas mailing list
>>>>>ublas_at_[hidden]
>>>>>http://lists.boost.org/mailman/listinfo.cgi/ublas
>>>>>
>>>>
>>>>if you could tell me which optimizer it is, i will try to do so.
>>>>
>>>>
>>>>----------------------------------------------------------------
>>>>This message was sent using IMP, the Internet Messaging Program.
>>>>
>>>>_______________________________________________
>>>>ublas mailing list
>>>>ublas_at_[hidden]
>>>>http://lists.boost.org/mailman/listinfo.cgi/ublas
>>>>
>>>>
>>>
>>>_______________________________________________
>>>ublas mailing list
>>>ublas_at_[hidden]
>>>http://lists.boost.org/mailman/listinfo.cgi/ublas
>>>
>>
>>
>>
>>
>>
>>----------------------------------------------------------------
>>This message was sent using IMP, the Internet Messaging Program.
>>
>>_______________________________________________
>>ublas mailing list
>>ublas_at_[hidden]
>>http://lists.boost.org/mailman/listinfo.cgi/ublas
>>
>>
>
>
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/ublas
>
>