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
#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 { |
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
#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); |
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
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; |
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
#include <CL/sycl.hpp> | |
#include <chrono> | |
#include <iostream> | |
using namespace sycl; | |
namespace ts = std::chrono; | |
constexpr uint N = 512; | |
constexpr uint B = 4; |
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
#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, |
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
#include <CL/sycl.hpp> | |
#include <chrono> | |
#include <iostream> | |
#include <random> | |
using namespace sycl; | |
constexpr uint N = 1024; | |
constexpr uint B = 32; |
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
#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; |
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
#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; |
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
#include <CL/sycl.hpp> | |
#include <chrono> | |
#include <iostream> | |
#include <random> | |
using namespace sycl; | |
constexpr uint N = 1 << 10; | |
constexpr uint B = 1 << 5; |
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
#include <CL/sycl.hpp> | |
#include <chrono> | |
#include <iostream> | |
#include <random> | |
using namespace sycl; | |
constexpr uint N = 1 << 10; | |
constexpr uint B = 1 << 6; |