[patch] Fix for issue #125
Jules Bergmann
jules at codesourcery.com
Tue Dec 5 15:52:52 UTC 2006
While working on Ext_data for the reference implementation, I ended up
fixing issue #125 "Fft cannot take an expression as an argument" by
allowing Ext_data objects to be created for expression blocks (the
ref-impl needs to use Ext_data on expression blocks to implement some of
the matrix vector operations, such as prodh()).
The root problems are Ext_data (and Rt_ext_data)
(a) cannot be instantiated for const blocks, because it results in
ambiguous constructors, and
(b) cannot be instantiated for blocks without a put() method, because
the sync value is a run-time parameter.
The fixes are:
- explicitly disambiguate the constructors for non-const and const block
types.
- make Block_copy from a pointer to a const block a runtime error. To
reduce duplication of code for the copy to a pointer (the other
direction), Block_copy was split into separate classes Block_copy_to_ptr
and Block_copy_from_ptr.
The patch also includes a regression test for the issue, and some
additional argument checking for Fft to help debug the regression test :).
I'm currently running the regression suite to make sure the Block_copy
change did not affect other code. I will apply after that looks good.
-- Jules
--
Jules Bergmann
CodeSourcery
jules at codesourcery.com
(650) 331-3385 x705
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 125.diff
URL: <http://sourcerytools.com/pipermail/vsipl++/attachments/20061205/d937e0eb/attachment.ksh>
More information about the vsipl++
mailing list