SlideShare a Scribd company logo
1 of 25
Visual Studio 2013
제대로 파헤쳐 보기!
11월의 주제
C++ 개발자와 함께하는
Visual Studio 2013
-한국 마이크로소프트 기술 에반젤리스트 김명신 부장
- Facebook/Twitter : @himskim
2014++ 흐름
This ISO C++ 개선 사이클:
더욱 더 빠르고 예측 가능하도록 개선
융통성 있게 concurrent /decoupled 등을
라이브러리를 제공하고 언어 확장도 지원
C++ 은 살아 숨쉬는 언어
Lang Extension
Lib building
Lib composability
Base Libs
Domain Libs


-
-
-

-

-
-



-
-
-
-
-

-

-



-
-
-


Visual C++는 C++14 을 목표로 하고 있습니다. 그래서 C++11과 C++ 14
를 같이 구현하고 있습니다. 당연히 모든 표준을 구현할 것이지만
개발자에게 가장 가치 있는 기능부터 우선적으로 구현하고자 합니다.
때문에 generic lambda와 같은 C++14의 주요 기능을 C++11의 다른 기
능보다 우선적으로 구현하는 경우도 있습니다.
Herb Sutter
- Microsoft Partner Program Manager
// Initialize elements of an aggregate (array, struct, union)
// in any order
union
struct
int
int
int
struct // .m2==0
int
string flip(string s)
{
reverse(begin(s), end(s));
return s;
}
int _tmain(int argc, _TCHAR* argv[])
{
vector<future<string>> v;
v.push_back(async([] { return flip(" emocleW"); }));
v.push_back(async([] { return flip(" ot"); }));
v.push_back(async([] { return flip("ndlrow ++C wen"); }));
for (auto &e : v)
{
cout << e.get();
}
return 0;
}
// C++11
class MyClass {
int _size;
int *_data;
public:
MyClass() : _size(0), _data(nullptr) {}
MyClass(int size) : _size(size) {} // 이런 _data 초기화를 누락!!
};
// C++14
class MyClass {
int _size = 0;
int *_data = nullptr;
public:
MyClass() {} // _size, _data 이미 초기화
MyClass(int size) : _size(size) {} // _data는 이미 초기화
};
클라우드를 위한 클라이언트 서버 통신 라이브러리
제공되는 기능
http://casablanca.codeplex.com
http_client client(L"http://www.myhttpserver.com");
http_request request(methods::GET);
client.request(request).then([](http_response response)
{
// Perform actions here to inspect the HTTP response...
if(response.status_code() == status_codes::OK)
{
}
});
void RequestJSONValue()
{
http_client client(L"http://www.myhttpserver.com");
client.request(methods::GET).then([](http_response response)
{
if(response.status_code() == status_codes::OK)
{
return response.extract_json();
}
// Handle error cases, for now return null json value...
return task_from_result(json::value());
})
.then([](json::value v)
{
// Perform actions here to process the JSON value...
});
}
NuGet
손쉬운 라이브러리 사용
프로젝트 경로 자동 Update
커뮤니티를 통한 라이브러리
공유 방식 간소화
http://nuget.codeplex.com
Modern C++ Code Editor
Scrollbar
Peek Definition
Event Handler
Toggle Header
Formatting
Brace Completion
Navigate-To
Configurable
Automatically Applied
170
100
40
0.5
0
50
100
150
200
First Time Switch (sec) Subsequent Switches (sec)
Time to switch configuration
Visual Studio 2012 Visual Studio 2013
Performance Optimization Recap
Compilation Unit Optimizations
• /O2 and friends
Whole Program Optimizations
• /GL and /LTCG
Profile-Guided Optimizations
• /LTCG:PGI and /LTCG:PGO
루프내에서만의 Vectorization을 넘어서
VS 2012:
• 루프 내에서만 “vector” instruction 사용
VS 2013 추가
• Statement level vectorization
• Permutation of perfect loop nests
• Range propagation optimizations
• Support for more operations: min/max,
converts, shifts, byteswap, averaging
• Reductions into array elements
• __restrict support for vector alias checking
• Improvements to data dependence analysis
• C++ pointer vectorization
• Gather / scatter optimizations
for (i = 0; i < 1000; i++) {
A[i] = B[i] + C[i];
}
+
r1 r2
r3
add r3, r1, r2
SCALAR
(1 operation)
v1 v2
v3
+
vector
length
vadd v3, v1, v2
VECTOR
(N operations)
Vector Calling Convention
struct Particle {
__m256 x;
__m256 y;
__m256 z;
__m256 w;
};
Particle __vectorcall foo(Particle a, __m256 scale)
{
Particle t;
t.x = _mm256_mul_ps(a.x, scale);
t.y = _mm256_mul_ps(a.y, scale);
t.z = _mm256_mul_ps(a.z, scale);
t.w = _mm256_mul_ps(a.w, scale);
return t;
}
Reduces instruction count
Minimizes stack allocation
Use /Gv for whole module
Improved C++ AMP
Available in Visual Studio 2012
Visual Studio 2013 추가
C++ 개발자와 함께 하는 visual studio 2013

More Related Content

Similar to C++ 개발자와 함께 하는 visual studio 2013

KGC10 - Visual C++10과 디버깅
KGC10 - Visual C++10과 디버깅KGC10 - Visual C++10과 디버깅
KGC10 - Visual C++10과 디버깅흥배 최
 
Boost 라이브리와 C++11
Boost 라이브리와 C++11Boost 라이브리와 C++11
Boost 라이브리와 C++11OnGameServer
 
About Visual C++ 10
About  Visual C++ 10About  Visual C++ 10
About Visual C++ 10흥배 최
 
ifcpp build guide
ifcpp build guideifcpp build guide
ifcpp build guideJUNHEEKIM27
 
코드로 바로 해버리는 서버리스 오케스트레이션 - Azure Durable Functions
코드로 바로 해버리는 서버리스 오케스트레이션 - Azure Durable Functions코드로 바로 해버리는 서버리스 오케스트레이션 - Azure Durable Functions
코드로 바로 해버리는 서버리스 오케스트레이션 - Azure Durable FunctionsJongin Lee
 
Design pattern 옵저버
Design pattern 옵저버Design pattern 옵저버
Design pattern 옵저버Sukjin Yun
 
[NDC17] Unreal.js - 자바스크립트로 쉽고 빠른 UE4 개발하기
[NDC17] Unreal.js - 자바스크립트로 쉽고 빠른 UE4 개발하기[NDC17] Unreal.js - 자바스크립트로 쉽고 빠른 UE4 개발하기
[NDC17] Unreal.js - 자바스크립트로 쉽고 빠른 UE4 개발하기현철 조
 
3D 모델러 ADDIN 개발과정 요약
3D 모델러 ADDIN 개발과정 요약3D 모델러 ADDIN 개발과정 요약
3D 모델러 ADDIN 개발과정 요약Tae wook kang
 
객체지향프로그래밍 특강
객체지향프로그래밍 특강객체지향프로그래밍 특강
객체지향프로그래밍 특강uEngine Solutions
 
01.개발환경 교육교재
01.개발환경 교육교재01.개발환경 교육교재
01.개발환경 교육교재Hankyo
 
NDC 2017 하재승 NEXON ZERO (넥슨 제로) 점검없이 실시간으로 코드 수정 및 게임 정보 수집하기
NDC 2017 하재승 NEXON ZERO (넥슨 제로) 점검없이 실시간으로 코드 수정 및 게임 정보 수집하기NDC 2017 하재승 NEXON ZERO (넥슨 제로) 점검없이 실시간으로 코드 수정 및 게임 정보 수집하기
NDC 2017 하재승 NEXON ZERO (넥슨 제로) 점검없이 실시간으로 코드 수정 및 게임 정보 수집하기Jaeseung Ha
 
Domain Specific Languages With Groovy
Domain Specific Languages With GroovyDomain Specific Languages With Groovy
Domain Specific Languages With GroovyTommy C. Kang
 
[C++ Korea 3rd Seminar] 새 C++은 새 Visual Studio에, 좌충우돌 마이그레이션 이야기
[C++ Korea 3rd Seminar] 새 C++은 새 Visual Studio에, 좌충우돌 마이그레이션 이야기[C++ Korea 3rd Seminar] 새 C++은 새 Visual Studio에, 좌충우돌 마이그레이션 이야기
[C++ Korea 3rd Seminar] 새 C++은 새 Visual Studio에, 좌충우돌 마이그레이션 이야기Chris Ohk
 
Android Native Module 안정적으로 개발하기
Android Native Module 안정적으로 개발하기Android Native Module 안정적으로 개발하기
Android Native Module 안정적으로 개발하기hanbeom Park
 
Spring Boot + React + Gradle in VSCode
Spring Boot + React + Gradle in VSCodeSpring Boot + React + Gradle in VSCode
Spring Boot + React + Gradle in VSCodedpTablo
 
올챙이로 살펴보는 개발툴과 Cloud
올챙이로 살펴보는 개발툴과 Cloud올챙이로 살펴보는 개발툴과 Cloud
올챙이로 살펴보는 개발툴과 Cloudcho hyun jong
 
반복적인 작업이 싫은 안드로이드 개발자에게
반복적인 작업이 싫은 안드로이드 개발자에게반복적인 작업이 싫은 안드로이드 개발자에게
반복적인 작업이 싫은 안드로이드 개발자에게Sungju Jin
 
C++20 Key Features Summary
C++20 Key Features SummaryC++20 Key Features Summary
C++20 Key Features SummaryChris Ohk
 
100828 [visual studio camp #1] C++0x와 Windows7
100828 [visual studio camp #1] C++0x와 Windows7100828 [visual studio camp #1] C++0x와 Windows7
100828 [visual studio camp #1] C++0x와 Windows7sung ki choi
 

Similar to C++ 개발자와 함께 하는 visual studio 2013 (20)

KGC10 - Visual C++10과 디버깅
KGC10 - Visual C++10과 디버깅KGC10 - Visual C++10과 디버깅
KGC10 - Visual C++10과 디버깅
 
Boost 라이브리와 C++11
Boost 라이브리와 C++11Boost 라이브리와 C++11
Boost 라이브리와 C++11
 
About Visual C++ 10
About  Visual C++ 10About  Visual C++ 10
About Visual C++ 10
 
ifcpp build guide
ifcpp build guideifcpp build guide
ifcpp build guide
 
코드로 바로 해버리는 서버리스 오케스트레이션 - Azure Durable Functions
코드로 바로 해버리는 서버리스 오케스트레이션 - Azure Durable Functions코드로 바로 해버리는 서버리스 오케스트레이션 - Azure Durable Functions
코드로 바로 해버리는 서버리스 오케스트레이션 - Azure Durable Functions
 
Design pattern 옵저버
Design pattern 옵저버Design pattern 옵저버
Design pattern 옵저버
 
[NDC17] Unreal.js - 자바스크립트로 쉽고 빠른 UE4 개발하기
[NDC17] Unreal.js - 자바스크립트로 쉽고 빠른 UE4 개발하기[NDC17] Unreal.js - 자바스크립트로 쉽고 빠른 UE4 개발하기
[NDC17] Unreal.js - 자바스크립트로 쉽고 빠른 UE4 개발하기
 
3D 모델러 ADDIN 개발과정 요약
3D 모델러 ADDIN 개발과정 요약3D 모델러 ADDIN 개발과정 요약
3D 모델러 ADDIN 개발과정 요약
 
객체지향프로그래밍 특강
객체지향프로그래밍 특강객체지향프로그래밍 특강
객체지향프로그래밍 특강
 
01.개발환경 교육교재
01.개발환경 교육교재01.개발환경 교육교재
01.개발환경 교육교재
 
NDC 2017 하재승 NEXON ZERO (넥슨 제로) 점검없이 실시간으로 코드 수정 및 게임 정보 수집하기
NDC 2017 하재승 NEXON ZERO (넥슨 제로) 점검없이 실시간으로 코드 수정 및 게임 정보 수집하기NDC 2017 하재승 NEXON ZERO (넥슨 제로) 점검없이 실시간으로 코드 수정 및 게임 정보 수집하기
NDC 2017 하재승 NEXON ZERO (넥슨 제로) 점검없이 실시간으로 코드 수정 및 게임 정보 수집하기
 
Domain Specific Languages With Groovy
Domain Specific Languages With GroovyDomain Specific Languages With Groovy
Domain Specific Languages With Groovy
 
[C++ Korea 3rd Seminar] 새 C++은 새 Visual Studio에, 좌충우돌 마이그레이션 이야기
[C++ Korea 3rd Seminar] 새 C++은 새 Visual Studio에, 좌충우돌 마이그레이션 이야기[C++ Korea 3rd Seminar] 새 C++은 새 Visual Studio에, 좌충우돌 마이그레이션 이야기
[C++ Korea 3rd Seminar] 새 C++은 새 Visual Studio에, 좌충우돌 마이그레이션 이야기
 
Android Native Module 안정적으로 개발하기
Android Native Module 안정적으로 개발하기Android Native Module 안정적으로 개발하기
Android Native Module 안정적으로 개발하기
 
요즘웹개발
요즘웹개발요즘웹개발
요즘웹개발
 
Spring Boot + React + Gradle in VSCode
Spring Boot + React + Gradle in VSCodeSpring Boot + React + Gradle in VSCode
Spring Boot + React + Gradle in VSCode
 
올챙이로 살펴보는 개발툴과 Cloud
올챙이로 살펴보는 개발툴과 Cloud올챙이로 살펴보는 개발툴과 Cloud
올챙이로 살펴보는 개발툴과 Cloud
 
반복적인 작업이 싫은 안드로이드 개발자에게
반복적인 작업이 싫은 안드로이드 개발자에게반복적인 작업이 싫은 안드로이드 개발자에게
반복적인 작업이 싫은 안드로이드 개발자에게
 
C++20 Key Features Summary
C++20 Key Features SummaryC++20 Key Features Summary
C++20 Key Features Summary
 
100828 [visual studio camp #1] C++0x와 Windows7
100828 [visual studio camp #1] C++0x와 Windows7100828 [visual studio camp #1] C++0x와 Windows7
100828 [visual studio camp #1] C++0x와 Windows7
 

More from 명신 김

업무를 빼고 가치를 더하는 클라우드 기술
업무를 빼고 가치를 더하는 클라우드 기술업무를 빼고 가치를 더하는 클라우드 기술
업무를 빼고 가치를 더하는 클라우드 기술명신 김
 
[2020 Ignite Seoul]Azure에서 사용할 수 있는 컨테이너/오케스트레이션 기술 살펴보기
[2020 Ignite Seoul]Azure에서 사용할 수 있는 컨테이너/오케스트레이션 기술 살펴보기[2020 Ignite Seoul]Azure에서 사용할 수 있는 컨테이너/오케스트레이션 기술 살펴보기
[2020 Ignite Seoul]Azure에서 사용할 수 있는 컨테이너/오케스트레이션 기술 살펴보기명신 김
 
Best of Build Seoul 2019 Keynote
Best of Build Seoul 2019 KeynoteBest of Build Seoul 2019 Keynote
Best of Build Seoul 2019 Keynote명신 김
 
Passwordless society
Passwordless societyPasswordless society
Passwordless society명신 김
 
DevOps and Azure Devops 소개, 동향, 그리고 기대효과
DevOps and Azure Devops 소개, 동향, 그리고 기대효과DevOps and Azure Devops 소개, 동향, 그리고 기대효과
DevOps and Azure Devops 소개, 동향, 그리고 기대효과명신 김
 
Serverless design and adoption
Serverless design and adoptionServerless design and adoption
Serverless design and adoption명신 김
 
Durable functions
Durable functionsDurable functions
Durable functions명신 김
 
Azure functions v2 announcement
Azure functions v2 announcementAzure functions v2 announcement
Azure functions v2 announcement명신 김
 
Azure functions
Azure functionsAzure functions
Azure functions명신 김
 
Azure event grid
Azure event gridAzure event grid
Azure event grid명신 김
 
Serverless, Azure Functions, Logic Apps
Serverless, Azure Functions, Logic AppsServerless, Azure Functions, Logic Apps
Serverless, Azure Functions, Logic Apps명신 김
 
Microservices architecture
Microservices architectureMicroservices architecture
Microservices architecture명신 김
 
Visual studio 2015를 활용한 개발 생산성 및 코드 품질 혁신
Visual studio 2015를 활용한 개발 생산성 및 코드 품질 혁신Visual studio 2015를 활용한 개발 생산성 및 코드 품질 혁신
Visual studio 2015를 활용한 개발 생산성 및 코드 품질 혁신명신 김
 
Connect(); 2016 한시간 총정리
Connect(); 2016 한시간 총정리Connect(); 2016 한시간 총정리
Connect(); 2016 한시간 총정리명신 김
 
크로스 플랫폼을 품은 오픈 소스 프레임워크 .NET Core
크로스 플랫폼을 품은 오픈 소스 프레임워크 .NET Core크로스 플랫폼을 품은 오픈 소스 프레임워크 .NET Core
크로스 플랫폼을 품은 오픈 소스 프레임워크 .NET Core명신 김
 
Coded UI test를 이용한 테스트 자동화
Coded UI test를 이용한 테스트 자동화Coded UI test를 이용한 테스트 자동화
Coded UI test를 이용한 테스트 자동화명신 김
 
VS2015 C++ new features
VS2015 C++ new featuresVS2015 C++ new features
VS2015 C++ new features명신 김
 
Welcome to the microsoft madness
Welcome to the microsoft madnessWelcome to the microsoft madness
Welcome to the microsoft madness명신 김
 

More from 명신 김 (20)

업무를 빼고 가치를 더하는 클라우드 기술
업무를 빼고 가치를 더하는 클라우드 기술업무를 빼고 가치를 더하는 클라우드 기술
업무를 빼고 가치를 더하는 클라우드 기술
 
[2020 Ignite Seoul]Azure에서 사용할 수 있는 컨테이너/오케스트레이션 기술 살펴보기
[2020 Ignite Seoul]Azure에서 사용할 수 있는 컨테이너/오케스트레이션 기술 살펴보기[2020 Ignite Seoul]Azure에서 사용할 수 있는 컨테이너/오케스트레이션 기술 살펴보기
[2020 Ignite Seoul]Azure에서 사용할 수 있는 컨테이너/오케스트레이션 기술 살펴보기
 
Best of Build Seoul 2019 Keynote
Best of Build Seoul 2019 KeynoteBest of Build Seoul 2019 Keynote
Best of Build Seoul 2019 Keynote
 
Passwordless society
Passwordless societyPasswordless society
Passwordless society
 
DevOps and Azure Devops 소개, 동향, 그리고 기대효과
DevOps and Azure Devops 소개, 동향, 그리고 기대효과DevOps and Azure Devops 소개, 동향, 그리고 기대효과
DevOps and Azure Devops 소개, 동향, 그리고 기대효과
 
Serverless design and adoption
Serverless design and adoptionServerless design and adoption
Serverless design and adoption
 
Durable functions
Durable functionsDurable functions
Durable functions
 
Azure functions v2 announcement
Azure functions v2 announcementAzure functions v2 announcement
Azure functions v2 announcement
 
Azure functions
Azure functionsAzure functions
Azure functions
 
Logic apps
Logic appsLogic apps
Logic apps
 
Serverless
ServerlessServerless
Serverless
 
Azure event grid
Azure event gridAzure event grid
Azure event grid
 
Serverless, Azure Functions, Logic Apps
Serverless, Azure Functions, Logic AppsServerless, Azure Functions, Logic Apps
Serverless, Azure Functions, Logic Apps
 
Microservices architecture
Microservices architectureMicroservices architecture
Microservices architecture
 
Visual studio 2015를 활용한 개발 생산성 및 코드 품질 혁신
Visual studio 2015를 활용한 개발 생산성 및 코드 품질 혁신Visual studio 2015를 활용한 개발 생산성 및 코드 품질 혁신
Visual studio 2015를 활용한 개발 생산성 및 코드 품질 혁신
 
Connect(); 2016 한시간 총정리
Connect(); 2016 한시간 총정리Connect(); 2016 한시간 총정리
Connect(); 2016 한시간 총정리
 
크로스 플랫폼을 품은 오픈 소스 프레임워크 .NET Core
크로스 플랫폼을 품은 오픈 소스 프레임워크 .NET Core크로스 플랫폼을 품은 오픈 소스 프레임워크 .NET Core
크로스 플랫폼을 품은 오픈 소스 프레임워크 .NET Core
 
Coded UI test를 이용한 테스트 자동화
Coded UI test를 이용한 테스트 자동화Coded UI test를 이용한 테스트 자동화
Coded UI test를 이용한 테스트 자동화
 
VS2015 C++ new features
VS2015 C++ new featuresVS2015 C++ new features
VS2015 C++ new features
 
Welcome to the microsoft madness
Welcome to the microsoft madnessWelcome to the microsoft madness
Welcome to the microsoft madness
 

C++ 개발자와 함께 하는 visual studio 2013

  • 1. Visual Studio 2013 제대로 파헤쳐 보기! 11월의 주제 C++ 개발자와 함께하는 Visual Studio 2013 -한국 마이크로소프트 기술 에반젤리스트 김명신 부장 - Facebook/Twitter : @himskim
  • 2.
  • 3.
  • 4. 2014++ 흐름 This ISO C++ 개선 사이클: 더욱 더 빠르고 예측 가능하도록 개선 융통성 있게 concurrent /decoupled 등을 라이브러리를 제공하고 언어 확장도 지원 C++ 은 살아 숨쉬는 언어
  • 5.
  • 6. Lang Extension Lib building Lib composability Base Libs Domain Libs   - - -  -  - -    - - - - -  -  -    - - -  
  • 7.
  • 8. Visual C++는 C++14 을 목표로 하고 있습니다. 그래서 C++11과 C++ 14 를 같이 구현하고 있습니다. 당연히 모든 표준을 구현할 것이지만 개발자에게 가장 가치 있는 기능부터 우선적으로 구현하고자 합니다. 때문에 generic lambda와 같은 C++14의 주요 기능을 C++11의 다른 기 능보다 우선적으로 구현하는 경우도 있습니다. Herb Sutter - Microsoft Partner Program Manager
  • 9. // Initialize elements of an aggregate (array, struct, union) // in any order union struct int int int struct // .m2==0 int
  • 10. string flip(string s) { reverse(begin(s), end(s)); return s; } int _tmain(int argc, _TCHAR* argv[]) { vector<future<string>> v; v.push_back(async([] { return flip(" emocleW"); })); v.push_back(async([] { return flip(" ot"); })); v.push_back(async([] { return flip("ndlrow ++C wen"); })); for (auto &e : v) { cout << e.get(); } return 0; }
  • 11. // C++11 class MyClass { int _size; int *_data; public: MyClass() : _size(0), _data(nullptr) {} MyClass(int size) : _size(size) {} // 이런 _data 초기화를 누락!! }; // C++14 class MyClass { int _size = 0; int *_data = nullptr; public: MyClass() {} // _size, _data 이미 초기화 MyClass(int size) : _size(size) {} // _data는 이미 초기화 };
  • 12.
  • 13. 클라우드를 위한 클라이언트 서버 통신 라이브러리 제공되는 기능 http://casablanca.codeplex.com
  • 14. http_client client(L"http://www.myhttpserver.com"); http_request request(methods::GET); client.request(request).then([](http_response response) { // Perform actions here to inspect the HTTP response... if(response.status_code() == status_codes::OK) { } });
  • 15. void RequestJSONValue() { http_client client(L"http://www.myhttpserver.com"); client.request(methods::GET).then([](http_response response) { if(response.status_code() == status_codes::OK) { return response.extract_json(); } // Handle error cases, for now return null json value... return task_from_result(json::value()); }) .then([](json::value v) { // Perform actions here to process the JSON value... }); }
  • 16. NuGet 손쉬운 라이브러리 사용 프로젝트 경로 자동 Update 커뮤니티를 통한 라이브러리 공유 방식 간소화 http://nuget.codeplex.com
  • 17. Modern C++ Code Editor Scrollbar Peek Definition Event Handler Toggle Header Formatting Brace Completion Navigate-To
  • 19. 170 100 40 0.5 0 50 100 150 200 First Time Switch (sec) Subsequent Switches (sec) Time to switch configuration Visual Studio 2012 Visual Studio 2013
  • 20.
  • 21. Performance Optimization Recap Compilation Unit Optimizations • /O2 and friends Whole Program Optimizations • /GL and /LTCG Profile-Guided Optimizations • /LTCG:PGI and /LTCG:PGO
  • 22. 루프내에서만의 Vectorization을 넘어서 VS 2012: • 루프 내에서만 “vector” instruction 사용 VS 2013 추가 • Statement level vectorization • Permutation of perfect loop nests • Range propagation optimizations • Support for more operations: min/max, converts, shifts, byteswap, averaging • Reductions into array elements • __restrict support for vector alias checking • Improvements to data dependence analysis • C++ pointer vectorization • Gather / scatter optimizations for (i = 0; i < 1000; i++) { A[i] = B[i] + C[i]; } + r1 r2 r3 add r3, r1, r2 SCALAR (1 operation) v1 v2 v3 + vector length vadd v3, v1, v2 VECTOR (N operations)
  • 23. Vector Calling Convention struct Particle { __m256 x; __m256 y; __m256 z; __m256 w; }; Particle __vectorcall foo(Particle a, __m256 scale) { Particle t; t.x = _mm256_mul_ps(a.x, scale); t.y = _mm256_mul_ps(a.y, scale); t.z = _mm256_mul_ps(a.z, scale); t.w = _mm256_mul_ps(a.w, scale); return t; } Reduces instruction count Minimizes stack allocation Use /Gv for whole module
  • 24. Improved C++ AMP Available in Visual Studio 2012 Visual Studio 2013 추가

Editor's Notes

  1. Developers love C++ for its compatibility across platforms. Visual Studio 2013 continues to enhance compatibility through language enhancements.
  2. SG 2-4: Kona, Feb 2012 SG 5: May 2012 SG 1 meeting SG 6: around August 2012 SG 7, 8, and 9: Portland, Oct 2012 LEWG: Dec 2013 SG 10: Jan 2013 SG 11: Bristol, Apr 2013 SG 12: May 2013
  3. Developer productivity has also improved.
  4. NuGet is a Visual Studio extension that makes it easy to add, remove, and update libraries and tools in Visual Studio projects... If you develop a library or tool that you want to share with other developers, you create a NuGet package and store the package in a NuGet repository. If you want to use a library or tool that someone else has developed, you retrieve the package from the repository and install it in your Visual Studio project or solution. Resources NuGet on Codeplex, http://nuget.codeplex.com/ NuGet for C++ on the VCBlog, http://blogs.msdn.com/b/vcblog/archive/2013/04/26/nuget-for-c.aspx
  5. In Visual Studio 2013, we have introduced new features that boost productivity and save time when working inside the Editor. Some of these are new features and some are the most popular extensions from Productivity Power Tools. These features are a result of the feedback you gave us through User Voice requests, forum posts and Connect bugs. The MVP community also helped us pick some of these experiences. Our primary focus for the Editor in this version is to keep the developer in context as much as possible. The Enhanced Scrollbar has been one of the most popular Productivity Power Tools extensions and is now part of the Visual Studio 2013 product! The Enhanced Scrollbar provides you visual cues about your file on the vertical scrollbar. Markers on the scrollbar allow you to quickly view the location of errors, warnings, breakpoints, bookmarks, find results and other useful information in your file. Here, too, we focus on bringing information to your fingertips – you don’t have to scroll away from your current position to get information about other parts of your file. We know developers move around code a lot when browsing definitions. While designing Visual Studio 2013 features, we looked at the elements and gestures that will help developers stay in context of their code while browsing through definitions. Peek Definition is one such feature that allows you to view definitions inline in the Editor without having to open a new document tab. To see it in action, right click on a symbol and click on the “Peek Definition” command in the context menu or invoke the keyboard shortcut Alt + F12. Part of our quest for more productive development is moving away from separate tool windows and modal dialogs towards fluid, inline experiences that keep you focused on coding rather than managing Visual Studio. We analyzed usage data and decided to update Navigate To, a widely-used feature that until now, resided in a modal dialog. Using the new Navigate To, you type in any part of a symbol and can find its definition, using smart semantic search. You can also type in part of a file name in your solution and quickly switch to it, regardless of whether or not it was previously open. Navigate To in Visual Studio 2013 supports all previous capabilities in a fluid, non-modal and space efficient way. We positioned the new search window around the same upper-right area as the in-editor Find. This positioning allows us to display both the preview tab and maximize the number of Navigate To results we can display on screen without blocking your view of the preview code. Selecting a result automatically displays it in a preview tab. This helps ensure the selected result is what you're searching for, so you can make a better decision before committing to the new view. To make sure context is easily preserved, pressing Escape takes you back to your initial location if the result wasn't what you were looking for. The Parameter Help tooltip that appears when typing parameters of an overloaded function will now automatically switch to the best matching overload based on the number of parameters you've typed thus far. And it properly handles nested function calls – when you start typing a nested function call, Parameter Help will display results relevant to the nested call, then restore the contents of the tooltip to the outer function call when you close the argument list. [This text was grabbed from the resources listed below.] Resources Visual Studio 2013 New Editor Features, http://blogs.msdn.com/b/visualstudio/archive/2013/07/15/visual-studio-2013-new-editor-features.aspx What’s New for Visual C++ Developers in Visual Studio 2013 Preview, https://tr17.techreadytv.com/sessions/DEV227.aspx C++ IDE Improvements in Visual Studio 2013, http://blogs.msdn.com/b/vcblog/archive/2013/08/26/10443635.aspx
  6. C++ is known for performance. With Visual Studio 2013, we have added more enhancements to make code run faster.
  7. Modern, 64-bit processors, such as the Intel 64 and AMD64, include a set of 16 registers that perform arithmetic operations on integers. They are called scalar registers because they hold just one value at any time. We can write C++ code that adds two integer variables together. That compiler may transform the program to add those two values, using two registers. If we have 1000 pairs of integers to add together, we need to execute 1000 such additions. However, for several years, these chips have included an additional set of 16 registers, each 128 bits wide. Rather than hold a single, 128-bit wide value, they can hold a collection of smaller values; for example, 4 integers, each 32 bits wide. They are called vector registers because they can hold several values at any one time. The chips also provide new instructions to perform arithmetic on these 4 packed integers. So we can add 4 pairs of integers with a single instruction, in the same time that it took to add just 1 pair of integers when using the scalar registers. Vectorization, then, is the process of using these vector registers, instead of scalar registers, in an attempt to make the program run faster. In a perfect world, our example loop would execute 4 times faster, but things are rarely perfect due to overhead. Automatic Vectorization C++ pointer vectorization. The compiler can now recognize more opportunities to vectorize loops that use pointers to access data. Statement level vectorization. __vectorcall (/Gv). You can now pass vector type arguments by using the __vectorcall calling convention to use vector registers. Using the new “__vector” calling convention on the appropriate methods improves performance by reducing instruction count, and minimizes stack allocation. By using this convention, DirectX itself is running about 15% faster. Permutation of perfect loop nests. Resources Jim Radigan breaks it down in his series Inside Vectorization on Channel 9, http://channel9.msdn.com/Series/C9-Lectures-Jim-Radigan-Inside-Auto-Vectorization/Jim-Radigan-Inside-Auto-Vectorization-1-of-n Jim Hogg wrote Optimizing C++ Code: Overview on the VCBlog, http://blogs.msdn.com/b/vcblog/archive/2013/06/12/optimizing-c-code-new-title.aspx Auto-Parallelization and Auto-Vectorization in the MSDN library, http://msdn.microsoft.com/en-us/library/hh872235.aspx
  8. Modern, 64-bit processors, such as the Intel 64 and AMD64, include a set of 16 registers that perform arithmetic operations on integers. They are called scalar registers because they hold just one value at any time. We can write C++ code that adds two integer variables together. That compiler may transform the program to add those two values, using two registers. If we have 1000 pairs of integers to add together, we need to execute 1000 such additions. However, for several years, these chips have included an additional set of 16 registers, each 128 bits wide. Rather than hold a single, 128-bit wide value, they can hold a collection of smaller values; for example, 4 integers, each 32 bits wide. They are called vector registers because they can hold several values at any one time. The chips also provide new instructions to perform arithmetic on these 4 packed integers. So we can add 4 pairs of integers with a single instruction, in the same time that it took to add just 1 pair of integers when using the scalar registers. Vectorization, then, is the process of using these vector registers, instead of scalar registers, in an attempt to make the program run faster. In a perfect world, our example loop would execute 4 times faster, but things are rarely perfect due to overhead. Automatic Vectorization C++ pointer vectorization. The compiler can now recognize more opportunities to vectorize loops that use pointers to access data. Statement level vectorization. __vectorcall (/Gv). You can now pass vector type arguments by using the __vectorcall calling convention to use vector registers. Using the new “__vector” calling convention on the appropriate methods improves performance by reducing instruction count, and minimizes stack allocation. By using this convention, DirectX itself is running about 15% faster. Permutation of perfect loop nests. Resources Jim Radigan breaks it down in his series Inside Vectorization on Channel 9, http://channel9.msdn.com/Series/C9-Lectures-Jim-Radigan-Inside-Auto-Vectorization/Jim-Radigan-Inside-Auto-Vectorization-1-of-n Jim Hogg wrote Optimizing C++ Code: Overview on the VCBlog, http://blogs.msdn.com/b/vcblog/archive/2013/06/12/optimizing-c-code-new-title.aspx Auto-Parallelization and Auto-Vectorization in the MSDN library, http://msdn.microsoft.com/en-us/library/hh872235.aspx
  9. Modern, 64-bit processors, such as the Intel 64 and AMD64, include a set of 16 registers that perform arithmetic operations on integers. They are called scalar registers because they hold just one value at any time. We can write C++ code that adds two integer variables together. That compiler may transform the program to add those two values, using two registers. If we have 1000 pairs of integers to add together, we need to execute 1000 such additions. However, for several years, these chips have included an additional set of 16 registers, each 128 bits wide. Rather than hold a single, 128-bit wide value, they can hold a collection of smaller values; for example, 4 integers, each 32 bits wide. They are called vector registers because they can hold several values at any one time. The chips also provide new instructions to perform arithmetic on these 4 packed integers. So we can add 4 pairs of integers with a single instruction, in the same time that it took to add just 1 pair of integers when using the scalar registers. Vectorization, then, is the process of using these vector registers, instead of scalar registers, in an attempt to make the program run faster. In a perfect world, our example loop would execute 4 times faster, but things are rarely perfect due to overhead. Automatic Vectorization C++ pointer vectorization. The compiler can now recognize more opportunities to vectorize loops that use pointers to access data. Statement level vectorization. __vectorcall (/Gv). You can now pass vector type arguments by using the __vectorcall calling convention to use vector registers. Using the new “__vector” calling convention on the appropriate methods improves performance by reducing instruction count, and minimizes stack allocation. By using this convention, DirectX itself is running about 15% faster. Permutation of perfect loop nests. Resources Jim Radigan breaks it down in his series Inside Vectorization on Channel 9, http://channel9.msdn.com/Series/C9-Lectures-Jim-Radigan-Inside-Auto-Vectorization/Jim-Radigan-Inside-Auto-Vectorization-1-of-n Jim Hogg wrote Optimizing C++ Code: Overview on the VCBlog, http://blogs.msdn.com/b/vcblog/archive/2013/06/12/optimizing-c-code-new-title.aspx Auto-Parallelization and Auto-Vectorization in the MSDN library, http://msdn.microsoft.com/en-us/library/hh872235.aspx
  10. Visual Studio 2012 introduced a set of libraries that help you harness the power of the highly parallel GPU, common in PC’s today, called C++ AMP where AMP is short for Accelerated Massive Parallelism. C++ AMP is builds on Direct3D and is able to offloading compute operations on to the GPU. This capability originated in the need to be able to perform lighting for 3D models and other visual effects that need to be applied to every single pixel a GPU renders. These are naturally very parallelizable tasks, so graphics cards have moved towards an architecture of having hundreds of very simple processing units. C++ AMP is an open specification for enabling the processing resources of modern graphics cards to be accessed from C++. Visual Studio 2013 continues support for this standard. C++ AMP enjoys a first class experience inside Visual Studio 2013 including debugger and profiler support extended to bring to you operations being performed on the GPU. Available in Visual Studio 2012 These features were shipped in Visual Studio 2012. Visual Studio 2013 additions The CPU\GPU data transfer efficiency on accelerators that share physical memory with CPU is now significantly enhanced due to elimination of redundant copying of data between GPU and CPU memory. Depending upon how the code was written, C++ AMP application that run on integrated GPU and WARP accelerators should see no (or significantly reduced) time spent on copying data. This feature is available only on Windows 8.1 and is turned on by default for WARP and some integrated GPUs. Additionally, developers can also opt into the feature programmatically through a set of APIs. In Visual Studio 2013, we added a bunch of features to enhance support for textures. This support includes access to hardware texture sampling capabilities, support for staging textures, texture_view redesigned (to be more consistent with array_view design), a more complete and performant set of texture copy APIs including section copy, better interop support for textures including a much bigger set of DXGI formats, and support for mipmap. We also added side-by-side CPU\GPU debugging (mixed mode debugging is available on Windows 8.1 for the WARP accelerator) and the ability to debug using the WARP accelerator instead of single threaded ref accelerator. Using WARP for debugging provides a much faster debugging experience. Resources What’s new for C++ AMP in Visual Studio 2013 on the Native Concurrency blog, http://blogs.msdn.com/b/nativeconcurrency/archive/2013/06/28/what-s-new-for-c-amp-in-visual-studio-2013.aspx C++ AMP Overview in the MSDN library, http://msdn.microsoft.com/en-us/library/vstudio/hh265136.aspx