How to disable Git Credential Manager for Windows? |
|
Метки: it git шпаргалки |
Простой пример MPI_Reduce в C |
#include
#include "mpi.h"
typedef struct
{
double D;
int I;
}
DI;
int main(int argc, char **argv)
{
int e = 0;
DI di, min = { 0 }, max = { 0 };
e = MPI_Init(&argc, &argv);
e = MPI_Comm_rank(MPI_COMM_WORLD, &di.I);
srand(di.I);
di.D = rand();
e = MPI_Reduce((void *)&di, (void *)&min, 1, MPI_DOUBLE_INT, MPI_MINLOC, 0, MPI_COMM_WORLD);
e = MPI_Reduce((void *)&di, (void *)&max, 1, MPI_DOUBLE_INT, MPI_MAXLOC, 0, MPI_COMM_WORLD);
if (di.I == 0)
{
printf("min = %le (%d), max = %le (%d)\n", min.D, min.I, max.D, max.I);
}
e = MPI_Finalize();
return 0;
}
|
Метки: mpi c/c++ it программирование шпаргалки |
В Якитории вместо васаби - горчица |
|
Метки: васаби еда |
Указатель на функцию в фортране |
module module_act
implicit none
contains
integer function act(f, a, b)
implicit none
integer, intent(in) :: a, b
interface
integer function f(x, y)
integer, intent(in) :: x, y
end function f
end interface
act = f(a, b)
end function act
end module module_act
program pr
use module_act
implicit none
interface
integer function add(a, b)
integer, intent(in) :: a, b
end function add
end interface
print *, "res = ", act(add, 1, 2)
end program pr
integer function add(a, b)
implicit none
integer, intent(in) :: a, b
add = a + b
end function add
|
Метки: it программирование шпаргалки fortran |
От слова "совсем" |
|
Метки: русс. яз. |
Памятка пользователям ssh |
|
Метки: it шпаргалки ssh |