Skip to content

Instantly share code, notes, and snippets.

View daparic's full-sized avatar

daparic

  • 14:38 (UTC +08:00)
View GitHub Profile
https://developer.nvidia.com/assets/embedded/secure/tools/files/jetpack-sdks/jetpack-4.6/JETPACK_46_b194/cuda-repo-cross-aarch64-ubuntu1804-10-2-local_10.2.460-1_all.deb
https://developer.nvidia.com/assets/embedded/secure/tools/files/jetpack-sdks/jetpack-4.6/JETPACK_46_b194/ubuntu1804/cuda-repo-ubuntu1804-10-2-local_10.2.460-450.115-1_amd64.deb

std::thread inside a loop using push_back

#include <iostream>
#include <vector>
#include <thread>

int main(int argc, char* argv[]) {
    std::vector<std::thread> v;
    for (int i = 0; i < 3; i++) {
        v.push_back(std::thread([] {
Starting "Run Tests on Jetson" (Execution) for /area51.1 ...
Collecting tests to be executed...
...done.
Preparing execution flow...
User info...
This recipe needs customization:
Host, test directory and user name need to bo set to correct values
-it use ssh and scp commands to execute and copy data from/to remote hosts

https://discord.gg/awPTNeCm

These are my CLI notes both for Linux and Windows. The cpptestcli can understand a Visual Studio 2019 solution, therefore, there is no need to generate a bdf file. Other projet types (make, cmake, etc) needs to have a generated bdf file.

Beware of cpptestcli vs bin/cli/cpptestcli differences

# Two ways it can be done:

# First way
# Mere presence of cpptestcli.properties in pwd is NOT honored. First need to create associated workspace.

Test

// clang++ -o example example.cpp -l restbed -l ssl -l crypt
#include <set>
#include <map>
#include <memory>
#include <string>
#include <stdexcept>

#include 

Command Line

[x64/Release]
xcopy /Y "$(SolutionDir)packages\openssl-vc141-static-x86_64.1.1.0\build\native\lib\x64\dynamic\libssl-1_1-x64.dll" "$(SolutionDir)x64\Release"
xcopy /Y "$(SolutionDir)packages\openssl-vc141-static-x86_64.1.1.0\build\native\lib\x64\dynamic\libcrypto-1_1-x64.dll" "$(SolutionDir)x64\Release"
xcopy /Y "$(SolutionDir)packages\openssl-vc141-static-x86_64.1.1.0\build\native\lib\x64\dynamic\msvcr120.dll" "$(SolutionDir)x64\Release"

[x64/Debug]
xcopy /Y "$(SolutionDir)packages\openssl-vc141-static-x86_64.1.1.0\build\native\lib\x64\dynamic\libssl-1_1-x64.dll" "$(SolutionDir)x64\Debug"
xcopy /Y "$(SolutionDir)packages\openssl-vc141-static-x86_64.1.1.0\build\native\lib\x64\dynamic\libcrypto-1_1-x64.dll" "$(SolutionDir)x64\Debug"
name: C/C++test with Visual Studio 2019
on:
# Triggers the workflow on push or pull request events but only for the master (main) branch.
push:
branches: [ master, main ]
pull_request:
branches: [ master, main ]
# Allows you to run this workflow manually from the Actions tab.
[ERROR] Code Analysis for native-activity/jni/main.c finished with code 1 (ipro)
1. Error during process execution: Cannot launch process: armclang "-ID:\parasoft\parasoft_cpptest_professional-2023.1.0-win32.x86_64\cpptest\bin\engine\runtime\include" -target i686-none-linux-android19 -fdata-sections -ffunction-sections -fstack-protector-strong -funwind-tables --sysroot C:/Users/PSEA/AppData/Local/Android/Sdk/ndk/25.2.9519653/build/../toolchains/llvm/prebuilt/windows-x86_64/sysroot -Wno-invalid-command-line-argument -Wno-unused-command-line-argument -D_FORTIFY_SOURCE=2 -fPIC -O2 -DNDEBUG -IC:/Users/PSEA/AppData/Local/Android/Sdk/ndk/25.2.9519653/build/../sources/android/native_app_glue -Ijni -DANDROID -mstackrealign -DPARASOFT_CPPTEST -v -E -dD -xc "C:\Users\PSEA\parasoft\workspace-native-activity2\.cpptest\.dtpengine\.cpptest\com.parasoft.xtest.cpp.analyzer.code\2\6\2\bbc18\0\tmp\ParaSoft.14940.41.c"
The system cannot find the file specified.
Error preprocessing file "C:\Users\PSEA\src\android\native-a

When doing SA of main.c:

[ERROR] Code Analysis for helloworld/main.c finished with code 1 (ipro)
    1. Error during process execution: "C:/ti/ccs1010/ccs/tools/compiler/ti-cgt-c2000_20.2.1.LTS/bin/cl2000 "-IC:\parasoft\cpptest\parasoft_cpptest_professional-2023.1.0-win32.x86_64-eclipse\cpptest\bin\engine\runtime\include" -ml -mt -DPARASOFT_CPPTEST  -v -E -dM  -ffreestanding -xc "C:\Users\dx\workspace_v10\helloworld\.cpptest\.dtpengine\.cpptest\com.parasoft.xtest.cpp.analyzer.code\e\b\4\2b010\0\tmp\ParaSoft.2996.41.c" &> "C:\Users\dx\workspace_v10\helloworld\.cpptest\.dtpengine\.cpptest\com.parasoft.xtest.cpp.analyzer.code\e\b\4\2b010\0\tmp\ParaSoft.2996.18467.c"" exited with status 1
>> WARNING: invalid compiler option -E (ignored)
error: argument to option -x (#) is out of range
Error preprocessing file "C:\Users\dx\workspace_v10\helloworld\helloworld\main.c": 
Process exited with status: 1
Could not preprocess source file
[WARNING] Flow Analysis encountered problems when building analysis data.
@daparic
daparic / cuda.md
Created July 26, 2023 00:56
NVidia CUDA

Build Dlib in Windows

cmake .. -G "Visual Studio 17 2022" -T host=x64 -DCMAKE_PREFIX_PATH="C:\cudnn\cudnn-windows-x86_64-8.9.3.28_cuda12-archive"