Skip to content

Instantly share code, notes, and snippets.

View itzmeanjan's full-sized avatar
😎
Working ...

Anjan Roy itzmeanjan

😎
Working ...
View GitHub Profile
@itzmeanjan
itzmeanjan / matrix_multiply.glsl
Last active March 17, 2024 12:51
😎 Parallel Matrix Multiplication on GPGPU, using Vulkan Compute API 🚴🏼
#version 450
#pragma shader_stage(compute)
layout(local_size_x = 8, local_size_y = 4, local_size_z = 1) in;
layout(set = 0, binding = 0) buffer readonly MatrixA {
int[1<<20] matrix_a;
};
layout(set = 0, binding = 1) buffer readonly MatrixB {
@itzmeanjan
itzmeanjan / bisection.parallel.cpp
Last active September 13, 2021 14:55
Sequential + Parallel Root Finding using Bisection Method, powered by SYCL DPC++
#include <CL/sycl.hpp>
#include <array>
#include <chrono>
#include <cmath>
#include <iostream>
using namespace sycl;
constexpr uint N = 32;
float C = powf(10.0, -5.0);
@itzmeanjan
itzmeanjan / lib.rs
Last active September 17, 2021 10:50
🤖 PoC of Polygon Avail Application Client, powered by IPFS-embed ✌️
extern crate anyhow;
extern crate async_std;
extern crate ed25519_dalek;
extern crate ipfs_embed;
extern crate libipld;
extern crate rand;
extern crate spmc;
extern crate tempdir;
use anyhow::Result;
@itzmeanjan
itzmeanjan / julia_set.cpp
Last active September 19, 2021 09:45
😎 Computing Julia Set on CPU + GPGPU, using SYCL DPC++ 🚀
#include <CL/sycl.hpp>
#include <chrono>
#include <iostream>
using namespace sycl;
namespace ts = std::chrono;
constexpr uint N = 512;
constexpr uint B = 4;
@itzmeanjan
itzmeanjan / mat_mul.cpp
Created September 23, 2021 11:41
✅ Large Scale Parallel Matrix Multiplication, in multiple ways, using SYCL DPC++ 😎
#include <CL/sycl.hpp>
#include <chrono>
#include <iostream>
using namespace sycl;
constexpr uint N = 1024;
constexpr uint B = 32;
int64_t multiply_matrix_matrix_v0(queue &q, const float *matrix_a,
@itzmeanjan
itzmeanjan / gauss_jordan.cpp
Created September 27, 2021 11:13
🔥 Solving System of Linear Equations on GPGPU, using SYCL DPC++ ( GAUSS-JORDAN Method ) 👌
#include <CL/sycl.hpp>
#include <chrono>
#include <iostream>
#include <random>
using namespace sycl;
constexpr uint N = 1024;
constexpr uint B = 32;
@itzmeanjan
itzmeanjan / dft.cpp
Last active November 17, 2021 14:34
⭐️ Parallel DFT on GPGPU, using SYCL DPC++ 🔥
#include <CL/sycl.hpp>
#include <chrono>
#include <complex>
#include <iostream>
using namespace sycl;
typedef std::complex<double> cmplx;
constexpr uint N = 1 << 10;
constexpr uint B = 1 << 5;
@itzmeanjan
itzmeanjan / fft.cpp
Last active October 1, 2021 02:10
🤞 Parallel (inv)FFT on GPGPU, using SYCL DPC++ 🚀
#include <CL/sycl.hpp>
#include <chrono>
#include <complex>
#include <iostream>
using namespace sycl;
typedef std::complex<double> cmplx;
constexpr uint N = 1024;
constexpr uint B = 32;
@itzmeanjan
itzmeanjan / lu_decomposition.cpp
Last active October 11, 2021 05:43
✨ Parallel LU Decomposition on GPGPU, using SYCL DPC++ 🔆
#include <CL/sycl.hpp>
#include <chrono>
#include <iostream>
#include <random>
using namespace sycl;
constexpr uint N = 1 << 10;
constexpr uint B = 1 << 5;
@itzmeanjan
itzmeanjan / improved_lu_decomposition.cpp
Last active October 15, 2021 06:36
🏃‍♂️ Fast, Parallel LU Factorization, using SYCL DPC++ 🏅
#include <CL/sycl.hpp>
#include <chrono>
#include <iostream>
#include <random>
using namespace sycl;
constexpr uint N = 1 << 10;
constexpr uint B = 1 << 6;