This repository has been archived by the owner on Dec 22, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
Modern CPP Features
Muhammad Osama edited this page Dec 15, 2021
·
2 revisions
Important to know the following modern C++ features when working with gunrock/essentials
. Please familiarize yourself with these before looking at the Programming API.
Lambda Expressions (since C++11)
Constructs a closure: an unnamed function object capable of capturing variables in scope.
- Learn about the limitations of lambda expressions in CUDA.
- An interesting issue.
A simple example.
auto sample_lambda = [=] __host__ __device__(int blah) -> bool {
return true;
};
Variadic Arguments (since C++11)
Allows a function to accept any number of extra arguments. Indicated by a trailing
...
(other than one introducing a pack expansion) (since C++11) following the parameter-list of a function declaration.
- Extensively used within the implementation of
graph_t
class.
template <memory_space_t space,
typename vertex_t,
typename edge_t,
typename weight_t,
class... graph_view_t>
class graph_t : public graph_view_t... {
// ... implementation.
}
Constexpr (since C++11)
constexpr - specifies that the value of a variable or function can appear in constant expressions
Essentials © 2022 The Regents of the University of California
- Programming Model
- Gunrock Operators
- Graph Algorithms
- Getting Essentials
- (GitHub Template)
essentials
project example
- MGPU, Python, Docs (needs review)
- Boolmap Frontier
- Hypergraphs (private)
- Modern CPP Features
- Programming Interface Examples (API)
- Style Guide
- Understanding the code structure
- Git Workflow
-
Debugging with
cuda-memcheck
andcuda-gdb
- Profiling with NVIDIA Nsight Systems and Compute
- Unit testing with GoogleTest
- Performance analysis
- How to write a new graph algorithm
- PageRank: PageRank: From
networkx
togunrock essentials
- How to write parallel operators
- How to add a new graph representation
- How to add a new frontier representation
- How to add multiple GPU support
- How to bind an application to python
- How to use
thrust
/cub
- Writing sparse-matrix dense-vector multiplication using graphs
- Variadic Inheritance
- Polymorphic-Virtual (Diamond) Inheritance
- Need for custom copy constructor
- CUDA-enabled
std::shared_ptr
- Ubuntu
-latest
- Windows
-latest
- Doxygen
- Code Quality