This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C++/altivec issue on 3.4 branch
- From: Kostadin Dabov <kostadin at terascale-euro dot com>
- To: "Timothy J. Wood" <tjw at omnigroup dot com>,gcc at gcc dot gnu dot org
- Date: Mon, 2 Feb 2004 12:45:37 +0200
- Subject: Re: C++/altivec issue on 3.4 branch
- Organization: Terascale Europe EOOD
- References: <404150B4-5545-11D8-A96D-0003933F3BC2@omnigroup.com>
- Reply-to: kostadin at terascale-euro dot com
For 3.2.x and 3.3.x,
this approach would work for me: typedef 'vetor unsigned int'
to sth. and use it insted, i.e.
#include <altivec.h>
typedef vector unsigned int vui;
class Constants {
vui _pack0;
public:
Constants() {
_pack0 = (vui){0xdeadbeef, 0xabababab, 0x55555555,
0x12345678};
};
inline vui deadbeef(void) const {
return vec_splat(_pack0, 0);
};
};
vui const_deadbeef(Constants &C)
{
return C.deadbeef();
}
regards,
--
Kostadin Dabov <kostadin@terascale-euro.com>
Terascale Europe, LTD
On Monday 02 February 2004 08:01, Timothy J. Wood wrote:
> C++ functions returning vector values don't seem to be
> working on the head of the 3.4 branch. Am I doing
> something dumb, or is this actually a bug (or known missing
> feature)?
>
> -tim
>
>
> #include <altivec.h>
>
> class Constants {
> vector unsigned int _pack0;
> public:
> Constants() {
> _pack0 = (vector unsigned int){0xdeadbeef,
> 0xabababab, 0x55555555, 0x12345678};
> };
>
> inline vector unsigned int deadbeef(void) const {
> return vec_splat(_pack0, 0);
> };
> };
>
> vector unsigned int const_deadbeef(Constants &C)
> {
> return C.deadbeef();
> }
>
>
> av.cpp: In function `unsigned int __vector__
> const_deadbeef(Constants&)':
> av.cpp:17: error: no matching function for call to
> `Constants::deadbeef()'
> av.cpp:10: note: candidates are: unsigned int __vector__
> Constants::deadbeef(const Constants*)
--
Kostadin Dabov <kostadin@terascale-euro.com>
Terascale Europe, LTD
The information contained in this communication may be
confidential and is intended only for the use of the
recipient(s) named above. If the reader of this
communication is not the intended recipient(s), you are
hereby notified that any dissemination, distribution, or
copying of this communication, or any of its contents, is
strictly prohibited. If you are not a named recipient or
received this communication by mistake, please notify the
sender and delete the communication and all copies of it.