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 <iostream> | |
#include <unordered_set> | |
#include <random> | |
#include <fstream> | |
namespace std { | |
template<> | |
class hash<S> { | |
public: |
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 <iostream> | |
#include <unordered_set> | |
#include <random> | |
#include <fstream> | |
using Key = std::pair<std::string, std::pair<float, float>>; | |
namespace std { | |
template<> | |
class hash<Key> { |
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
namespace std { | |
template<> | |
class hash<Key> { | |
public: | |
size_t operator()(const Key& s) const | |
{ | |
mt19937_64 generator{random_device()()}; | |
uniform_int_distribution<unsigned> distribution(1, 8); | |
unsigned i1 = static_cast<const unsigned &>(s.second.first * 1000); |
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 <iostream> | |
#include <unordered_set> | |
#include <random> | |
#include <fstream> | |
#include <iterator> | |
#include <algorithm> | |
using namespace std; | |
using Key = std::pair<std::string, std::pair<float, float>>; | |
namespace std { |
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
cmake_minimum_required(VERSION 3.4) | |
project(Task1_Batanina) | |
set(CMAKE_CXX_STANDARD 11) | |
set(SOURCE_FILES MPI_main.cpp) | |
#set(SOURCE_FILES main.cpp ) | |
add_executable(Task1_Batanina ${SOURCE_FILES}) | |
find_package(MPI REQUIRED) |
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 <iostream> | |
#include <vector> | |
#include <random> | |
#include <mpi.h> | |
int main(int argc, char* argv[]) { | |
int row = atoi(argv[1]); | |
int col = atoi(argv[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
#include <iostream> | |
#include <vector> | |
#include <random> | |
#include <mpi.h> | |
int main(int argc, char* argv[]) { | |
int row = atoi(argv[1]); | |
int col = atoi(argv[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
#include <iostream> | |
template <class T> | |
class my_unique_ptr | |
{ | |
private: | |
T* ptr; | |
public: | |
my_unique_ptr() | |
{ |
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 <iostream> | |
template <class T> | |
class my_unique_ptr | |
{ | |
private: | |
T* ptr; | |
public: | |
my_unique_ptr() : ptr(nullptr) {}; | |
my_unique_ptr( const my_unique_ptr& ) = delete; |
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 <iostream> | |
#include <opencv2/imgproc.hpp> | |
#include <opencv2/highgui/highgui.hpp> | |
#include <chrono> | |
#include <mpi.h> | |
#include <cmath> | |
int main(int argc, char* argv[]) { | |
cv::namedWindow("input"); |
OlderNewer