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/python3 | |
from math import ceil | |
from typing import List, Tuple | |
from random import randint | |
def bit_count(num: int) -> int: | |
''' | |
Same as len(bin(num)[2:]) |
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/python3 | |
import numpy as np | |
from copy import deepcopy | |
from functools import reduce | |
from time import time | |
N = 1 << 8 | |
''' |
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; | |
const uint N = 1 << 10; | |
const uint B = 1 << 5; | |
const float MULT_FACTOR = .5f; |
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; |
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 <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 <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 <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 <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> | |
using namespace sycl; | |
namespace ts = std::chrono; | |
constexpr uint N = 512; | |
constexpr uint B = 4; |