nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ci: compile the manual
[nit.git]
/
lib
/
mpi
/
mpi.nit
diff --git
a/lib/mpi/mpi.nit
b/lib/mpi/mpi.nit
index
a9e22d8
..
7e6f9f6
100644
(file)
--- a/
lib/mpi/mpi.nit
+++ b/
lib/mpi/mpi.nit
@@
-33,7
+33,7
@@
end
import c
intrude import core::text::flat
import serialization
import c
intrude import core::text::flat
import serialization
-private import json::serialization
+private import json
in "C Header" `{
#include <mpi.h>
in "C Header" `{
#include <mpi.h>
@@
-50,11
+50,11
@@
class MPI
fun finalize `{ MPI_Finalize(); `}
# Name of this processor, usually the hostname
fun finalize `{ MPI_Finalize(); `}
# Name of this processor, usually the hostname
- fun processor_name: String import NativeString.to_s_with_length `{
+ fun processor_name: String import CString.to_s_with_length `{
char *name = malloc(MPI_MAX_PROCESSOR_NAME);
int size;
MPI_Get_processor_name(name, &size);
char *name = malloc(MPI_MAX_PROCESSOR_NAME);
int size;
MPI_Get_processor_name(name, &size);
- return NativeString_to_s_with_length(name, size);
+ return CString_to_s_with_length(name, size);
`}
# Send the content of a buffer
`}
# Send the content of a buffer
@@
-338,7
+338,7
@@
extern class SuccessOrError `{ int `}
`}
redef fun to_s do return native_to_s.to_s
`}
redef fun to_s do return native_to_s.to_s
- private fun native_to_s: NativeString `{
+ private fun native_to_s: CString `{
char *err = malloc(MPI_MAX_ERROR_STRING);
MPI_Error_string(self, err, NULL);
return err;
char *err = malloc(MPI_MAX_ERROR_STRING);
MPI_Error_string(self, err, NULL);
return err;
@@
-348,7
+348,7
@@
end
# An MPI error class
extern class ErrorClass `{ int `}
redef fun to_s do return native_to_s.to_s
# An MPI error class
extern class ErrorClass `{ int `}
redef fun to_s do return native_to_s.to_s
- private fun native_to_s: NativeString `{
+ private fun native_to_s: CString `{
char *err = malloc(MPI_MAX_ERROR_STRING);
MPI_Error_string(self, err, NULL);
return err;
char *err = malloc(MPI_MAX_ERROR_STRING);
MPI_Error_string(self, err, NULL);
return err;
@@
-450,7
+450,6
@@
redef class FlatBuffer
source, tag, new Comm.world, new Status.ignore)
length = capacity
source, tag, new Comm.world, new Status.ignore)
length = capacity
- is_dirty = true
end
redef fun recv_fill(mpi, dest, tag, comm) do recv(mpi, 0, capacity, dest, tag, comm)
end
redef fun recv_fill(mpi, dest, tag, comm) do recv(mpi, 0, capacity, dest, tag, comm)