Skip to content

T117m/MatrixExample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MatrixExample

Простая рабочая (ещё нет) имплементация примера использования конкурентности из бумаги "Google Go!" 2010 года за авторством Martin Aigner и Alexander Baumgartner (мне лень имена переводить), на которую я наткнулся луркая по cat-v.org. Сам пример на странице 23 выглядел вот так:

func InverseProduct (a Matrix, b Matrix) {
    a_inv_future := InverseFuture(a);
    b_inv_future := InverseFuture(b);
    a_inv := <a_inv_future;
    b_inv := <b_inv_future;
    return Product(a_inv, b_inv);
}
func InverseFuture (a Matrix) {
    future := make (chan Matrix);
    go func () { future <Inverse(a) }();
    return future;
}

About

Простой пример конкурентности

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages