search for: int16

Displaying 20 results from an estimated 95 matches for "int16".

Did you mean: uint16
2012 Feb 23
1
[LLVMdev] Simple question on sign
...ribed and the LoadExtType enum defined, and the use of zext and sext to differentiate what containers the values are being loaded into in the IR. Basically I'm trying to describe patterns for automatically selecting between various multiplication instructions: #define MULL(t,s1,s2) t = (s1) * INT16(s2) #define MULLU(t,s1,s2) t = (s1) * UINT16(s2) #define MULH(t,s1,s2) t = (s1) * INT16((s2) >> 16) #define MULHU(t,s1,s2) t = (s1) * UINT16((s2) >> 16) #define MULHS(t,s1,s2) t = ((s1) * UINT16((s2) >> 16)) << 16 #define MULLL(t,s1,s2) t = INT16(s1) * INT16(s2) #define MUL...
2012 Feb 23
0
[LLVMdev] Simple question on sign
Hi Sam, I am not a MIPS expert by any means, so YMMV, but: MIPS addu only differs to "add" in its (non)setting of the overflow flag. Because LLVM doesn't provide a way via the IR to access the overflow flag, a special notation isn't required in the IR to distinguish the two operations. Do you have another example? Cheers, James -----Original Message----- From:
2020 May 19
5
[PATCHv2] SSE2/SSSE3 optimized version of get_checksum1() for x86-64
...d from either end + (inspired by Mark Adler's Adler-32 checksum) + */ +/* + Original loop per 4 bytes: + s2 += 4*(s1 + buf[i]) + 3*buf[i+1] + 2*buf[i+2] + buf[i+3] + 10*CHAR_OFFSET; + s1 += buf[i] + buf[i+1] + buf[i+2] + buf[i+3] + 4*CHAR_OFFSET; + + SSE2/SSSE3 loop per 32 bytes: + int16 t1[8]; + int16 t2[8]; + for (int j = 0; j < 8; j++) { + t1[j] = buf[j*4 + i] + buf[j*4 + i+1] + buf[j*4 + i+2] + buf[j*4 + i+3]; + t2[j] = 4*buf[j*4 + i] + 3*buf[j*4 + i+1] + 2*buf[j*4 + i+2] + buf[j*4 + i+3]; + } + s2 += 32*s1 + + 28*t1[0] + 24*t1[1] + 20*t1[2] +...
2006 Dec 28
0
using speex in C#
...rt("libspeex.dll")] public static extern IntPtr speex_encoder_init(ref SpeexMode mode); [DllImport("libspeex.dll")] public static extern void speex_bits_init(ref SpeexBits bits); [DllImport("libspeex.dll")] public static extern int speex_encode_int(IntPtr state, Int16[] in_, ref SpeexBits bits); SpeexBits bits = new SpeexBits(); SpeexMode mode = (SpeexMode)Marshal.PtrToStructure(Speex.speex_lib_get_mode(1), typeof(SpeexMode)); Speex.speex_bits_init(ref bits); IntPtr enc_state = Speex.speex_encoder_init(ref mode); Int16[] CaptureData = null; (CaptureData...
2004 Dec 28
5
Sound distorted after normalized.
> 16 bit ints have a range of -32768 to 32767. If you divide > -32768 by 32767.0 you end up with -1.00003051850948 which > is a bad thing. > > Try normalizing with a value of 32768.0. No. Speex expects values in the +-32767 range, not +-1.0. Just converting from int16 to float *is* the right thing to do. Jean-Marc -- Jean-Marc Valin <Jean-Marc.Valin@USherbrooke.ca> Universit? de Sherbrooke
2020 May 18
6
[PATCH] SSE2/SSSE3 optimized version of get_checksum1() for x86-64
...d from either end + (inspired by Mark Adler's Adler-32 checksum) + */ +/* + Original loop per 4 bytes: + s2 += 4*(s1 + buf[i]) + 3*buf[i+1] + 2*buf[i+2] + buf[i+3] + 10*CHAR_OFFSET; + s1 += buf[i] + buf[i+1] + buf[i+2] + buf[i+3] + 4*CHAR_OFFSET; + + SSE2/SSSE3 loop per 32 bytes: + int16 t1[8]; + int16 t2[8]; + for (int j = 0; j < 8; j++) { + t1[j] = buf[j*4 + i] + buf[j*4 + i+1] + buf[j*4 + i+2] + buf[j*4 + i+3]; + t2[j] = 4*buf[j*4 + i] + 3*buf[j*4 + i+1] + 2*buf[j*4 + i+2] + buf[j*4 + i+3]; + } + s2 += 32*s1 + + 28*t1[0] + 24*t1[1] + 20*t1[2] +...
2012 Feb 23
2
[LLVMdev] Simple question on sign
Thanks for the replies guys but I think I should have phrased my question better... looking at the Mips backend there are machine instructions that operate on signed and unsigned data, such as add and addu. And like Mips, I need to specify unsigned specific instructions, so how do these get chosen between if the LLVM IR does not carry type data? A very general point in the right direction is all i
2020 May 18
0
[PATCH] SSE2/SSSE3 optimized version of get_checksum1() for x86-64
...#39;s Adler-32 checksum) > + */ > +/* > + Original loop per 4 bytes: > + s2 += 4*(s1 + buf[i]) + 3*buf[i+1] + 2*buf[i+2] + buf[i+3] + > 10*CHAR_OFFSET; > + s1 += buf[i] + buf[i+1] + buf[i+2] + buf[i+3] + 4*CHAR_OFFSET; > + > + SSE2/SSSE3 loop per 32 bytes: > + int16 t1[8]; > + int16 t2[8]; > + for (int j = 0; j < 8; j++) { > + t1[j] = buf[j*4 + i] + buf[j*4 + i+1] + buf[j*4 + i+2] + buf[j*4 + > i+3]; > + t2[j] = 4*buf[j*4 + i] + 3*buf[j*4 + i+1] + 2*buf[j*4 + i+2] + > buf[j*4 + i+3]; > + } > + s2 += 32*s1 + >...
2012 Mar 27
1
Rgdal package - get information
...> oblique.y 0 > driver GTiff > projection +proj=utm +zone=23 +south +datum=WGS84 +units=m +no_defs > file > /MOD13Q1.A2001049.h13v11.005.2007002215512.250m_16_days_EVI.tif > apparent band summary: > *GDType* Bmin Bmax Bmean Bsd hasNoDataValue NoDataValue > 1 *Int16* -32768 32767 0 0 FALSE 0 > Metadata: > AREA_OR_POINT=Point > TIFFTAG_SOFTWARE=MODIS Reprojection Tool v4.1 March 2009 > > > > *How to read the information GDType?* > Thanks, julio [[alternative HTML version deleted]]
2006 Dec 29
0
using speex in C#
...rt("libspeex.dll")] public static extern IntPtr speex_encoder_init(ref SpeexMode mode); [DllImport("libspeex.dll")] public static extern void speex_bits_init(ref SpeexBits bits); [DllImport("libspeex.dll")] public static extern int speex_encode_int(IntPtr state, Int16[] in_, ref SpeexBits bits); SpeexBits bits = new SpeexBits(); SpeexMode mode = (SpeexMode)Marshal.PtrToStructure(Speex.speex_lib_get_mode(1), typeof(SpeexMode)); Speex.speex_bits_init(ref bits); IntPtr enc_state = Speex.speex_encoder_init(ref mode); Int16[] CaptureData = null; (CaptureData...
2012 Jun 05
3
[LLVMdev] sample of running google c++ lint script
...c system, c++ system, other. [build/include_order] [4] Target.cpp:24: Do not use namespace using-directives. Use using-declarations instead. [build/namespaces] [5] Target.cpp:26: Is this a non-const reference? If so, make const or use a pointer. [runtime/references] [2] Target.cpp:65: Use int16/int64/etc, rather than the C type long [runtime/int] [4] Target.cpp:69: Use int16/int64/etc, rather than the C type long [runtime/int] [4] Target.cpp:73: Use int16/int64/etc, rather than the C type long [runtime/int] [4] Target.cpp:95: Use int16/int64/etc, rather than the C type long [ru...
2020 May 18
2
[PATCH] SSE2/SSSE3 optimized version of get_checksum1() for x86-64
...*/ >> +/* >> + Original loop per 4 bytes: >> + s2 += 4*(s1 + buf[i]) + 3*buf[i+1] + 2*buf[i+2] + buf[i+3] + >> 10*CHAR_OFFSET; >> + s1 += buf[i] + buf[i+1] + buf[i+2] + buf[i+3] + 4*CHAR_OFFSET; >> + >> + SSE2/SSSE3 loop per 32 bytes: >> + int16 t1[8]; >> + int16 t2[8]; >> + for (int j = 0; j < 8; j++) { >> + t1[j] = buf[j*4 + i] + buf[j*4 + i+1] + buf[j*4 + i+2] + buf[j*4 + i+3]; >> + t2[j] = 4*buf[j*4 + i] + 3*buf[j*4 + i+1] + 2*buf[j*4 + i+2] + >> buf[j*4 + i+3]; >> + } >>...
2020 May 20
0
[PATCHv2] SSE2/SSSE3 optimized version of get_checksum1() for x86-64
...#39;s Adler-32 checksum) > + */ > +/* > + Original loop per 4 bytes: > + s2 += 4*(s1 + buf[i]) + 3*buf[i+1] + 2*buf[i+2] + buf[i+3] + > 10*CHAR_OFFSET; > + s1 += buf[i] + buf[i+1] + buf[i+2] + buf[i+3] + 4*CHAR_OFFSET; > + > + SSE2/SSSE3 loop per 32 bytes: > + int16 t1[8]; > + int16 t2[8]; > + for (int j = 0; j < 8; j++) { > + t1[j] = buf[j*4 + i] + buf[j*4 + i+1] + buf[j*4 + i+2] + buf[j*4 + i+3]; > + t2[j] = 4*buf[j*4 + i] + 3*buf[j*4 + i+1] + 2*buf[j*4 + i+2] + > buf[j*4 + i+3]; > + } > + s2 += 32*s1 + > +...
2003 May 08
1
problems compiling R on AIX5.1
...harald/R-1.6.1/include -I/usr/local/include -O2 -qmaxmem=8192 -c SASxport.c -o SASxport.o "foreign.h", line 51.13: 1506-334 (S) Identifier int32 has already been defined on line 633 of "/usr/include/sys/inttypes.h". "foreign.h", line 52.15: 1506-334 (S) Identifier int16 has already been defined on line 632 of "/usr/include/sys/inttypes.h". make: 1254-004 The error code from the last command is 1. Stop. ERROR: compilation failed for package 'foreign' make: 1254-004 The error code from the last command is 5. ... At this point I was looking for f...
2012 Sep 11
4
[PATCH] x86: retrieve keyboard shift status flags from BIOS
...XEN_FW_EFI_RT_VERSION 4 +#define XEN_FW_KBD_SHIFT_FLAGS 5 struct xenpf_firmware_info { /* IN variables. */ uint32_t type; @@ -266,6 +267,9 @@ struct xenpf_firmware_info { uint32_t type; } mem; } efi_info; /* XEN_FW_EFI_INFO */ + + /* Int16, Fn02: Get keyboard shift flags. */ + uint8_t kbd_shift_flags; /* XEN_FW_KBD_SHIFT_FLAGS */ } u; }; typedef struct xenpf_firmware_info xenpf_firmware_info_t; _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-de...
2020 May 18
3
[PATCH] SSE2/SSSE3 optimized version of get_checksum1() for x86-64
What do you base this on? Per https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html : "For the x86-32 compiler, you must use -march=cpu-type, -msse or -msse2 switches to enable SSE extensions and make this option effective. For the x86-64 compiler, these extensions are enabled by default." That reads to me like we're fine for SSE2. As stated in my comments, SSSE3 support must be
2012 Jan 28
2
Need very fast application of 'diff' - ideas?
...mprovements. I don't have much experience integrating other languages, so I'm hoping the community has some ideas about how to approach this particular problem... Many thanks, Kevin In iPython: In [3]: import numpy as np In [4]: arr = np.random.randint(0, 1000, (10000000,1)).astype("int16") In [5]: arr1 = arr[1:].view() In [6]: timeit arr2 = arr1 - arr[:-1] 10 loops, best of 3: 20.1 ms per loop In Clojure: (defn subtract-lag [n] (let [v (take n (repeatedly rand))] (time (dorun (map - v (cons 0 v)))))) [[alternative HTML version deleted]]
2014 Dec 25
2
[RFC][FFT][Fixed-Point][NEON] NEON-Optimize Fixed-Point FFT?
Jean-Marc Valin wrote: > There is definitely some use for a Neon fixed-point FFT. How much > exactly I'm not sure. Fixed-point is a bit more than just a fall-back Well, we use fixed-point mode by default in Firefox for both Firefox OS and Fennec (Firefox on Android). The reason is that, although there is some NEON-class hardware where float does finally appear to be a little bit
2003 Jul 09
2
Samba3b2, solaris, AD suport and libiconv.
...at.net/projects/libiconv/ for better charset compatibility! checking for Linux kernel oplocks... no checking for kernel change notify support... no checking for kernel share modes... no checking for IRIX kernel oplock type definitions... no checking for irix specific capabilities... no checking for int16 typedef included by rpc/rpc.h... no checking for uint16 typedef included by rpc/rpc.h... no checking for int32 typedef included by rpc/rpc.h... no checking for uint32 typedef included by rpc/rpc.h... no checking for conflicting AUTH_ERROR define in rpc/rpc.h... no checking for test routines... conf...
2003 May 08
0
problems compiling R on AIX5.1 (PR#2953)
...harald/R-1.6.1/include -I/usr/local/include -O2 -qmaxmem=8192 -c SASxport.c -o SASxport.o "foreign.h", line 51.13: 1506-334 (S) Identifier int32 has already been defined on line 633 of "/usr/include/sys/inttypes.h". "foreign.h", line 52.15: 1506-334 (S) Identifier int16 has already been defined on line 632 of "/usr/include/sys/inttypes.h". make: 1254-004 The error code from the last command is 1. Stop. ERROR: compilation failed for package 'foreign' make: 1254-004 The error code from the last command is 5. ... At this point I was looking for f...