POV-Ray : Newsgroups : povray.programming : Type problems : Re: Type problems Server Time
24 Apr 2024 23:45:19 EDT (-0400)
  Re: Type problems  
From: Aidy
Date: 29 Mar 2011 13:35:01
Message: <web.4d9217fca2992db7674c4bb0@news.povray.org>
That is the exact text of the error. I'm not at a stage of being able to compile
the code yet, it is simply giving me the errors as if they are syntax errors.
But the error messages I've given are the exact messages I am receiving. There
is no more information provided :(

The first error I'm coming across is in the method dents (cuDents for me) :

__device__ static void cuDents (VECTOR EPoint, TNORMAL *Tnormal, VECTOR normal)
{
  DBL noise;
  VECTOR stucco_turb;

  noise = cuNoise (EPoint, (TPATTERN*)Tnormal);  THIS LINE HAS THE ERROR

  noise = noise * noise * noise * Tnormal->Amount;

  /* Get normal displacement value. */
  cuDNoise(stucco_turb, EPoint);

  /* Displace "normal". */
  cuVAddScaledEq(normal, noise, stucco_turb);
}

The next error appears in the function do_Average_Normals :

__device__ static void cuDo_Average_Normals (VECTOR EPoint,TNORMAL
*Tnormal,VECTOR normal, INTERSECTION *Inter)
{
   int i;
   BLEND_MAP *Map = Tnormal->Blend_Map;  ERROR ON THIS LINE
   SNGL Value;
   SNGL Total = 0.0;
   VECTOR V1,V2;

   cuMake_Vector (V1, 0.0, 0.0, 0.0);

   for (i = 0; i < Map->Number_Of_Entries; i++)
   {
     Value = Map->Blend_Map_Entries[i].value;

     cuAssign_Vector(V2,normal);

     cuPerturb_Normal(V2,Map->Blend_Map_Entries[i].Vals.Tnormal,EPoint, Inter);
                  ERROR ON THIS LINE ^ AS WELL

     cuVAddScaledEq(V1,Value,V2);

     Total += Value;
   }

   cuVInverseScale(normal,V1,Total);
}

The first error has just the ( of (TPATTERN *) highlighted in red as an error
and nothing else.

The second error has Tnormal highlighted as the error.

The third error has Map highlighted as the error



The three errors I receive above, in order, in full text are :

Error: Argument of type "TPATTERN * " is incompatible with parameter of type
"TPATTERN * "

TNORMAL *Tnormal
Error: A value of type "BLEND_MAP * " cannot be used to initialize an entity of
type "BLEND_MAP * "

and

BLEND_MAP *Map
Error: argument of type "TNORMAL * " is incompatible with parameter of type
"TNORMAL * "


Hope this is of more help


Le_Forgeron <jgr### [at] freefr> wrote:
> Le 29/03/2011 18:06, Aidy nous fit lire :
> > Version 3.6.2, yes.
> > Using Visual Studio 2010 so the compile that comes with that.
> > What do you mean by my flag??
>
> The option of your compiler (project/setting/compiler/... that kind of
> things)
>
> >
> > The two errors I provided are repeated a few times just with different data
> > types.
>
> What is the EXACT text of the errors, (or is it your version of it) ?
> It's painful enough to try to understand an error message without adding
> layer(s) of grease...
>
> Please provide a FULL copy of the error message (not it's
> interpretation) as well as at least the code of the calling function
> (from start of function to at least the error line!)
>
> Cristal ball currently broken, please help with accurate data.
>
> > All of the errors however complain about a data type not being compatible
> > with its own kind.
> >
> > A few of the lines with errors are :
> >
> > noise = cuNoise (EPoint, (TPATTERN*)Tnormal);
> >
> > BLEND_MAP *Map = Tnormal->Blend_Map;
> >
> > cuPerturb_Normal(V2,Map->Blend_Map_Entries[i].Vals.Tnormal,EPoint, Inter);
> >
>
> No such code as cuNoise & cuPerturb_Normal... Can you be playing odd
> with some Const ?
>
>
> >
> > There are others but the error messages are all much the same.
> > The method names are slightly different but this is due to the work that I am
> > doing. This code may be being interpreted by the NVCC compiler but I'm not sure.
> > I still don't understand why the error is occurring though.
>
> >>
> >> Could you please provide the error lines' number ?
> >> (or a copy-paste of the errors)
> >
> >
> >
> >


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.