Skip to content

Instantly share code, notes, and snippets.

View tl3shi's full-sized avatar
🎯
Focusing

程序猿石头 tl3shi

🎯
Focusing
View GitHub Profile
@tl3shi
tl3shi / constructtest
Created May 31, 2014 03:32
初始化列表的形式比在构造函数体内通过赋值(=)更高效,赋值时会先调用default构造函数,然后再进行赋值,而初始化列表直接调用copy构造函数。
//
// Constructtest.cpp
//
// Created by tanglei.name on 14-5-31.
// Copyright (c) 2014年 tanglei.name. All rights reserved.
//
#include <iostream>
using namespace std;
//#define INIT
for %%i in (0 1 2 3 4 5 6 7 8 9) do (tscon %%i /dest:console )
@tl3shi
tl3shi / enum.cu
Last active December 28, 2015 07:09
the code used to detect the cuda devices. used in my blog tanglei.name to explain how to use remote desktop protocal to run cuda/opengl in a remote pc.
/*
* Copyright 1993-2010 NVIDIA Corporation. All rights reserved.
*
* NVIDIA Corporation and its licensors retain all intellectual property and
* proprietary rights in and to this software and related documentation.
* Any use, reproduction, disclosure, or distribution of this software
* and related documentation without an express license agreement from
* NVIDIA Corporation is strictly prohibited.
*
* Please refer to the applicable NVIDIA end user license agreement (EULA)