COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### Floating Point Conversion using SSE

• Email
• Follow

good evening everyone,

i have to convert 4 double-word integers into single precision packed
floating point numbers. and i have to use sse (not sse2 instructions).

i found the CVTPI2PS instruction, however it can convert only two
integers, and only mmx registers work as source, whereas any
xmm-register can be the target.

does anyone know of a faster way to do this, i.e. convert 4 numbers like
CVTDQ2PS does? or a way to bypass mmx registers?

andr�


 0

See related articles to this posting

Keep in mind that mmx is _not_ the only possible source for that
instruction. You can use CVTPI2PS directly from memory as well. So if
your 4 bytes are in consecutive memory locations, you can just do two
of them with a movlhps wedged in between. If they aren't in consecutive
memory locations.. well, then, you have a bigger problem.

in at&t stynax

movl $ADDRESS, %eax cvtpi2ps %eax, %xmm0 movlhps %xmm0, %xmm0 cvtpi2ps 8(%eax), %xmm0   0 Reply ldb 2/17/2006 9:27:51 PM 1 Replies 160 Views Similar Articles 12/12/2013 7:03:44 PM [PageSpeed]  Reply: Similar Artilces: Floating point to Fixed point conversion. Hello, I am working on project uisng C, TMS320C6713, CCS. I want to know how ca I convert the floating point input data to fixed point do the needfu operations and convert back the fixed point result to floating point Regards Samdani. _____________________________________ Do you know a company who employs DSP engineers? Is it already listed at http://dsprelated.com/employers.php ? samdani1125 wrote: > Hello, > > I am working on project uisng C, TMS320C6713, CCS. I want to know how can > I convert the floating point input data to fixed point do the needful > operations a... floating point to fixed point conversion hello guys, I need some help from you. I am doing a DSP project and for that I need to do some C coding for the conversion of sample data which is in floating point representation to fixed point representation. the sample data is in floating point like 0.224128 2.299965 0.448350 -1.779926 My DSP algorithm is implemented in C and is supposed to be using fixed point representation. The above data is intended to be converted to fixed integer format.I request you to help me out regarding this conversion.I will be very glad if u give me some hints or algorithms for this conversion. In article &l... Problem with float to int conversion by using two int variables for representing the float number Create a class to operate on the US currency. Call the new class Money. All the data components in this class for dollars and cents are integer variables (this is where I get confused and don't know how to actually do the job). Include member functions and constructors to initialize Money to 0 and to initialize it to fixed values. A member function should display it in appropriate format. Include member functions that permit data conversion in both directions: - from real (float) value (4.5f US) to dollars/cents ( 4 dollar, 50 cents) - from dollars/cents (4 dollar, 50 cents) to real (float... Floating to Fixed Point Conversion Hi All I'm converting a matlab (rather Real Time Workshop) generated floating point C code to Fixed point code. I went through few of the articles available on the web on conversion However I've the following doubts. 1. Are there any generic thumb rule to convert all the float/doubl constants and variables? 2. How to take care of scaling manually? Thanks & regards Gautham On Jun 27, 7:14 am, "gauths" <gau...@gmail.com> wrote: > Hi All > I'm converting a matlab (rather Real Time Workshop) generated floating C > point C code to Fixed point code.... gforth-libcc floating point conversion Anton, I have a problem I hope you are familiar with. I have a floating point array, create Wall[] 0e f, 2e f, 0e f, 3e f, 0e f, 0e f, 0e f, 1e f, 0e f, 3e f, 0e f, 0e f, 0e f, 0e f, 0e f, 3e f, 3e f, 3e f, 0e f, 0e f, 0e f, 3e f, 0e f, 3e f, 3e f, 0e f, 0e f, 0e f, 0e f, 1e f, -40e f, 1e f, 0e f, 0e f, 0e f, 0e f, 2e f, -40e f, 2e f, 0e f, 0e f, 0e f, 1e f, 0e f, 0.9e f, 0.5e f, 0e f, 0e f, 0e f, 0.9e f, 0.5e f, 0.7e f, 0.7e f, 0e f, 0e f, 0e f, 0.7e f, 0.7e f, 0.5e f, 0.9e f,... Floating point -> string conversions Can someone explain these differences? >>> from math import pi >>> pi 3.1415926535897931 >>> type(pi) <type 'float'> >>> repr(pi) '3.1415926535897931' >>> str(pi) '3.14159265359' >>> '%f' % pi '3.141593' >>> '%.16f' % pi '3.1415926535897931' Why do the string and default floating point representations get rounded? (and is this documented anywhere?) -- John. John Fouhy <jfouhy@paradise.net.nz> wrote: ... > Why do the string and default floating point rep... Problem with using Floating Point Package Hi all, I am using float package of David Bishop. I want to see value of -1.5129E-15 i.e. (-1.5129)*10^(-15). I have written the program mentioned below. Modelsim is returning error saying : "Negative exponents not allowed with integers." at the line z <= to_float((-1.5129)*10**(-15)) ; What is the mistake I am making ? Thanks Ravinder Chaudhry library IEEE,WORK; use IEEE.STD_LOGIC_1164.all; use IEEE.NUMERIC_STD.all; use work.float_pkg.all; entity value_test1 is port( a,b : in float(5 downto -10); c : out float(5 downto -10) ); end entity;... REXX Is there any way to convert the given floating value(DPFP - Double Precision Floating Point) in to its equivalent HEX (Vertical Hex)? The field used is a comp-2 variable, and it has to be converted into its equivalent Hexadecimal. Field-X COMP-2 Field-Y COMP-2 Field-X 8/DPFP 5.950000000000000E+00 Field-Y 8/DPFP 5.950000000000000E+00 File Out: ****** ****************** 000001 =AC =AC V 045333333453333330 V 11F3333331F3333330 ****** ****************** I need to get (415F333333333333) for the given float value (5.95) Please help me to ... IEEE-754 Floating-Point Conversion I am sure this is a foolish question but I am at a loss at how to do this. I need to write an application in VB 6.0 that takes a hexadecimal number such as 3F670457 and coverts it to 0.9024099707603455. I understand it is in IEEE-754 Floating-Point format and I have found a website that does the conversion (http://babbage.cs.qc.edu/courses/cs341/IEEE-754hex32.html) but I can't for the life of me figure out how this conversion works. I should also point out that I have not been trained in VB and I just hack and whack until I get applications to do what I want. If anyone has some VB code... Text to Generic Floating point conversion utility Hi, Does anyone know of a cross-platform ASCII-text to floating-point conversion utility that doesn't require conditional compilation from VAX to Alpha to IA64? I had been using: - call "ots$cvt_t_F" using by descriptor id_low_vers(1:id_low_len) by reference tip_low_vers by value 0, 0, 2, 0 giving sys_status. But it would appear that on IA64 I would also have to conditionalize the code to: call "ots\$cvt_t_S" using by descriptor id_low_vers(1:id_low_len) by reference ...

Precision Error:Floating to fixed point conversion
Hi, I have converted certain floating point code to fixed point . The cod consists of DIT FFT implementation.I have picked up fixed poin implementation for basic math functions like sin,cos from web.I am tryin to restrict the error between floating & fixed point data to 0.0001 bu unable to do so. The FFT algorithm uses sin,cos,few multiplication & division operations. The sin& cos functions that i use give 0.0001 precision wrt standard li sin & cos. I am using 16.16 format for fixed point representation. Can somebody guide me on how to achive the desired precision?. Pls p...

IBM 32-bit Floating Point Conversion
Gentlemen, Recently I had need to roll my own conversion routine for reading data values from a SEGY file (seismic data values) which were in IBM 32-bit floating point format. I would like to post my routine in the hopes of perhaps helping someone else and/or getting feedback on what someone else has done along these lines. I was greatly helped by the following article: http://www.sis.slb.com/content/services/client/theclick/v2_n6_2003i.asp which can be found by searching Google for: "what is the difference between ibm 32 bit floating point and ieee" Step 1: Get a dat...

to read floating point comp-3 data using rexx
hi , i am trying to read data from a file using rexx and then process it.... now, as we know the data which is of type comp, comp-1 , comp-2, comp-3 cannot be read directly ..... it needs to be converted to readable format by using c2d... there are issues while doing this: 1. i am not able to convert floating point comp-3 variable to readable format.. ex: if declaration is something like 'S9(4) comp-3' then my code can covert it to readable format.... if the declaration is something like 'S9(4)v99 comp-3 ' , then my code fails to convert this data.. it is a IBM ...

Can Perl be made to use IEEE floating=-point exception handling?
I would like "standard" IEEE floating-point behavior, such as log(0) giving -Inf instead of this being a disallowed operation. Across the board, I'd like standard production and handling of Infs and NaNs, at least on ieee machines. If Perl has to be recompiled specially to do this, that is a possibility; but if I can get my script to be handled this way with the standard download, it would be even better. Is there any way to do this? I'm using a standard CPAN download of Perl 5.8.6 on Linux. There was a thread on this back in 1997, started by Bob Walton: http://groups.g...

I'm find Function of JPEG algorithm not using floating point processing
Hi I'm Kwen I'm develop a JPEG image camera system uses Linux O/S But CPU(AMD) does not support floating point operation I find Function of JPEG algorithm which does not use a floating point operation. I will thank if the reply will be reduced. ibibiking wrote: > Hi I'm Kwen > > I'm develop a JPEG image camera system uses Linux O/S > But CPU(AMD) does not support floating point operation > I find Function of JPEG algorithm which does not use a floating point > operation. > I will thank if the reply will be reduced. AFAICS the IJG jpeg code has intege...

I'm find Function of JPEG algorithm not using floating point processing #2
Hi I'm Kwen I'm develop a JPEG image camera system uses Linux O/S But CPU(AMD) does not support floating point operation I find Function of JPEG algorithm which does not use a floating point operation. I will thank if the reply will be reduced. On 2006-01-23, ibibiking <bjkwen@hitecom.co.kr> wrote: > Hi I'm Kwen > > I'm develop a JPEG image camera system uses Linux O/S > But CPU(AMD) does not support floating point operation > I find Function of JPEG algorithm which does not use a floating point > operation. > I will thank if the reply will be re...

converting floating point to fixed point
Hi, I need to convert floating point inputs (32 bits) to fixed point (11 bits for integer and 10 bits for the fraction) representation in a synthesizable way. I would be more than grateful if someone could show me the way. I need to do this without using any special tools or such. Just pure VHDL. Best The first step is to define your requirements. Some questions you may want to ask yourself (or whoever assigned this to you): 1. What is the format of the floating point number? 2. What should happen when the floating point number exceeds the bounds of the fixed point number? 3. Since a l...

using L2 connection as Point-To-Point
this all seems to work well, though i would like any comments you might have as to the methods i used VLAN555 is only the L2 ports on each side one on SW1 and one on SW2, each switch has a vlan interface with a small subnet for connectivity Main Office Core Router (A) BGP session with (SW1) this router receives 172.16.3.0/24 from SW1 if L2 is up else it goes to router B via a weighted route. Main Office Internet Router (B) IPSEC between this and (E) if the L2 goes down Main Office Core Switch (SW1) BGP session (A) BGP session (SW2) over L2 to 172.16.1.1 L2 connection is in one port in VLA...

Automatic float centring using the float package?
Hello TeX experts, I am using the float package to define a new float type. While I'm at it, I'd like to make the contents centre automatically, without having to use \centering every time. So I thought I could define a custom style for the floats, and use this. I tried: \documentclass[12pt,a4paper]{article} \usepackage{float} \makeatletter \newcommand\fs@centre{\fs@plain \def\@fs@pre{\centering}} \makeatother \floatstyle{centre} \newfloat{scheme}{htbp}{los} \floatname{scheme}{Scheme} \begin{document} Some plain text. \begin{scheme} Some scheme as a filler for the graphics.\\...

fixed point
hi, i have e.g. number 1 in floating point and its equivalent of 8192 in fixed point representation. what is the connection? how do you calculate this exactly? another example would be -2.000125721 in floating is -16385 in fixed point. please help. thx Hi, In a nutshell you divide the integer value of (e.g.) 8192 by 2^b, where b is the "scaling" of the fixed-point value. In your case, b must be 13 since 2^13 = 8192 and 8192/8192 = 1.0. In the second example, the scaling of the value is still apparently 13, since -16385/2^13 = -2.00012207, which is approximately equal to your ...