Template Metaprogramming: Type TraitsCppCon 2020 Template Metaprogramming: Type Traits Part 1 Jody Hagins jhagins@maystreet.com coachhagins@gmail.com ## CppCon 2020 Template Metaprogramming: Type Traits Introduction ## I ntended Audience Not necessarily beginner to C++, but beginner to traditional template metaprogramming techniques • Type traits part of standard library for ~10 years ## I ntended Audience • Beginner/Intermediate • Gentle Not necessarily beginner to C++, but beginner to traditional template metaprogramming techniques • Type traits part of standard library for ~10 years • Fundamentals have been in use for ~20 years ## I0 码力 | 403 页 | 5.30 MB | 1 年前3
A New Dragon in the Den: Fast Conversion From Floating-Point Numbers## +24 ## A New Dragon in the Den: Fast Conversion From Floating-Point Numbers ## CASSIO NERI ## 2024 September 15 - 20 WARNING: This PDF poorly reproduces the slides shown at the talk. You are strongly It's not a seven-headed beast. It's not rocket science. ## A New Dragon in the Den ## Fast conversion from floating-point numbers ## Cassio Neri (Independent Researcher) CppCon 2024 - Aurora # Statistical a=\left\lfloor\frac{m'\times N(E)}{2^{K}}\right\rfloor $$ K = twice the size of floating-point type ## The dragon is in the details $$ F = \lfloor E \times \log(2) \rfloor = \lfloor E \times 0.3010 码力 | 171 页 | 6.42 MB | 1 年前3
To Int or to Uint, This is the Questionusing auto when not sure about the type • Avoid using auto when not sure about the type • Use concrete types when possible! • Avoid using auto when not sure about the type • Use concrete types when possible possible! • Use modern loops as much as you can • Avoid using auto when not sure about the type • Use concrete types when possible! • Use modern loops as much as you can • Use strong types. ## WHAT TO0 码力 | 102 页 | 3.64 MB | 1 年前3
The Idris Tutorial Version 1.1.1manipulated like any other value. The standard example is the type of lists of a given length $ ^{1} $ , Vect n a, where a is the element type and n is the length of the list and can be an arbitrary term contain values, and where those values describe properties, for example the length of a list, the type of a function can begin to describe its own properties. Take for example the concatenation of two list's length is the sum of the lengths of the two input lists. We can therefore give the following type to the app function, which concatenates vectors: app : Vect n a -> Vect m a -> Vect (n + m)0 码力 | 223 页 | 1.21 MB | 2 年前3
Kotlin language specification
Version 1.9-rfc+0.1Tokens 19 1.3 Syntax grammar 23 1.4 Documentation comments 42 2 Type system 43 Glossary 43 Introduction 44 2.1 Type kinds 45 2.1.1 Built-in types 46 kotlin.Any 46 kotlin.Nothing 46 types 48 2.1.3 Type parameters ..... 50 Function type parameters ..... 51 Mixed-site variance ..... 51 Declaration-site variance ..... 52 Use-site variance ..... 54 2.1.4 Type capturing .... . 55 2.1.5 Type containment ..... 60 2.1.6 Function types ..... 61 Suspending function types ..... 62 2.1.7 Flexible types ..... 63 Dynamic type ..... 64 Platform types ..... 64 2.1.8 Nullable0 码力 | 310 页 | 1.39 MB | 2 年前3
An Introduction to Lean6 An Example: Abstract Syntax 36 4 Theorem Proving in Lean 38 4.1 Assertions in Dependent Type Theory 38 4.2 Propositions as Types 39 4.3 Induction and Calculation 42 4.4 Axioms 45 Lean is an implementation of a logical foundation known as dependent type theory. Specifically, it implements a version of dependent type theory known as the Calculus of Inductive Constructions. The CIC is expression has a type. The type of expression indicates what sort of object the expression denotes. For example, an expression may denote a mathematical object like a natural number, a data type, an assertion0 码力 | 48 页 | 191.92 KB | 2 年前3
Nim 2.0.8 Manualof a certain type. The variable's type is called static type, the location's type is called dynamic type. If the static type is not the same as the dynamic type, it is a super-type or subtype of of the dynamic type. An identifier is a symbol declared as a name for a variable, type, procedure, etc. The region of the program over which a declaration applies is called the scope of the declaration mod nil not notin object of or out proc ptr raise ref return shl shr static template try tuple type using var when while xor yield Some keywords are unused; they are reserved for future developments0 码力 | 132 页 | 5.73 MB | 1 年前3
Tornado 6.5 DocumentationPromise, Deferred) • Deliver to a queue • Callback registry (e.g. POSIX signals) Regardless of which type of interface is used, asynchronous functions by definition interact differently with their callers; native coroutines. can support integration with other packages including Twisted via a registry of conversion functions. To access this functionality in native coroutines, use tornado.gen.convert_yielded. action="/myform" method="POST">' ' type="text" name="message"/> ' ' type="submit" value="Submit"/> ' ' )0 码力 | 437 页 | 405.14 KB | 10 月前5
The Idris Tutorial Version 0.11.2Community May 18, 2016 Powered by TCPDF (www.tcpdf.org) Contents 2 The Interactive Theorem Prover 1 Type Providers in Idris Tutorials submitted by community members. Note: The documentation for Idris has concerning the CC0 can be found online at: http://creativecommons.org/publicdomain/zero/1.0/ Type Providers in Idris Type providers in Idris are simple enough, but there are a few caveats to using them that it foreign functions, because these will often be used with type providers. ### 1.1 The use case First, let's talk about why we might want type providers. There are a number of reasons to use them and0 码力 | 14 页 | 120.71 KB | 2 年前3
Agda User Manual v2.5.4Overview 2 Getting Started 2.1 Prerequisites 2.2 Installation 2.3 Quick Guide to Editing, Type Checking and Compiling Agda Code 3 Language Reference 3.1 Abstract definitions 3.2 Built-ins request or issue on the Github Agda page. This is the manual for the Agda programming language, its type checking, compilation and editing system and related tools. A description of the Agda language is Nixpkgs collection that is used by https://nixos.org/nixos. To install Agda and agda-mode for Emacs, type: nix-env -f "-iA haskellPackages.Agda" If you’re just interested in the library 0 码力 | 155 页 | 668.67 KB | 2 年前3
共 1000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 100
相关搜索词
metaprogramming techniquestype traitsspecializationprimary templatemetafunctionsFloating-point numbersConversionLookup tableOptimizationPrecisionunsigned integersigned integerinteger overflowC++type conversionIdrisTypeInterfaceDeclarationMonadKotlinmultiplatformtype systemsyntaxcompatibilityLeandependent type theorytacticsmetaprogrammingautomationGuardsLocksModule systemIdentifiersString typeIOLoopDeprecationCallbackType AnnotationPython CompatibilityType ProvidersInteractive Theorem ProverNatProviderBitWidthAgdalibrary managementtype checkingcode examplescompilation













