This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Test | |
open System.Collections.Generic | |
open SlimDX.DXGI | |
open SlimDX.Direct3D11 | |
let test2 (d: IDictionary<int, string>) key = | |
// tuple is allocated here, unless the patch is applied | |
let r, v = d.TryGetValue(key) | |
if r then v else "" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let permute (a: 'a array) = | |
let swap a i j = Array.permute (fun idx -> if idx = i then j else if idx = j then i else idx) a | |
let rec p a i = seq { | |
if i >= Array.length a then yield a | |
else for j=i to a.Length-1 do yield! p (swap a i j) (i + 1) } | |
p a 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* pugixml parser - version 1.0 | |
* -------------------------------------------------------- | |
* Copyright (C) 2006-2010, by Arseny Kapoulkine ([email protected]) | |
* Report bugs and download new versions at http://pugixml.org/ | |
* | |
* This library is distributed under the MIT License. See notice at the end | |
* of this file. | |
* | |
* This work is based on the pugxml parser, which is: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13a14,16 | |
> #ifndef SOURCE_PUGIXML_CPP | |
> #define SOURCE_PUGIXML_CPP | |
> | |
39a43 | |
> # pragma warning(push) | |
48a53 | |
> # pragma warning(push) | |
55a61 | |
> # pragma option push |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> | |
#include <cassert> | |
#include <vector> | |
#include <string> | |
#include <unordered_set> | |
class Mru | |
{ | |
public: | |
Mru(size_t size): _size(size), _limit(size * 2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> | |
#include <cassert> | |
#include <vector> | |
#include <string> | |
class Mru | |
{ | |
public: | |
Mru(size_t size): _size(size), _limit(size * size) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <new> | |
#include <cassert> | |
#include <cstdio> | |
#include <string> | |
#include <vector> | |
class Mru | |
{ | |
public: | |
Mru(size_t size): _size(0), _capacity(size), _buckets(nullptr), _bucketCount(size * 2), _first(nullptr), _last(nullptr) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type LM = LM of int * int | |
let lmgs = | |
[ | |
[ | |
LM (128, 512) | |
LM (512, 512) | |
LM (128, 512) | |
LM (256, 256) | |
LM (64, 64) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// cl 16.00.40219.01 for 80x86 | |
// Compile with /O2: | |
// pData - slcControlFlags = 48 | |
// Assertion failed: (pData - slcControlFlags) == sizeof(slcControlFlags), file msvc10optbug.cpp, line 46 | |
#include <stdint.h> | |
#include <assert.h> | |
#include <string.h> | |
#include <stdio.h> | |
const size_t kSlcSizeWithoutBoneArray = 96; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface IDiaEnumInjectedSources | |
{ | |
int count; | |
[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = | |
"System.Runtime.InteropServices.CustomMarshalers.EnumeratorToEnumVariantMarshaler")] | |
IEnumerator GetEnumerator(); | |
IDiaInjectedSource Item(uint index); | |
void Next(uint celt, out IDiaInjectedSource rgelt, out uint pceltFetched); |
OlderNewer