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 <cstdio> | |
#include <cstdlib> | |
#include <windows.h> | |
#define N 10 | |
int arr[N]; | |
__forceinline bool correct() | |
{ | |
int size = N; |
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 <stdio.h> | |
#include <mpi.h> | |
#include <math.h> | |
#define PRECISION 0.000001 | |
#define EPS 0.000000001 | |
#define RANGESIZE 1 | |
#define DATA 0 | |
#define RESULT 1 | |
#define FINISH 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 <stdio.h> | |
#include <mpi.h> | |
int main(int argc, char **argv) | |
{ | |
double precision = 1000000000; | |
int myrank, proccount; | |
double pi, pi_final; | |
int mine, sign; | |
int i; |
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
""" | |
Parallel & Distributed Algorithms - laboratory | |
Examples: | |
- Launch 8 workers with default parameter values: | |
> python arir.py 8 | |
- Launch 12 workers with custom parameter values: | |
> python arir.py 12 --shared-memory-size 128 --delay-connect 2.0 --delay-transmit 0.5 --delay-process 0.75 |
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
// http://enauczanie.pg.gda.pl/moodle/pluginfile.php/58545/mod_resource/content/6/IntelXeonPhi-manual-PCzarnul-v1.pdf | |
// http://enauczanie.pg.gda.pl/moodle/pluginfile.php/58773/mod_resource/content/1/lab_4_attachment.pdf | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <math.h> | |
#include <omp.h> | |
#include <sys/time.h> | |
#define PACKET_COUNT 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
# lel | |
def divs(n): | |
res = [1] | |
for i in range(2, 39): | |
if n % i == 0: | |
res.append(i) | |
return res | |
def isset(n, i): |
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
### Keybase proof | |
I hereby claim: | |
* I am cristaloleg on github. | |
* I am olegkovalov (https://keybase.io/olegkovalov) on keybase. | |
* I have a public key ASDurR95hTDh9o0tKG-1rnYl5efgh3qxh8mi8giQOJdGxQo | |
To claim this, I am signing this object: |
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
@janisz I did a small investigation today at morning. | |
We can create `AliasedHash` which implements `Hash` interface: | |
``` | |
type AliasedHash struct { | |
aliases *sync.Map | |
} | |
func NewAliasedHash() AliasedHash { | |
return AliasedHash{ | |
aliases: &sync.Map{}, |
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
➜ astify git:(master) ✗ ast-walker blah_test.go | |
0 *ast.File { | |
1 . Package: blah_test.go:1:1 | |
2 . Name: *ast.Ident { | |
3 . . NamePos: blah_test.go:1:9 | |
4 . . Name: "astify" | |
5 . } | |
6 . Decls: []ast.Decl (len = 2) { | |
7 . . 0: *ast.FuncDecl { | |
8 . . . Name: *ast.Ident { |
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
// cmd/gocritic/testdata/positive_tests.go | |
/// consider `in' name instead of `IN' | |
/// `X' should not be capitalized | |
/// `Y' should not be capitalized | |
/// `Z' should not be capitalized | |
func badFunc1(IN, X int) (Y, Z int) { | |
/// `V' should not be capitalized | |
V := 1 | |
return V, 0 | |
} |
OlderNewer