int
in C (int*
) with length and destroy statec :: CIntArray :: defaultinit
Initialize a new CIntArray ofsize
elements.
core :: Collection :: CONCURRENT
Type of the concurrent variant of this collectioncore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
core :: Collection :: combinations
Allr
-length combinations on self (in same order) without repeated elements.
core :: Collection :: combinations_with_replacement
Allr
-length combination on self (in same order) with repeated elements.
core :: AbstractArrayRead :: copy_to
Copy a portion ofself
to an other array.
c :: CArray :: defaultinit
c :: CIntArray :: defaultinit
Initialize a new CIntArray ofsize
elements.
core :: AbstractArrayRead :: defaultinit
core :: Object :: defaultinit
mpi :: Receptacle :: defaultinit
core :: Collection :: defaultinit
core :: SequenceRead :: defaultinit
mpi :: Sendable :: defaultinit
core :: SequenceRead :: get_or_default
Try to get an element, returndefault
if the index
is invalid.
core :: SequenceRead :: get_or_null
Try to get an element, returnnull
if the index
is invalid.
core :: Collection :: has_all
Does the collection contain at least each element ofother
?
core :: Collection :: has_any
Does the collection contain at least one element ofother
?
core :: Collection :: has_exactly
Does the collection contain exactly all the elements ofother
?
core :: SequenceRead :: index_of_from
The index of the first occurrence ofitem
, starting from pos.
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
core :: SequenceRead :: iterator_from
Gets a new Iterator starting at positionpos
core :: SequenceRead :: last_index_of
The index of the last occurrence ofitem
.
core :: SequenceRead :: last_index_of_from
The index of the last occurrence ofitem
starting from pos
and decrementing.
core :: AbstractArrayRead :: length=
core :: SequenceRead :: modulo_index
Returns the real index for a modulo index.c :: CArray :: native_array=
Pointer to the real C arraycore :: Object :: output_class_name
Display class name on stdout (debug only).core :: Collection :: permutations
Allr
-length permutations on self (all possible ordering) without repeated elements.
core :: Collection :: product
Cartesian product, overr
times self
.
core :: SequenceRead :: reverse_iterator
Gets an iterator starting at the end and going backwardscore :: SequenceRead :: reverse_iterator_from
Gets an iterator on the chars of self starting frompos
core :: Collection :: to_concurrent
Wrapsself
in a thread-safe collection
core :: Collection :: to_counter
Create and fill up a counter with the elements of `self.core :: Collection :: to_curlslist
Convert Collection[String] to CURLSListcore :: Collection :: to_shuffle
Return a new array made of elements in a random order.mpi :: Receptacle
Something which can receive data directly and efficiently from MPI
# Wrapper around an array of `int` in C (`int*`) with length and destroy state
class CIntArray
super CArray[Int]
redef type NATIVE: NativeCIntArray
# Initialize a new CIntArray of `size` elements.
init(size: Int) is old_style_init do
native_array = new NativeCIntArray(size)
super size
end
# Create from a `SequenceRead[Int]`
new from(array: SequenceRead[Int])
do
var carray = new CIntArray(array.length)
for i in array.length.times do
carray[i] = array[i]
end
return carray
end
end
lib/c/c.nit:85,1--105,3
redef class CIntArray
redef fun send(mpi, at, count, dest, tag, comm)
do
var array
if at != 0 then
array = native_array + at
else array = native_array
mpi.native_send(array, count, new DataType.int,
dest, tag, new Comm.world)
end
redef fun send_all(mpi, dest, tag, comm) do send(mpi, 0, length, dest, tag, comm)
redef fun recv(mpi, at, count, source, tag, comm)
do
var array
if at != 0 then
array = native_array + at
else array = native_array
mpi.native_recv(array, count, new DataType.int,
source, tag, new Comm.world, new Status.ignore)
end
redef fun recv_fill(mpi, dest, tag, comm) do recv(mpi, 0, length, dest, tag, comm)
end
lib/mpi/mpi.nit:458,1--484,3