AMD 创新的微处理器、闪存和低功耗处理器解决方案
   AMD全球网站
ProcessorsFlash MemoryConnectivity SolutionsCorporate

Product InformationComputing SolutionsSell AMD ProductsSupport and DownloadsDevelop With AMD

Downloads
Utilities, Drivers, & Updates
Digital Media Library
Technical Documentation
System Building
System Building Guide
System Component Information
Online Help
Processor Support Forums
Ask AMD Knowledge Base
Warranty Information
Technical Frequently Asked Questions
General Frequently Asked Questions
Contact AMD
Resources for:
Channel Partners
Developers
Investors
Flash Memory Users
Job Seekers
Press
System Component Information
3rd Party Development Tools
Microsoft® Visual C++®
Software License Agreement

AMD Code Samples for Microsoft Visual Studio
Microsoft Visual C++

Microsoft Visual C++ Support for AMD Processors
 

Both Microsoft Visual C++.NET and Visual C++ 6.0 provide full support for Advanced Micro Devices processors, including support for 3DNow! Technology, Enhanced 3DNow! and MMX instruction sets. Features such as 3DNow! Compiler Intrinsics & In-Line Assembly, Macro Assembler (MASM), Run-Time Aligned Memory Management, and Debugging and Disassembly, are native to the Visual C++.NET compiler and are available via a Processor Pack for Visual C++6.0. These features will enable easier, straight forward and more productive code optimization for the AMD Athlon and Duron family of processors as well as for the K6-family (including embedded versions).

Please click here to download Microsoft Visual C++ 6.0 Processor Pack

Microsoft, Visual C++, Visual Studio are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.

AMD Code Samples
 

The following "OpTimer" examples demonstrate the use of 3DNow! Compiler Intrinsics and In-Line Assembly in a test program that can be used as a tool to determine the optimization quality of a function. For each of the examples, expand the .Zip archives, and open the OpTimer.dsw workspace to view an unrolled C, an optimized Inline Assembly, and an Intrinsic Implementation of a 4 x 4 matrix transformation (Example 1) or multiplication (Example 2). A 3 x 3 Matrix Addition and detailed documentation on the "OpTimer" test program are available in the AMD Athlon™ SDK.

*By downloading any of the software from this page, you agree to be bound by the terms of the software license agreement.

Download 3DNow Intrinsic code samples (.Zip, 12 kb)
 

The archived examples demonstrate the use of 3DNow! Compiler Intrinsics. The intrinsics _m_to_float and _m_from_float require Microsoft Visual Studio.NET.

Download memcpy() code sample (.Zip, 39 kb)
 

This memcpy() code is optimized for AMD Athlon and Duron processors. It uses MMX instructions and prefetch, and employs "non temporal" memory writes on large blocks, which bypass the cache for better efficiency.

This code typically provides significantly improved performance, as indicated in the example graph. Performance gains are dependent on particular system specs, including CPU speed, CPU type, chip set, main memory type, and main memory speed. The data block size and alignment are also factors. Developers should test their applications to determine their exact performance benefit.

Download OpTimer Code Sample 1 (.Zip, 16 kb) - Readme.txt
  OpTimer with a 4x4 Matrix Transformation - Source & Microsoft Developer Studio build project.
Download OpTimer Code Sample 2 (.Zip, 17 kb) - Readme.txt
 

OpTimer with a 4x4 Matrix Multiplication - Source & Microsoft Developer Studio build project.



Glossary       Support       Contact AMD      

Copyright 2008  Advanced Micro Devices, Inc.  Privacy  Trademark information