similar, so we will not describe it here.
The problem arises.
What we need to implement is the logical shift of bits. SSE2 contains the PSLLDQ command. The DQ here is the meaning of Double QWORD,
Isn't this exactly the-bit shift we need? No! Let's take a look at Intel's documents:
PSLLDQ -- Packed Shift Left Logical Double Quadword
Or
Http://moeto.comoj.com/project/intel/instruct32_hh/vc255.htm
As follows:
We can see that, unfortunately,
This section describes the sse2 Integer Operation commands.
5. Data Migration instructions
MovdqaXMM, XMM/m128
MovdqaXMM/m128, XMMThe source memory content value is sent to the destination register. When m128 exists, the memory address must be 16 bytes aligned.
MovdquXMM, XMM/m128
MovdquXMM/m128, XMMThe source memory content value is sent to the destination register, and the memory address does not need to be 16 bytes aligned.
Movq2dqXM
One of my interesting programming directions is the large number of calculations, so in assembly language to write a lot of large number of computational aspects of small programs, and last week suddenly came up with a SSE2 instruction to convert integers into 16 strings of a good idea, then put into implementation. Originally thought can speed up to 500%, that test found that, compared to the original C language version, the speed has been increased
Recently, we used Intel's media SDK to play H264 videos. We found that the frames transcoded by intel's SDK are in the NV12 pixel format and must be converted to the RGB32 format by ourselves. Although this type of code looks for a lot on the Internet, you can do it yourself.
Google's conversion formula:
C = Y-16D = U-128E = V-128R = clip (round (1.164383 * C + 1.596027 * E ))G = clip (round (1.164383 * C-(0.391762 * D)-(0.812968 * E )))B = clip (round (1.164383 * C + 2.017232 * D ))
I studied h
YourselfProgramTo share with you. It's dangerous to remember sprintf!
VC ++ 2008 in debug mode
# Include
This program gets stuck when it is executed to free, and F11 is used for debugging until it reaches the assembly language.
JMP _ vec_memzero; Use fast zero sse2 implementation
The system stops and displays "No information available for the current location ".Source code".
Cause:
Invalid Memory Access, subscript out of bounds.
Http://www.mathblog.dk/project-euler-46-odd-number-prime-square/
Not a hard one to code, but it can be optimized using SSE2 instructions. The code below runs with g++ 4.8.1:
g++-g-c RIDDLE.CPP-STD=C++11-MSSE2-PGg++-O riddle.exe riddle.o-pgObjdump-d-M intel-s riddle.o > Assembly.txtRiddleGprof Riddle.exe gmon.out > Report.txt
And here is the code:
#if defined (__sse2__) #include
. if it is a local machine, this parameter is usually not set;-P: Set the listening port. the default value is 11211. Therefore, you can leave this parameter unspecified;-U indicates the user;
If you encounter problems when running memcached, the error prompt is as follows:
/Usr/local/servers/memcached/bin/memcached: error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file: No such file or directory
Run LD_DUBUG = libs to know the library loading path when memcache
the listening port, which defaults to 11211, so you can also not set this parameter;-U designated user;If you encounter a problem running memcached, the error message is as follows:/usr/local/servers/memcached/bin/memcached:error while loading shared libraries:libevent-1.4.so.2:cannot open shared Object File:no such file or directoryRun ld_dubug=libs to know the load path of the library when the memcached starts. Specific as follows:# ld_debug=libs/usr/local/servers/memcached/bin/memcached-v109
designated user;If you encounter a problem running memcached, the error message is as follows:/usr/local/servers/memcached/bin/memcached:error while loading shared libraries:libevent-1.4.so.2:cannot open shared Object File:no such file or directoryRun ld_dubug=libs to know the load path of the library when the memcached starts. Specific as follows:# ld_debug=libs/usr/local/servers/memcached/bin/memcached-v10929:find library=libevent-1.4.so.2 [0]; Searching10929:search Cache=/etc/ld.so.cache1092
key+value+flags, default 48Description The installation was successful and the path was configured correctly.There may be:Memcached:error while loading shared libraries:libevent-1.2.so.1:cannot open Shared object file:no such file or direct OryDescription did not find the file: libevent-1.2.so.1Solution:First step. To view the next Lib path:[Farman@localhost bin]$ Ld_debug=libs/usr/local/memcached/bin/memcached-v31386:find library=libevent-1.2.so.1 [0]; Searching31386:search Cache=/etc/ld.so.ca
about the construction of ObjectARX2016 64-bit development environment
C:\ObjectARX 2016\docs\arxdev.chm software Development environment and System Requirements
Developing Applications Withobjectarx 2016 on 32-bit requires the following software and Hardware:microsoft®windows®7 ( Enterprise, Professional, or Ultimate Edition) and windows®8/8.1 (Enterprise or Pro edition) intel®pentium®4 or AMD A Thlon™dual Core, 3.0 GHz or higher with SSE2 technology
about the construction of the ObjectARX2016 64-bit development environment
C:\ObjectARX 2016\docs\arxdev.chm Software development environment and System Requirements
Developing applications Withobjectarx on 32-bit requires the following software and hardware: microsoft®windows® 7 (Enterprise, Professional, or Ultimate edition) and windows®8/8.1 (Enterprise or Pro edition) intel®pentium®4 or A MD athlon™dual Core, 3.0 GHz or higher with SSE2 technolog
the user;
If you encounter problems when running memcached, the error prompt is as follows:
/Usr/local/servers/memcached/bin/memcached: error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file: No such file or directory
Run LD_DUBUG = libs to know the library loading path when memcached is started. The details are as follows:
# LD_DEBUG = libs/usr/local/servers/memcached/bin/memcached-v10929: find library = libevent-1.4.so.2 [0]; searching10929: search cache =/etc
. Therefore, you can leave this parameter unspecified;-U indicates the user;
If you encounter problems when running memcached, the error prompt is as follows:
/Usr/local/servers/memcached/bin/memcached: error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file: No such file or directory
Run LD_DUBUG = libs to know the library loading path when memcached is started. The details are as follows:
# LD_DEBUG = libs/usr/local/servers/memcached/bin/memcached-v10929: find l
listener. if it is a local machine, this parameter is usually not set;-P: Set the listening port. the default value is 11211. Therefore, you can leave this parameter unspecified;-U indicates the user;
If you encounter problems when running memcached, the error prompt is as follows:
/Usr/local/servers/memcached/bin/memcached: error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file: No such file or directory
Run LD_DUBUG = libs to know the library loading path when
memcached, the error prompt is as follows:/Data/memcached/bin/memcached: Error while loading shared libraries: libevent-1.3b.so.1: cannot open shared object file: no such file or directoryRun ld_dubug = libs to know the library loading path when memcached is started. The details are as follows:Ld_debug = libs/data/memcached/bin/memcached-V21404: Find library = libpthread. so.0 [0]; Searching21404: search cache =/etc/lD. So. Cache21404: Trying file =/lib/tls/libpthread. so.021404:21404: Find lib
directory
The file still cannot be found due to path issues.
Whereis libeventLet's see where my libevent is installed by default.
Libevent:/usr/local/lib/libevent. La/usr/local/lib/libevent. So/usr/local/lib/libevent.
Oh ~ In the/usr/local/lib/directory
Ld_debug = libs./linvo_httpd-VLet's see where the demo program found the file.
32372: Find library = libevent-1.4.so.2 [0]; Searching
32372: search cache =/etc/lD. So. Cache
32372: Search Path =/lib/tls/i686/
nobody-m 127.0.0.1-p 11211At this point, an exception is reportederror while loading shared Libraries:libevent-1.4.so.2:cannot open Shared object file:no such file or DIRECTORYThe reason is that the Libevent-1.4.so.2 class library is not found and the workaround is as follows:Use Ld_debug=help./memcached-v to determine which class library path to load by using the following method:Ld_debug=libs./memcached-v 2>1 >/dev/null | LessThe system will display: Linux:/local/memcached/bin # ld_debug=lib
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.