2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-25 22:38:04 +02:00

MPI;Prolog; Index ergänzt

This commit is contained in:
Martin Thoma 2014-03-11 13:58:42 +01:00
parent 926bf6a386
commit 00c02a4fea
10 changed files with 54 additions and 9 deletions

View file

@ -1,4 +1,5 @@
data Bool = False | True
data Color = Red | Green | Blue | Indigo | Violet
data Tree a = Leaf a | Branch (Tree a) (Tree a)
data Point = Point Float Float deriving (Show)
data Point = Point Float Float deriving (Show)
data Tree t = Node t [Tree t]

View file

@ -0,0 +1,5 @@
data Tree t = Node t [Tree t]
reduceT :: (t -> t -> t) -> Tree t -> t
reduceT f (Node x []) = x
reduceT f (Node x [y]) = f x y
reduceT f (Node x (y:ys)) = reduceT f (f x y) ys

View file

@ -0,0 +1 @@
MPI_Bcast(buffer, count, datatype, root, comm)

View file

@ -0,0 +1,2 @@
MPI_Scatter(sendbuf, sendcount, sendtype, recvbuf,
recvcount, recvtype, root, comm)

View file

@ -0,0 +1,2 @@
remove([(X,A)|L],X,[(X,ANew)|L]) :- A>0, ANew is A-1.
remove([X|L],Y,[X|L1]) :- remove(L,Y,L1).

View file

@ -1,6 +1,6 @@
// file HelloWorld.x10
public class HelloWorld {
public static def main(args: Array[String](1)){
public static def main(args:Rail[String]) {
x10.io.Console.OUT.println("Hello, World");
}
}