If you need CUDA Tolkit 11 with nvcc
, other tools and libraries you can install it from NVIDIA Ubunutu 20.04 repository.
Add Ubuntu 20.04 repository
//////// demo online: https://quick-bench.com/q/TYcfwD0khRpbE53rn8cRtn7nmvA | |
#include <vector> | |
#include <cstddef> | |
static constexpr auto totalVecSize = 99'999; | |
struct __attribute__ ((packed)) AAA_packed { | |
int a; | |
char b; | |
float c; |
import QtQuick 2.15 | |
Rectangle { | |
id:rootRect | |
property int currentValue:0; | |
property int maxValue:100; | |
property int minValue:0; | |
property color colorBar:"#7ec26e"; | |
property alias textBar: barText |
alias gitstart='eval "$(ssh-agent -s)" | |
ssh-add ~/.ssh/id_ed25519 | |
' | |
alias copy='xclip -selection clipboard' | |
# alias bjson='python -m json.tool' # beautify json | |
bjsonStr(){ | |
echo "$1" | python3 -m json.tool | |
} | |
bjsonFile(){ | |
python3 -m json.tool "$1" |
#!/bin/bash | |
### steps #### | |
# verify the system has a cuda-capable gpu | |
# download and install the nvidia cuda toolkit and cudnn | |
# setup environmental variables | |
# verify the installation | |
### | |
### to verify your gpu is cuda enable check |
class FooTableModel : public QAbstractTableModel { | |
Q_OBJECT | |
public: | |
FooTableModel(QObject *parent = nullptr); | |
// readonly tables | |
Qt::ItemFlags flags(const QModelIndex &index) | |
const override; // editable can return: Qt::ItemIsEditable | |
QVariant data(const QModelIndex &index, | |
int role = Qt::DisplayRole) const override; |
If your system is running slowly, perhaps a process is using too much CPU time and won't let other processes run smoothly. To find out which processes are taking up a lot of CPU time, you can use Apple's Activity Monitor.
The CPU pane shows how processes are affecting CPU (processor) activity:
import QtQuick 2.0 | |
QtObject { | |
property int maximumSize: 10 | |
property var buffer: [] | |
property int head: 0 | |
property int size: 0 | |
function initialize() { | |
buffer = []; |
#ifndef TIMER_PROFILER_HPP | |
#define TIMER_PROFILER_HPP | |
#include <chrono> | |
#include <string> | |
namespace TimeProfilerHelper { | |
template <typename T> | |
struct ChronoName{ | |
static_assert(std::is_same_v<T, void>, "Unsupported chrono type!"); | |
}; |
# Required deps: | |
# imagemagick: https://imagemagick.org/script/download.php | |
# name of your master icon, must be at least 512X512 | |
PNG_MASTER="icon-large.png" | |
ICONSET_FOLDER="AppIcon.iconset" | |
sizes=( | |
16x16 | |
32x32 |