DSPRelated.com
Forums

ADSP 2181- I want to assign float data array to int array as a fraction data

Started by naresh patel November 19, 2006
Hello Dear all,

I calculate co-efficeint for low pass filter in c.
co-efficient array difine as float. then dump in data file as fraction in VDSP++3.5

but now i want to use this file in my programe.

can i assign this float data file to an array which contain fraction value.

int h1[M]={
#include "fr-1-21.dat"
};"fr-1-21.dat" contain data of fraction value.

after this i get all data 0.000 in memory.

if i assign
float h1[M]={
#include "fr-1-21.dat"
};"fr-1-21.dat" contain data of fraction value.

after this i get different data in memory.
so i can assign float data array to int array as a fraction data.

plz kindly help me.

regards,
NP

---------------------------------
Sponsored Link

Degrees online in as fast as 1 Yr - MBA, Bachelor's, Master's, Associate - Click now to apply
On Sunday 19 November 2006 07:42, naresh patel wrote:
> can i assign this float data file to an array which contain fraction
> value.
>
> int h1[M]={
> #include "fr-1-21.dat"
> };"fr-1-21.dat" contain data of fraction value.
>
> after this i get all data 0.000 in memory.
>

There had been strange issues concerning this in at least one of the previous
versions of VDSP++, which I did encounter on a 21161 processor.

I don't remember the version, but it is possible that it was version 3.5.
I'd suggest, therefore that you take into account the possibility that such an
include statement would behave other than expected on your processor, too.

If I remember it right, the only secure way was to manually convert the data
to integer and then include it as such.

Bernhard

----
Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese
E-Mail irrtuemlich erhalten haben, informieren Sie bitte sofort den
Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie
die unbefugte Weitergabe dieser Mail ist nicht gestattet.
Ueber das Internet versandte E-Mails koennen leicht unter fremden Namen
erstellt oder manipuliert werden. Aus diesem Grunde bitten wir um
Verstaendnis, dass wir zu Ihrem und unserem Schutz die rechtliche
Verbindlichkeit der vorstehenden Erklaerungen und Aeusserungen
ausschliessen.

This E-mail may contain confidential and/or privileged information. If
you are not the intended recipient or have received this E-mail in
error, please notify the sender immediately and destroy this E-mail. Any
unauthorized copying, disclosure or distribution of the material in this
E-mail is strictly forbidden.
E-mails via Internet can easily be prepared or manipulated by third
persons. For this reason we trust you will understand that, for your own
and our protection, we rule out the legal validity of the foregoing
statements and comments.