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 <fstream> | |
#include <NTL/LLL.h> | |
int main(int argc, char **argv) | |
{ | |
NTL::Mat<int> B; | |
std::string basisfile = "tmp.txt"; | |
std::ifstream fin(basisfile); | |
if( !fin.is_open() ) |
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 <unistd.h> // getopt | |
int main(int argc, char* argv[]) { | |
int a = 0; | |
int b = 0; | |
bool c = false; | |
// first argument parsing |
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 <mpi.h> | |
#include <vector> | |
#include <deque> | |
#include <progresscpp/ProgressBar.hpp> | |
int main( int argc, char *argv[] ) { | |
int size, rank; | |
MPI_Init( &argc, &argv ); | |
MPI_Comm_size( MPI_COMM_WORLD, &size ); |
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 <mpi.h> | |
#include <vector> | |
#include <progresscpp/ProgressBar.hpp> | |
int main( int argc, char *argv[] ) | |
{ | |
int size, rank; | |
MPI_Init( &argc, &argv ); | |
MPI_Comm_size( MPI_COMM_WORLD, &size ); |
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 <mpi.h> | |
#include <vector> | |
int main( int argc, char *argv[] ) | |
{ | |
int size, rank; | |
MPI_Init( &argc, &argv ); | |
MPI_Comm_size( MPI_COMM_WORLD, &size ); | |
MPI_Comm_rank( MPI_COMM_WORLD, &rank ); |
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 <mpi.h> | |
#include <vector> | |
int main( int argc, char *argv[] ) | |
{ | |
int size, rank; | |
MPI_Init( &argc, &argv ); | |
MPI_Comm_size( MPI_COMM_WORLD, &size ); | |
MPI_Comm_rank( MPI_COMM_WORLD, &rank ); |
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 <mpi.h> | |
#include <vector> | |
int main( int argc, char *argv[] ) | |
{ | |
int size, rank; | |
MPI_Init( &argc, &argv ); | |
MPI_Comm_size( MPI_COMM_WORLD, &size ); | |
MPI_Comm_rank( MPI_COMM_WORLD, &rank ); |
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 <mpi.h> | |
int main( int argc, char *argv[] ) | |
{ | |
int size, rank; | |
MPI_Init( &argc, &argv ); | |
MPI_Comm_size( MPI_COMM_WORLD, &size ); // size(プロセス数)の取得 | |
MPI_Comm_rank( MPI_COMM_WORLD, &rank ); // 自身のrankの取得 | |
std::cout << "This worker is " << rank << " of " << size << std::endl; // 表示 |
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> | |
int main() | |
{ | |
std::vector<std::pair<int, int>> combinations; | |
combinations.push_back(std::make_pair(0, 0)); | |
combinations.push_back(std::make_pair(0, 1)); | |
combinations.push_back(std::make_pair(1, 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
#include <iostream> | |
#include <deque> | |
#include <vector> | |
int main() { | |
using Value = std::vector<int> *; | |
std::deque<Value> list; | |
Value elmA(new std::vector<int>{0,1}); | |
Value elmB(new std::vector<int>{1,2}); |