The document discusses parallel computing in modern C++. It introduces native threads, standard threads in C++11, thread pools, std::async, and examples of parallelizing real applications. It also covers potential issues like data races and tools for detecting them like Valgrind and ThreadSanitizer. Finally, it recommends using std::async, std::future and boost::thread for flexibility and OpenMP for ease of use.
Не так давно Гор Нишанов представил свой доклад: C++ Coroutines a negative overhead abstraction. В этом докладе Гор упомянул, что предложенный дизайн корутин позволяет их использовать практически в любых окружениях, в том числе и с "бедным" C++ рантаймом.
Я решил попробовать запустить корутины в следующих окружениях: обычное приложение, драйвер ОС Windows, EFI приложение. Только в одном из этих окружений есть полноценный C++ рантайм и поддержка исключений, в остальных ничего этого нет. Более того, EFI приложение вообще выполняется до старта ОС.
Я хочу рассказать о том, как мне удалось запустить корутины в этих окружениях, поговорим о том, какие проблемы существуют в асинхронном системном программировании и как их можно обойти.
Evgeniy Muralev, Mark Vince, Working with the compiler, not against itSergey Platonov
The talk will look at limitations of compilers when creating fast code and how to make more effective use of both the underlying micro-architecture of modern CPU's and how algorithmic optimizations may have surprising effects on the generated code. We shall discuss several specific CPU architecture features and their pros and cons in relation to creating fast C++ code. We then expand with several algorithmic techniques, not usually well-documented, for making faster, compiler friendly, C++.
Note that we shall not discuss caching and related issues here as they are well documented elsewhere.
Антон Бикинеев, Writing good std::future< C++ >Sergey Platonov
В докладе Антон расскажет о грядущих мажорных изменениях языка, которые, не войдя в Стандарт 17-го года и оставшись в Technical Specifications, будут ждать своего мержа в 20-м, а также быть уже реализованными в некоторых компиляторах. Осветятся также минорные, уже одобренные фичи следующего Стандарта, как языковые, так и библиотечные. Антон расскажет об их целях, покажет методы использования, а также осветит некоторые гайдлайны и трики.
На протяжении всего существования C++ тема компайл-тайм рефлексии поднимается постоянно, но, к сожалению, до сих пор Стандарт языка не дает достаточных возможностей для извлечения и манипулирования компайл-тайм информацией. Большое количество библиотек и препроцессоров было придумано для того, чтобы решить эту проблему, начиная от простых макросов и заканчивая Qt-moc или ODB. В докладе Антон расскажет о том, как на эту проблему смотрит Комитет по Стандартизации: какие решения были предложены, и какое стало доминирующим.
Не так давно Гор Нишанов представил свой доклад: C++ Coroutines a negative overhead abstraction. В этом докладе Гор упомянул, что предложенный дизайн корутин позволяет их использовать практически в любых окружениях, в том числе и с "бедным" C++ рантаймом.
Я решил попробовать запустить корутины в следующих окружениях: обычное приложение, драйвер ОС Windows, EFI приложение. Только в одном из этих окружений есть полноценный C++ рантайм и поддержка исключений, в остальных ничего этого нет. Более того, EFI приложение вообще выполняется до старта ОС.
Я хочу рассказать о том, как мне удалось запустить корутины в этих окружениях, поговорим о том, какие проблемы существуют в асинхронном системном программировании и как их можно обойти.
Evgeniy Muralev, Mark Vince, Working with the compiler, not against itSergey Platonov
The talk will look at limitations of compilers when creating fast code and how to make more effective use of both the underlying micro-architecture of modern CPU's and how algorithmic optimizations may have surprising effects on the generated code. We shall discuss several specific CPU architecture features and their pros and cons in relation to creating fast C++ code. We then expand with several algorithmic techniques, not usually well-documented, for making faster, compiler friendly, C++.
Note that we shall not discuss caching and related issues here as they are well documented elsewhere.
Антон Бикинеев, Writing good std::future< C++ >Sergey Platonov
В докладе Антон расскажет о грядущих мажорных изменениях языка, которые, не войдя в Стандарт 17-го года и оставшись в Technical Specifications, будут ждать своего мержа в 20-м, а также быть уже реализованными в некоторых компиляторах. Осветятся также минорные, уже одобренные фичи следующего Стандарта, как языковые, так и библиотечные. Антон расскажет об их целях, покажет методы использования, а также осветит некоторые гайдлайны и трики.
На протяжении всего существования C++ тема компайл-тайм рефлексии поднимается постоянно, но, к сожалению, до сих пор Стандарт языка не дает достаточных возможностей для извлечения и манипулирования компайл-тайм информацией. Большое количество библиотек и препроцессоров было придумано для того, чтобы решить эту проблему, начиная от простых макросов и заканчивая Qt-moc или ODB. В докладе Антон расскажет о том, как на эту проблему смотрит Комитет по Стандартизации: какие решения были предложены, и какое стало доминирующим.
Дмитрий Демчук. Кроссплатформенный краш-репортSergey Platonov
Доклад будет посвящен возможностям библиотеки Google Breakpad по созданию краш-репорта. Посмотрим как это работает изнутри.
На примерах будут рассмотрены способы интеграции библиотеки на разных платформах Windows, Linux, Max OS.
Our new blog post featuring some common python programming patterns and their C++ equivalents is now up!
Leave us a comment below and let us know what you'd like to see covered in our future posts!
█ Read More
Technical Insights: Introduction to GraphQL|goo.gl/d7PyXH
SIMD machines — machines capable of evaluating the same instruction on several elements of data in parallel — are nowadays commonplace and diverse, be it in supercomputers, desktop computers or even mobile ones. Numerous tools and libraries can make use of that technology to speed up their computations, yet it could be argued that there is no library that provides a satisfying minimalistic, high-level and platform-agnostic interface for the C++ developer.
Самые вкусные баги из игрового кода: как ошибаются наши коллеги-программисты ...DevGAMM Conference
Один из лучших способов снизить количество багов в играх – это показывать программистам, как не стоит писать код. В своём докладе я соберу самые вкусные и необычные ошибки, которые удалось найти в C++ и C# коде таких игр, как VVVVVV, Space Engineers, Command & Conquer, osu! и даже Doom. Я уверен, что каждый из слушателей обязательно узнает для себя что-то новое. В конце концов, это просто приятно – лично увидеть ошибки из кода знакомой и любимой игры!
Fuzzing is a software testing technique that involves providing invalid, unexpected, or random data to the inputs of a computer program. The presentation covers types of fuzzers and describes how they work. We will write and run a real fuzzer. Also it shows how fuzzers can guess correct CRC checksums, help with regression testing and find logical bugs in programs. Finally, it summarizes fuzzing usage at Google.
Gor Nishanov, C++ Coroutines – a negative overhead abstractionSergey Platonov
C++ coroutines are one of the few major features that may land in C++17. We will look at the current standardization status, available experimental implementations and develop a small coroutine adapter over raw C networking APIs that will beat hand-crafted state machine in performance.
Дмитрий Демчук. Кроссплатформенный краш-репортSergey Platonov
Доклад будет посвящен возможностям библиотеки Google Breakpad по созданию краш-репорта. Посмотрим как это работает изнутри.
На примерах будут рассмотрены способы интеграции библиотеки на разных платформах Windows, Linux, Max OS.
Our new blog post featuring some common python programming patterns and their C++ equivalents is now up!
Leave us a comment below and let us know what you'd like to see covered in our future posts!
█ Read More
Technical Insights: Introduction to GraphQL|goo.gl/d7PyXH
SIMD machines — machines capable of evaluating the same instruction on several elements of data in parallel — are nowadays commonplace and diverse, be it in supercomputers, desktop computers or even mobile ones. Numerous tools and libraries can make use of that technology to speed up their computations, yet it could be argued that there is no library that provides a satisfying minimalistic, high-level and platform-agnostic interface for the C++ developer.
Самые вкусные баги из игрового кода: как ошибаются наши коллеги-программисты ...DevGAMM Conference
Один из лучших способов снизить количество багов в играх – это показывать программистам, как не стоит писать код. В своём докладе я соберу самые вкусные и необычные ошибки, которые удалось найти в C++ и C# коде таких игр, как VVVVVV, Space Engineers, Command & Conquer, osu! и даже Doom. Я уверен, что каждый из слушателей обязательно узнает для себя что-то новое. В конце концов, это просто приятно – лично увидеть ошибки из кода знакомой и любимой игры!
Fuzzing is a software testing technique that involves providing invalid, unexpected, or random data to the inputs of a computer program. The presentation covers types of fuzzers and describes how they work. We will write and run a real fuzzer. Also it shows how fuzzers can guess correct CRC checksums, help with regression testing and find logical bugs in programs. Finally, it summarizes fuzzing usage at Google.
Gor Nishanov, C++ Coroutines – a negative overhead abstractionSergey Platonov
C++ coroutines are one of the few major features that may land in C++17. We will look at the current standardization status, available experimental implementations and develop a small coroutine adapter over raw C networking APIs that will beat hand-crafted state machine in performance.
Сергей Шамбир, Адаптация Promise/A+ для взаимодействия между C++ и JavascriptSergey Platonov
Шаблоны — мощный инструмент, добавляющий в язык новые возможности, а программистам в команде — новые проблемы. Доклад покажет, как тщательно продуманный шаблонный код может не усложнить, а упростить жизнь и дать надёжную абстракцию межпроцессных межъязыковых асинхронных вызовов функций. С помощью шаблонов можно:
адаптировать Promise/A+ из Javascript для C++
автоматически проверять и раскладывать динамический массив аргументов на статичные аргументы функции
сделать аналог std::bind для weak_ptr.
Эти вещи будут показаны на примере взаимных вызовов между C++ и Javascript в одном приложении с помощью CEF3.
Евгений Рыжков, Андрей Карпов Как потратить 10 лет на разработку анализатора ...Platonov Sergey
Кто-то верно подметил, что разработчики статических анализатора часто сталкиваются с "проблемой айсберга". Им сложно объяснить разработчикам, почему сложно написать и развивать статические анализаторы кода. Дело в том, что сторонние наблюдатели видят только вершину всего процесса, так как им доступен для изучения только простой интерфейс, который предоставляют анализаторы для взаимодействия с миром. Это ведь не графический редактор с сотнями кнопок и рычажков. В результате и возникает ощущение, что раз прост интерфейс взаимодействия, то и прост продукт. На самом деле статические анализаторы кода — это сложные программы, в которых живут и взаимодействуют разнообразнейшие методы поиска дефектов. В них реализуется множество экспертные системы, выдающие заключения о коде на основе как точных, так и эмпирических алгоритмах. В парном докладе, основатели анализатора PVS-Studio расскажут о том, как незаметно потратить 10 лет, чтобы написать хороший анализатор. Дьявол кроется в деталях!
Доклад вводит в рассмотрение универсальный адаптер, позволяющий обернуть любой класс с целью добавления новых свойств, отсутствующих в оригинальном классе. Получаемые классы могут иметь в точности такой же интерфейс, как и первоначальные, что позволяет прозрачно заменять их и оборачивать любое количество раз.
Это позволяет добавлять необходимые свойства объектам, не переписывая его с нуля. Предложенная обобщенная концепция будет последовательно введена и проиллюстрирована простыми, но интересными примерами.
Полухин Антон, Как делать не надо: C++ велосипедостроение для профессионаловSergey Platonov
В докладе перед нами откроется великолепный мир велосипедов и устаревших технологий, которые люди продолжают переносить в новые проекты и повсеместно использовать. Мы поговорим о:
Copy-On-Write
разработке без оглядки на готовые решения и к чему это приводит
force inline
оптимизациях, которые отлично себя показывают на бенчмарках и плохо себя ведут в реальной жизни
бездумно отключаемых оптимизациях компилятора
тонкостях стандартной библиотеки для повседневного использования
супер качественном велосипедостроении
Использование юнит-тестов для повышения качества разработкиvictor-yastrebov
В докладе рассмотрены подходы к созданию надежных юнит-тестов, которые просты в поддержке и модернизации, а также принципы создания кода пригодного для покрытия автотестами. Приведены два способа внедрения зависимости: с использованием конструктора тестируемого объекта, а также с использованием подхода "выделить и переопределить". Каждый из способов разобран на примере, демонстрирующем особенности его реализации и применения. Приведен ряд практических советов, нацеленных на создание надежных юнит-тестов. Использование на практике приведенных подходов и принципов позволяет упростить процесс поддержки и модификации существующего кода, а также дает уверенность в надежности работы добавляемого нового функционала. В конечном итоге это приводит к повышению качества разрабатываемого продукта.
В своих прошлых докладах (http://cpp-russia.ru/?p=198, и http://cpp-russia.ru/?page_id=1239) я рассказывал о C++ без исключений, как с эти жить, как работать. Этот доклад является продолжением этой серии. Я рекомендую освежить в памяти предыдущие доклады, чтобы наша работа была более продуктивной. Мы обсудим механизмы создания, копирования и перемещения объектов, механизмы аллокации и деаллокации памяти, а также обработку ошибок и исключений. Также мы обсудим проблемы и неудобства, которые испытывает программист, когда пишет код без исключений. В конце, я попытаюсь показать, как можно проектировать структуры данных, контейнеры для удобной работы в средах с исключениями и без исключений.
Фитнес для вашего кода: как держать его в формеIlia Shishkov
C++ Россия 2017
Во время моего выступления мы поговорим о принципе "Minimize coupling, maximize cohesion". Обсудим, что это такое и что значат эти непонятные слова. Кроме того на приближенном к реальности примере мы рассмотрим, как, применяя указанный принцип, можно держать ваш код в форме, чтобы он был готов ко всем неожиданностям, которые подстерегают ваш проект в течение его жизни.
Василий Сорокин, Простой REST сервер на Qt с рефлексиейSergey Platonov
Библиотека Qt имеет довольно мощную систему рефлексии. На примере простого в использовании класса, позволяющего с помощью наследования быстро построить REST сервер под ваши нужды, я покажу как элегантно ее можно задействовать в реальной жизни. В заключительной части, покажу еще один пример когда рефлексия Qt помогает красиво протестировать испускание сигналов классом.
Догнать и перегнать boost::lexical_castRoman Orlov
Разбор нестандартной реализации преобразования целого числа в строку без использования циклов и рекурсивных вызовов времени исполнения - только рекурсия на этапе компиляции
Хочется чего-то новенького, необычного? Тогда добро пожаловать в мир чудеc C++17:
if constexpr (auto& [number, ok] = variable; ok)
return "Hi"
else
return number + 42;
Вы услышите о новом стандарте C++, обнаружите для себя новые полезные классы, функции и возможности языка. Для каждой новинки я приведу примеры использования, расскажу о нюансах и подводных камнях.
А ещё вы узнаете о том, как проходят заседания комитета по стандартизации C++ и сможете задать интересующие вас вопросы связанные с нововведениями С++17 и С++Next.
Есть много причин заниматься конверсией управляемых языков в нативные: это прежде всего производительность, но также защита от реверс-инжиниринга, поддержка аппаратных технологий или каких-то специфичных платформ. В этом докладе мы посмотрим на пример построения конвертера из C# в C++ и те нюансы, которые встречаются при решении этой задачи
Мало кто отчетливо представляет, как работают исключения в С++.
Автор пытается восполнить этот пробел, заодно пытаясь выяснить, почему всё устроено так как оно устроено и нельзя ли там чего-нибудь улучшить.
1) Две основные проблемы - как обустроить раскрутку стека
и как осуществить передачу управления при возникновении исключения
2) Раскрутка стека - GCC LDSA, MSVC32, MSVC64
3) Передача управления - SJLJ, DW2, MSVC
4) Раскручиваем стек своими руками
Как мы уменьшили количество ошибок в Unreal Engine с помощью статического ана...Platonov Sergey
Размер и сложность проектов растёт. С кодом всё сложнее совладать, поэтому статический анализ всё больше набирает популярность. А лидеры отрасли все чаще внедряют такие инструменты у себя. Мы расскажем об использования статического анализатора кода в игровой индустрии на примере работы с проектом Unreal Engine 4. Про это на сайте компании Epic Games можно найти статью. Но одно дела статья, а другое дело живой рассказ. Вы услышите интересные истории, увидите примеры ошибок в коде Epic Games, да и просто пообщаетесь с участниками внедрения анализатора. Если вы ещё не решили, нужен ли статический анализатор вашему проекту, обязательно приходите послушать наш доклад.
Rust — это современный, практический, быстрый и безопасный язык программирования. Некоторые говорят, что Rust — это как C++, если бы его писал человек, знающий Haskell.
Система типов Rust решает главную проблему C++ — небезопасность. C++ очень легко сделать ошибки, которые приведут к поломкам (например, use after free). Rust позволяет писать безопасный код, сохраняя при этом выразительность и околонулевые накладные расходы C++. В докладе будут подробно описаны механизмы языка, которые контролируют безопасность программы.
Хотя в данный момент Rust ещё не подходит для использования в продакшне, его всё равно стоит изучать. Во-первых, потому что это очень интересный подход к программированию, а во-вторых, потому что через несколько лет для разработки требовательных к ресурсам программ будет необходим именно Rust или другой похожий инструмент.
C++ Code as Seen by a Hypercritical ReviewerAndrey Karpov
We all do code reviews. Who doesn't admit this – does it twice as often. C++ code reviewers look like a sapper. .. except that they can make a mistake more than once. But sometimes the consequences are painful . Brave code review world.
Story of static code analyzer developmentAndrey Karpov
Greetings from the past: simple tools and bad standards. Regular expressions don’t work. What is inside modern static code analyzers on the PVS-Studio example. About machine learning. Learning vs Data Flow analysis.
I want help in the following C++ programming task. Please do coding .pdfbermanbeancolungak45
I want help in the following C++ programming task. Please do coding in C++.
Persistent Data Structures
A persistent data structure is one in which we can make changes (such as inserting and removing
elements) while still preserving the original data structure Of course, an easy way to do this is to
create a new copy of the entire data structure every time we perform an operation that changes
the data structure, but it is much more efficient to only make a copy of the smallest possible
portion of the data structure.
First, let\'s look at one of the easiest possible data structures — a stack, implemented using a
linked list.
Persistent Stack
Let\'s say that we have a stack S1, and we want to create a new stack S2, which is the result of
pushing a new element X onto S1, without changing S1 at all. This is easy — we just add a new
element that points to S1:
Starting with the stack S1:
We push X on S1, to get S2, leaving S1 as it was. So after the operation we have two versions of
the stack S1 the older version with elements A, B and C and S2 the newer version with elements
X, A, B and C.
What about popping? That works in the same way. Starting with our original S1 (elements A, B
and C), we can pop off the first element (A), to get S2:
What if we want to push something on to this new stack? It works in the same was as before – if
we push an X onto S2 above to get S3, we have
So for every operation you make a new version of the stack while reusing any existing stack
elements.
You will have to make a linked list of pointers that will point to the head of the different stack
versions.
Also each stack is also implemented as a linked list of elements SAB
Solution
#include #include #include #include #include #include #include #include #include
#include #include namespace dts { template > class PersistentSet { public:
PersistentSet(); PersistentSet(Func); bool add(const T&); bool add(T&&);
bool remove(const T& key); bool empty() const; size_t history_size() const;
class TreeIterator : public std::iterator, std::ptrdiff_t, const T*,
const T&> { using node = typename dts::PersistentSet< std::remove_cv_t,
Func>::Nodeptr; node itr; node nil; std::stack path; node
find_successor(node n) { n = n->rigth; if (n != nil) {
while (n->left != nil) { path.push(n); n = n->left;
} } else { n = path.top();
path.pop(); } return n; } public: explicit
TreeIterator(node n, node pnil) : nil(pnil) //begin { if (n == nil) itr
= nil; else { path.push(nil); while (n->left != nil)
{ path.push(n); n = n->left; } itr =
n; } } explicit TreeIterator(node pnil) // end : itr(pnil),
nil(pnil) { } TreeIterator& operator++ () { itr =
find_successor(itr); return *this; } TreeIterator operator++ (int)
{ TreeIterator tmp(*this); itr = find_successor(itr); return tmp;
} bool operator == (const TreeIterator& rhs) const { return itr ==
rhs.itr; } bool operator != (const TreeIterator& rhs) const {
return itr != rhs.itr; } const T& operator* () const { return itr-
>key; } const T& operator-> () c.
Razvan Rotari shows an experiment to see how far you can go with binding in C++; Cristian Neamtu follows with an insight on how to achieve this in Rust using Serde.
Rust: код может быть одновременно безопасным и быстрым, Степан КольцовYandex
Последние 15 лет между разработчиками на Java и на C++ ведётся спор о том, какой язык программирования хуже — Java или C++. Программы на C++ глючат, падают, и в них утекает память. Программы на Java тормозят и требуют слишком много памяти.
Rust — новый язык программирования, разрабатываемый компанией Mozilla — решает проблемы Java и C++: программы, написанные на Rust, одновременно быстрые и безопасные. Rust является таким же низкоуровневым, close-to-metal языком программирования, как и C++, однако в язык встроены конструкции, позволяющие на этапе компиляции доказывать, что в программе не случится обращения к неинициализированной памяти (механизм borrowed pointers). Большая часть моего рассказа будет посвящена описанию этого механизма.
Being a slow interpreter, Python may drive a system to deliver utmost speed if some guidelines are followed. The key is to treat programming languages as syntactic sugar to the machine code. It expedites the workflow of timing, iterative design, automatic testing, optimization, and realize an HPC system balancing the time to market and quality of code.
Speed is the king. 10x productive developers change business. So does 10x faster code. Python is 100x slower than C++ but it only matters when you really use Python to implement number-crunching algorithms. We should not do that, and instead go directly with C++ for speed. It calls for strict disciplines of software engineering and code quality, but it should be noted that here the quality is defined by the runtime and the time to market.
The presentation focuses on the Python side of the development workflow. It is made possible by confining C++ in architecture defined by the Python code, which realizes most of the software engineering. The room for writing fast C++ code is provided by pybind11 and careful design of typed data objects. The data objects hold memory buffers exposed to Python as numpy ndarrays for direct access for speed.
This presentation considers certain specific features of C++11 and additions to STL library (uniform initialization, new containers and methods, move semantics).
Presentation by Taras Protsiv (Software Engineer, GlobalLogic), Kyiv, delivered at GlobalLogic C++ TechTalk in Lviv, September 18, 2014.
More details -
http://www.globallogic.com.ua/press-releases/lviv-cpp-techtalk-coverage
Евгений Зуев, С++ в России: Стандарт языка и его реализацияPlatonov Sergey
Доклад посвящён различным аспектам компилятора С++, созданного с участием автора. В выступлении рассказывается о продвинутой архитектуре компилятора, основных проектных решениях, а также обсуждаются особенности входного языка, повлиявшие на реализацию компилятора.
QML\Qt Quick это превосходный декларативный язык программирования, призванный сильно упростить создание и дальнейшую поддержку пользовательских интерфейсов.В докладе я расскажу что из себя представляет QML, попробуем разобраться в вопросе “Где и как уместно использовать QML\Qt Quick” и приведу краткий обзор полезных инструментов для разработки QML\Qt Quick приложений.
Доклад посвящён алгоритмам и структурам данных рендеринга автомобильных маршрутов в ГИС приложениях. Так же будут затронуты особенности и проблемы, возникающие при написании единого кода визуализации для нескольких программно-аппаратных платформ (Android, Windows Phone, iOS, Windows Desktop, Linux Desktop).
Дракон в мешке: от LLVM к C++ и проблемам неопределенного поведенияPlatonov Sergey
В этом докладе Дмитрий кратко рассказывает о таком звере, как LLVM, о котором много кто слышал, но немногие щупали.
Что такое компилятор на самом деле? Как происходит компиляция программы, как работают оптимизации и, наконец, откуда берется неопределенное поведение в детерменированных программах на C++?
One definition rule - что это такое, и как с этим житьPlatonov Sergey
В докладе будет разобрано, что-же такое ODR, какие ошибки могут быть из-за нарушения этого правила. Также будет представлен Proof-of-concept утилиты на базе clang tooling по автоматическому поиску таких ошибок.
В докладе рассказывается об особенностях подхода к dependence injections в C++. Посмотрим какие подходы, в чем их плюсы и минусы. Также затрагивается тема Inversion of Control контейнеров.
C++ богат различными инструментами, при разработке на C++ используется множество различных подходов. Но можно ли пользоваться ими во всех случаях или бывают ситуации, когда стоит воздержаться или ограничить их использование?
В докладе пойдет речь о том, какие существуют ограничения при разработке браузера и откуда они взялись. Почему мы живем без исключений или RTTI, к чему это ведет. Как мы используем стандартную библиотеку и сторонние модули.
Today we'll start from the very beginning of library creation, we'll take a look into Boost recommendations for library authors, useful tools and Boost review process.
So you're a developer and your goal is to write a new useful high quality library. Where should you start?
First of all, you need to find a problem to be solved by your library. Then a good way for solving the problem must be found. And then goes the implementation:
* Do we care about mobile devices and MacOS/Linux/Windows?
* Do we need C++11 or C++98?
* How to organize testing?
* What tools to use?
* What else must be in your library?
* How to make the library popular and really useful?
* What steps must be done to submit library into Boost?
* How does the library review looks like?
* What goes after the acceptance?
Со времён С++98 стандартные контейнеры и идиома RAII позволяли избегать использования оператора delete,
что делало код более безопасным. С приходом С++11 и умных указателей отпала необходимость использовать оператор new, что позволило практически полностью переложить управление памятью на плечи компилятора. В
докладе объясняется идеология управления памятью и ресурсами в современном С++.
Code reviews are vital for ensuring good code quality. They serve as one of our last lines of defense against bugs and subpar code reaching production.
Yet, they often turn into annoying tasks riddled with frustration, hostility, unclear feedback and lack of standards. How can we improve this crucial process?
In this session we will cover:
- The Art of Effective Code Reviews
- Streamlining the Review Process
- Elevating Reviews with Automated Tools
By the end of this presentation, you'll have the knowledge on how to organize and improve your code review proces
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
Mobile App Development Company In Noida | Drona InfotechDrona Infotech
Looking for a reliable mobile app development company in Noida? Look no further than Drona Infotech. We specialize in creating customized apps for your business needs.
Visit Us For : https://www.dronainfotech.com/mobile-application-development/
E-commerce Application Development Company.pdfHornet Dynamics
Your business can reach new heights with our assistance as we design solutions that are specifically appropriate for your goals and vision. Our eCommerce application solutions can digitally coordinate all retail operations processes to meet the demands of the marketplace while maintaining business continuity.
Software Engineering, Software Consulting, Tech Lead, Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Transaction, Spring MVC, OpenShift Cloud Platform, Kafka, REST, SOAP, LLD & HLD.
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeAftab Hussain
Understanding variable roles in code has been found to be helpful by students
in learning programming -- could variable roles help deep neural models in
performing coding tasks? We do an exploratory study.
- These are slides of the talk given at InteNSE'23: The 1st International Workshop on Interpretability and Robustness in Neural Software Engineering, co-located with the 45th International Conference on Software Engineering, ICSE 2023, Melbourne Australia
Utilocate offers a comprehensive solution for locate ticket management by automating and streamlining the entire process. By integrating with Geospatial Information Systems (GIS), it provides accurate mapping and visualization of utility locations, enhancing decision-making and reducing the risk of errors. The system's advanced data analytics tools help identify trends, predict potential issues, and optimize resource allocation, making the locate ticket management process smarter and more efficient. Additionally, automated ticket management ensures consistency and reduces human error, while real-time notifications keep all relevant personnel informed and ready to respond promptly.
The system's ability to streamline workflows and automate ticket routing significantly reduces the time taken to process each ticket, making the process faster and more efficient. Mobile access allows field technicians to update ticket information on the go, ensuring that the latest information is always available and accelerating the locate process. Overall, Utilocate not only enhances the efficiency and accuracy of locate ticket management but also improves safety by minimizing the risk of utility damage through precise and timely locates.
Navigating the Metaverse: A Journey into Virtual Evolution"Donna Lenk
Join us for an exploration of the Metaverse's evolution, where innovation meets imagination. Discover new dimensions of virtual events, engage with thought-provoking discussions, and witness the transformative power of digital realms."
Artificia Intellicence and XPath Extension FunctionsOctavian Nadolu
The purpose of this presentation is to provide an overview of how you can use AI from XSLT, XQuery, Schematron, or XML Refactoring operations, the potential benefits of using AI, and some of the challenges we face.
Graspan: A Big Data System for Big Code AnalysisAftab Hussain
We built a disk-based parallel graph system, Graspan, that uses a novel edge-pair centric computation model to compute dynamic transitive closures on very large program graphs.
We implement context-sensitive pointer/alias and dataflow analyses on Graspan. An evaluation of these analyses on large codebases such as Linux shows that their Graspan implementations scale to millions of lines of code and are much simpler than their original implementations.
These analyses were used to augment the existing checkers; these augmented checkers found 132 new NULL pointer bugs and 1308 unnecessary NULL tests in Linux 4.4.0-rc5, PostgreSQL 8.3.9, and Apache httpd 2.2.18.
- Accepted in ASPLOS ‘17, Xi’an, China.
- Featured in the tutorial, Systemized Program Analyses: A Big Data Perspective on Static Analysis Scalability, ASPLOS ‘17.
- Invited for presentation at SoCal PLS ‘16.
- Invited for poster presentation at PLDI SRC ‘16.
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppGoogle
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-fusion-buddy-review
AI Fusion Buddy Review: Key Features
✅Create Stunning AI App Suite Fully Powered By Google's Latest AI technology, Gemini
✅Use Gemini to Build high-converting Converting Sales Video Scripts, ad copies, Trending Articles, blogs, etc.100% unique!
✅Create Ultra-HD graphics with a single keyword or phrase that commands 10x eyeballs!
✅Fully automated AI articles bulk generation!
✅Auto-post or schedule stunning AI content across all your accounts at once—WordPress, Facebook, LinkedIn, Blogger, and more.
✅With one keyword or URL, generate complete websites, landing pages, and more…
✅Automatically create & sell AI content, graphics, websites, landing pages, & all that gets you paid non-stop 24*7.
✅Pre-built High-Converting 100+ website Templates and 2000+ graphic templates logos, banners, and thumbnail images in Trending Niches.
✅Say goodbye to wasting time logging into multiple Chat GPT & AI Apps once & for all!
✅Save over $5000 per year and kick out dependency on third parties completely!
✅Brand New App: Not available anywhere else!
✅ Beginner-friendly!
✅ZERO upfront cost or any extra expenses
✅Risk-Free: 30-Day Money-Back Guarantee!
✅Commercial License included!
See My Other Reviews Article:
(1) AI Genie Review: https://sumonreview.com/ai-genie-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
#AIFusionBuddyReview,
#AIFusionBuddyFeatures,
#AIFusionBuddyPricing,
#AIFusionBuddyProsandCons,
#AIFusionBuddyTutorial,
#AIFusionBuddyUserExperience
#AIFusionBuddyforBeginners,
#AIFusionBuddyBenefits,
#AIFusionBuddyComparison,
#AIFusionBuddyInstallation,
#AIFusionBuddyRefundPolicy,
#AIFusionBuddyDemo,
#AIFusionBuddyMaintenanceFees,
#AIFusionBuddyNewbieFriendly,
#WhatIsAIFusionBuddy?,
#HowDoesAIFusionBuddyWorks
May Marketo Masterclass, London MUG May 22 2024.pdfAdele Miller
Can't make Adobe Summit in Vegas? No sweat because the EMEA Marketo Engage Champions are coming to London to share their Summit sessions, insights and more!
This is a MUG with a twist you don't want to miss.
Enterprise Resource Planning System includes various modules that reduce any business's workload. Additionally, it organizes the workflows, which drives towards enhancing productivity. Here are a detailed explanation of the ERP modules. Going through the points will help you understand how the software is changing the work dynamics.
To know more details here: https://blogs.nyggs.com/nyggs/enterprise-resource-planning-erp-system-modules/
Do you want Software for your Business? Visit Deuglo
Deuglo has top Software Developers in India. They are experts in software development and help design and create custom Software solutions.
Deuglo follows seven steps methods for delivering their services to their customers. They called it the Software development life cycle process (SDLC).
Requirement — Collecting the Requirements is the first Phase in the SSLC process.
Feasibility Study — after completing the requirement process they move to the design phase.
Design — in this phase, they start designing the software.
Coding — when designing is completed, the developers start coding for the software.
Testing — in this phase when the coding of the software is done the testing team will start testing.
Installation — after completion of testing, the application opens to the live server and launches!
Maintenance — after completing the software development, customers start using the software.
Empowering Growth with Best Software Development Company in Noida - Deuglo
Евгений Крутько, Многопоточные вычисления, современный подход.
1. C++ User Group Russia, Ekaterinburg, 25.11.2016
Многопоточные вычисления, современный подход
Крутько Е.С.
НИЦ «Курчатовский институт»
e.s.krutko@gmail.com
2. Цель доклада
Современный стандарт C++ позволяет делать
многопоточные вычисления легко и удобно.
Если приложение или библиотека тратит меньше
времени на работу – это хорошо
Исходники тестов:
https://github.com/eskrut/multithread.git
2
5. Threadpool. с++11
5
#include <stdlib.h>
#include <assert.h>
//git submodule add https://github.com/progschj/ThreadPool.git
#include "ThreadPool/ThreadPool.h"
int someExample();
int someExampleParallel();
int main(int argc, char**argv) {
someExample();
someExampleParallel();
return 0;
}
6. Threadpool. с++11
6
int someExample() {
int value1;
//code to evaluate value1
//may require significant amount of time
value1 = 3;
int value2;
//code to evaluate value2
//may require significant amount of time
value2 = 3;
//Now use some fancy algorythm using values
int result = value1 + value2;
assert(result == 6);
return result;
}
7. Threadpool. с++11
7
int someExampleParallel() {
ThreadPool pool(8);
auto futureValue1 = pool.enqueue([](){
int value1;
//code to evaluate value1
//may require significant amount of time
value1 = 3;
return value1;
});
auto futureValue2 = pool.enqueue([](){
int value2;
//code to evaluate value2
//may require significant amount of time
value2 = 3;
return value2;
});
//Now use some fancy algorythm using values
int result = futureValue1.get() + futureValue2.get();
assert(result == 6);
return result;
}
8. std::async. с++11
8
int someExampleParallel() {
auto futureValue1 = std::async([](){
int value1;
//code to evaluate value1
//may require significant amount of time
value1 = 3;
return value1;
});
auto futureValue2 = std::async([](){
int value2;
//code to evaluate value2
//may require significant amount of time
value2 = 3;
return value2;
});
//Now use some fancy algorythm using values
int result = futureValue1.get() + futureValue2.get();
assert(result == 6);
return result;
}
9. Пример из жизни
9
void PhotoSortModel::fill(const QString &path)
{
unsigned numRows = invisibleRootItem()->rowCount();
auto read = [this,path](int id, int start, int stop){
for(int row = start; row < stop; ++row) {
auto photo = photoItem(row);
readDown(photo, path);
QMetaObject::invokeMethod(this,
"partialDone",
Qt::DirectConnection,
Q_ARG(int, id),
Q_ARG(int, row-start));
}
return 0;
};
read(0, 0, numRows);
emit(loaded());
for(unsigned row = 0; row < numRows; ++row)
itemChanged(photoItem(row));
}
14. valgring
valgrind --num-callers=1 --tool=helgrind ./datarace
==77960== Possible data race during read of size 4 at 0x10480810C by thread #3
==77960== Locks held: none
==77960== at 0x100002D2C: main::$_0::operator()(int volatile&, int) const
(datarace.cpp:15)
==77960==
==77960== This conflicts with a previous write of size 4 by thread #2
==77960== Locks held: none
==77960== at 0x100003634: main::$_1::operator()(int volatile&, int) const
(datarace.cpp:21)
==77960== Address 0x10480810c is on thread #1's stack
14
dataRaceTarget++;
22. Параллельная [стандартная] библиотека / на примере gcc
22
Результаты замены std на std::_parallel
std std::_parallel
max_element 0.015215 0.006585
sort 1.19395 0.264197
for_each 0.970016 0.356471
23. А если нужно большая гибкость? boost::thread
23
#include <stdlib.h>
#include "boost/thread.hpp"
#include <assert.h>
void someParallelTask() {
while(true) { //forewer cycle
boost::this_thread::disable_interruption di;
//alloc some resources to work
//do not interrupt me
boost::this_thread::restore_interruption ri(di);
//ok check if I should die (
boost::this_thread::interruption_point();
}
}
int main(int argc, char**argv) {
auto thread = boost::thread( someParallelTask );
//do some jod
//And now I do not want to wait thread
thread.interrupt();
thread.join();
return 0;
}
24. IMHO. Самая простая параллельность. OpenMP
24
int someExample() {
int value1;
//code to evaluate value1
//may require significant
amount of time
value1 = 3;
int value2;
//code to evaluate value2
//may require significant
amount of time
value2 = 3;
//Now use some fancy algorythm
using values
int result = value1 + value2;
assert(result == 6);
return result;
}
#include <omp.h>
int someExampleParallel() {
int value1;
int value2;
#pragma omp parallel sections
{
#pragma omp section
{
//code to evaluate value1
//may require significant
amount of time
value1 = 3;
}
#pragma omp section
{
//code to evaluate value2
//may require significant
amount of time
value2 = 3;
}
}//here we wait for all blocks
//Now use some fancy algorythm
using values
int result = value1 + value2;
assert(result == 6);
return result;
}
25. Итог
При достаточном уровне понимания сути алгоритма работы
программы с использованием современного C++ легко
внедрять параллельную обработку данных. И этим надо
пользоваться )
Я предпочитаю:
std::async и std::list<std::future<T>>
boost::thread (если нужен менеджер потоков)
OpenMP
25