This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://forums.developer.nvidia.com/t/eliminate-upload-download-for-opencv-cuda-gpumat-using-shared-memory/83090/3 | |
// SimpleTest.cpp | |
// Loads an image, calls a GPU enabled function that uses opencv GPUMat upload/download | |
// | |
#include <opencv2/highgui.hpp> | |
#include <opencv2/imgproc.hpp> | |
#include <iostream> | |
#include <stdio.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env dub | |
/+ dub.sdl: | |
dependency "arsd-official:simpledisplay" version="~>9.1.2" | |
+/ | |
// ported from https://www.geeksforgeeks.org/fractals-in-cc/ | |
import arsd.simpledisplay; | |
enum MAXCOUNT = 30; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std.stdio, std.string; | |
alias std.string.toStringz CSTR; | |
import core.sys.windows.windows; | |
extern(Windows) | |
{ | |
DWORD GetLogicalDrives(); | |
UINT GetDriveTypeA(LPCSTR lpRootPathName); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
@author: Ferhat Kurtulmuş | |
""" | |
from PyQt5.QtWidgets import (QWidget, QPushButton, QLineEdit, QFileDialog, | |
QInputDialog, QApplication, QMessageBox, QLabel, | |
QHBoxLayout, QVBoxLayout, QSpinBox, QDoubleSpinBox ) | |
import sys, os |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ldc-build-runtime --ninja "--dFlags=-mtriple=wasm32-wasi" --ldcSrcDir=../ CMAKE_TOOLCHAIN_FILE="%WASI_SDK_PREFIX%/share/cmake/wasi-sdk.cmake" WASI_SDK_PREFIX=%WASI_SDK_PREFIX% BUILD_SHARED_LIBS=OFF | |
.: Creating build directory: ldc-build-runtime.tmp | |
.: Invoking: cmake -DLDC_EXE_FULL=C:\dlang\ldc2-1.24.0-windows-multilib\bin\ldc2.exe -DD_VERSION=2 -DDMDFE_MINOR_VERSION=0 -DDMDFE_PATCH_VERSION=94 -DD_EXTRA_FLAGS=-mtriple=wasm32-wasi -DCMAKE_TOOLCHAIN_FILE=C:/Users/user/Desktop/wdene/wasi-sdk-11.0/share/cmake/wasi-sdk.cmake -DBUILD_SHARED_LIBS=OFF -DWASI_SDK_PREFIX=C:/Users/user/Desktop/wdene/wasi-sdk-11.0 -G Ninja C:\Users\user\Desktop\wdene\ldc\runtime\../runtime | |
-- The C compiler identification is unknown | |
System is unknown to cmake, create: | |
Platform/Wasm to use this system, please post your config file on discourse.cmake.org so it can be added to cmake | |
-- Detecting C compiler ABI info | |
System is unknown to cmake, create: | |
Platform/Wasm to use this system, please post your config file on discourse.cmake.org so it |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/+ | |
0 | |
/ | \ | |
1 2 3 | |
/ \ / | \ | |
4 5 6 7 8 | |
address(0) = [] // root | |
address(1) = [0] // root.children[0] | |
address(2) = [1] // etc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module app; | |
import std.stdio; | |
import std.experimental.logger: trace; | |
import std.conv; | |
import gio.Application : GApplication = Application; | |
import gtk.Main; | |
import gtk.Application; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apd.d : | |
module app; | |
import std.stdio; | |
import std.experimental.logger: trace; | |
import gio.Application : GApplication = Application; | |
import gtk.Main; | |
import gtk.Application; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std.stdio; | |
import std.concurrency; | |
import core.thread; | |
void main() { | |
int k; | |
while(true){ | |
auto childTid = spawn(&spawnedFunc, thisTid); | |
Thread.sleep(10.msecs); | |
send(childTid, k); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import core.thread; | |
import std.stdio; | |
import std.concurrency; | |
import std.container.dlist; | |
import std.datetime; | |
import std.datetime.systime; | |
__gshared DList!Entry queue; | |
__gshared bool shouldRun = true; |
NewerOlder