Raspberry pie 3B realizes the acceleration of pytorch calculation through GPU

The embedded system raspberry pie 3B realizes the acceleration of pytorch calculation through GPU General idea The cross compilation environment is a raspberry pi 3B docker imageUsing the open source GPU library on github QPULibInstall pytorch on raspberry pie and accelerate the process through cross compilationProvided via pytorch Interface ...

Posted by helbom on Fri, 14 Jan 2022 13:05:14 +0100

C + + smart pointer

Smart pointer Smart pointer is essentially a template class. Generally, the object of this class is used instead of pointerThe smart pointer is reflected in the memory release problem. Using the smart pointer to manage the new object will no longer require manual deleteshared_ptr get() function: a reference to a pointer that returns datau ...

Posted by ibanez270dx on Fri, 14 Jan 2022 10:48:02 +0100

Complete self-study C (dry goods) - documents

catalogue 1, Document classification Program file data file II. Documents file name field name pointer Opening and closing of files Sequential reading and writing of files Random reading and writing of files Text and binary files End judgment of documents file buffer case Program filedata file 1, Document classification ...

Posted by Potatis on Fri, 14 Jan 2022 10:42:51 +0100

R-value reference of new features in c++11

1. First, let's talk about what are left and right values Lvalues are address variables that can be accessed; A variable whose right value does not take an address. 2. What is citation? A reference is essentially an alias. You can modify the value of a variable through a reference. You can avoid copying when passing parameters. 3. What is a ...

Posted by Michael001 on Fri, 14 Jan 2022 06:54:30 +0100

Random number, time stamp, number guessing game

random number The function generated by random number is rand(), which is in the standard library, so we need to add its header file < stdlib h> Error demonstration!!! #include <stdio.h> #include <stdlib.h> int main() { int ret; ret=rand(); printf("%d\n",ret); return 0; } In this way, the simplest random number is gene ...

Posted by andrewburgess on Fri, 14 Jan 2022 02:04:55 +0100

[C + +] [mfc] small demo; Multithreading, event declaration registration, printing method, plug-in essence (modify memory)

Desktop development on Windows platform C++: MFC,QtC#: WinForm,WPF 1. Printing method of debugging information: MFC dialog based program, not dialog based program, can not print; Print to the output end; TRACE function: similar to printf in C language, you can only see the print information in DEBUG mode (F5 startup) TRACE( ...

Posted by TempleDMDKrazd on Thu, 13 Jan 2022 21:13:18 +0100

Fast power of ACwing scintillation matrix

Digression: it was supposed to be posted on Acwing, but I really won't use MARKDOWN on Acwing to post it on CSDN Matrix fast power Briefly introduce the following matrix fast exponents (also help yourself to review the following, and those who have already learned to skip by themselves) Principle: A recursive matrix C is mentioned from the r ...

Posted by vanessa123 on Thu, 13 Jan 2022 20:18:06 +0100

C + + basic syntax

C + + Beginner The first C + + program Writing a C + + program is divided into four steps Create project create a file Write code Run program Create project Visual Studio is the tool we use to write C + + programs create a file Write code #include <iostream> using namespace std; int main() { cout << "hello world" << ...

Posted by Jammerious on Thu, 13 Jan 2022 13:19:34 +0100

C + + - the essence of reference, the relationship between const and pointer, and the relationship between const and reference

Nature of reference For the following program (including after compilation): void fun(int &a) //--> void fun(int * const a) { int *p = &a; //-->int *p = a;//int *p = *&a; a = 100; //-->*a = 100 *p = 200; } int main() { int x = 10; int &y = x; //-->int * const y = &x; fun(x); //-->fun(&amp ...

Posted by dscapuano on Thu, 13 Jan 2022 10:07:28 +0100

Compiling principle -- Experiment 2 syntax analysis

preface The experimental course content of compiling principle course experiment - constructing top-down grammar analysis program. Through this experiment, we can skillfully master the construction method of LL(1) analysis table. 1.1 experimental purpose (1) Master the construction method of LL(1) analysis table. (2) Master the design ...

Posted by jmfillman on Thu, 13 Jan 2022 05:51:28 +0100