Skip to content

Instantly share code, notes, and snippets.

View imSrbh's full-sized avatar
💻
https://sourcerer.io/imsrbh

Saurabh Kumar Singh imSrbh

💻
https://sourcerer.io/imsrbh
View GitHub Profile
#include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include <stdio.h>
//for random intialize
#include <stdlib.h>
#include <time.h>
//for memset
#include <cstring>
%%cu
#include<cuda_runtime_api.h>
#include<stdio.h>
#include<time.h>
#include<stdlib.h>
#include<cstring>
__global__ void sum_array_gpu(int * a, int * b, int * c, int size)
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "cuda.h"
#include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include "cuda_common.cuh"
#include "common.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
// CUDA kernel. Each thread takes care of one element of c
__global__ void vecAdd(double *a, double *b, double *c, int n)
{
// Get our global thread ID
int id = blockIdx.x*blockDim.x+threadIdx.x;
#include <stdio.h>
// For the CUDA runtime routines (prefixed with "cuda_")
#include <cuda_runtime.h>
#include <helper_cuda.h>
/**
* CUDA Kernel Device code
*
* Computes the vector addition of A and B into C. The 3 vectors have the same
1718 adb tcpip 5555
1719 adb connect 192.168.0.102:5555
1720 scrcpy
#!/bin/sh
#python3 /srv/src/bootstrap/bootstrap.py --admin admin:password
echo "Enter Admin name?"
read name
read -s -p "Enter Password: " pswd
python3 /srv/src/bootstrap/bootstrap.py --admin $name:$pswd
//ex‑compile.c
#include <glib.h>
int main(int argc, char∗∗ argv) {
GList∗ list = NULL;
list = g_list_append(list, "Hello world!");
printf("The first item is '%s'\n", g_list_first(list)‑>data);
return 0;
}
/*
* helloglib.c
* Using glib libraries to do a hello world
* Compile with:
* gcc helloglib.c `pkg-config --cflags --libs glib-2.0` -o helloglib
*/
#include <glib.h>
int
main (void)
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const React = require('react');
const CompLibrary = require('../../core/CompLibrary.js');