作者:jmptrade
项目:go-mp
//File_set_info
//Sets new values for hints (collective).
func File_set_info(fh File, info Info) (File, int) {
new_fh := C.MPI_File(fh)
err := C.MPI_File_set_info(new_fh, C.MPI_Info(info))
return File(new_fh), int(err)
}
作者:jmptrade
项目:go-mp
//File_get_errhandler
//Get the error handler attached to a file.
func File_get_errhandler(fh File) (Errhandler, int) {
var errhandler C.MPI_Errhandler
err := C.MPI_File_get_errhandler(C.MPI_File(fh), &errhandler)
return Errhandler(errhandler), int(err)
}
作者:jmptrade
项目:go-mp
//File_get_amode
//Returns access mode associated with an open file.
func File_get_amode(fh File) (int, int) {
var amode C.int
err := C.MPI_File_get_amode(C.MPI_File(fh), &amode)
return int(amode), int(err)
}
作者:jmptrade
项目:go-mp
//File_get_group
//Returns a duplicate of the process group of a file.
func File_get_group(fh File) (Group, int) {
var group C.MPI_Group
err := C.MPI_File_get_group(C.MPI_File(fh), &group)
return Group(group), int(err)
}
作者:jmptrade
项目:go-mp
//File_get_size
//Returns the current size of the file.
func File_get_size(fh File) (Offset, int) {
var size C.MPI_Offset
err := C.MPI_File_get_size(C.MPI_File(fh), &size)
return Offset(size), int(err)
}
作者:jmptrade
项目:go-mp
//File_get_position_shared
//Returns the current position of the shared file pointer.
func File_get_position_shared(fh File) (Offset, int) {
var offset C.MPI_Offset
err := C.MPI_File_get_position_shared(C.MPI_File(fh), &offset)
return Offset(offset), int(err)
}
作者:jmptrade
项目:go-mp
//File_seek_shared
//Updates the global shared file pointer (collective).
func File_seek_shared(fh File, offset Offset, whence int) int {
err := C.MPI_File_seek_shared(C.MPI_File(fh),
C.MPI_Offset(offset),
C.int(whence))
return int(err)
}
作者:jmptrade
项目:go-mp
//File_get_info
//Returns a new info object containing values for
//current hints associated with a file.
func File_get_info(fh File) (Info, int) {
var info_used C.MPI_Info
err := C.MPI_File_get_info(C.MPI_File(fh), &info_used)
return Info(info_used), int(err)
}
作者:jmptrade
项目:go-mp
//File_get_atomicity
//Returns current consistency semantics for data-access operations.
func File_get_atomicity(fh File) (int, int) {
var flag C.int
err := C.MPI_File_get_atomicity(C.MPI_File(fh),
&flag)
return int(flag), int(err)
}
作者:jmptrade
项目:go-mp
//File_get_type_extent
//Returns the extent of the data type in a file.
func File_get_type_extent(fh File, datatype Datatype) (Aint, int) {
var extend C.MPI_Aint
err := C.MPI_File_get_type_extent(C.MPI_File(fh),
C.MPI_Datatype(datatype),
&extend)
return Aint(extend), int(err)
}
作者:jmptrade
项目:go-mp
//File_get_byte_offset
//Converts a view-relative offset into an absolute byte position.
func File_get_byte_offset(fh File, offset Offset) (Offset, int) {
var disp C.MPI_Offset
err := C.MPI_File_get_byte_offset(C.MPI_File(fh),
C.MPI_Offset(offset),
&disp)
return Offset(disp), int(err)
}
作者:jmptrade
项目:go-mp
//File_write_all_end
//Writes a file starting at the locations specified by individual file pointers;
//ending part of a split collective routine (blocking).
func File_write_all_end(fh File, buf unsafe.Pointer) (File, Status, int) {
new_fh := C.MPI_File(fh)
var status C.MPI_Status
err := C.MPI_File_write_all_end(new_fh,
buf,
&status)
return File(new_fh), Status(status), int(err)
}
作者:jmptrade
项目:go-mp
//File_write_ordered_begin
//Writes a file at a location specified by a shared file pointer;
//beginning part of a split collective routine (nonblocking).
func File_write_ordered_begin(fh File, buf unsafe.Pointer, count int, datatype Datatype) (File, int) {
new_fh := C.MPI_File(fh)
err := C.MPI_File_write_ordered_begin(new_fh,
buf,
C.int(count),
C.MPI_Datatype(datatype))
return File(new_fh), int(err)
}
作者:jmptrade
项目:go-mp
//File_set_view
//Changes process’s view of data in file (collective).
func File_set_view(fh File, disp Offset, etype Datatype, filetype Datatype, datarep string, info Info) (File, int) {
new_fh := C.MPI_File(fh)
err := C.MPI_File_set_view(fh,
C.MPI_Offset(disp),
C.MPI_Datatype(etype),
C.MPI_Datatype(filetype),
C.CString(datarep),
C.MPI_Info(info))
return File(new_fh), int(err)
}
作者:jmptrade
项目:go-mp
//File_read_at_all_begin
//Reads a file at explicitly specified offsets;
//beginning part of a split collective routine (nonblocking).
func File_read_at_all_begin(fh File, offset Offset, count int, datatype Datatype) (unsafe.Pointer, int) {
var buffer unsafe.Pointer
err := C.MPI_File_read_at_all_begin(C.MPI_File(fh),
C.MPI_Offset(offset),
buffer,
C.int(count),
C.MPI_Datatype(datatype))
return buffer, int(err)
}
作者:jmptrade
项目:go-mp
//File_write_ordered_end
//Writes a file at a location specified by a shared file pointer;
//ending part of a split collective routine (blocking).
func File_write_ordered_end(fh File) (File, unsafe.Pointer, Status, int) {
new_fh := C.MPI_File(fh)
var buf unsafe.Pointer
var status C.MPI_Status
err := C.MPI_File_write_ordered_end(new_fh,
buf,
&status)
return File(new_fh), buf, Status(status), int(err)
}
作者:jmptrade
项目:go-mp
//File_read_ordered_begin
//Reads a file at a location specified by a shared file pointer;
//beginning part of a split collective routine (nonblocking).
func File_read_ordered_begin(fh File, count int, datatype Datatype) (File, unsafe.Pointer, int) {
new_fh := C.MPI_File(fh)
var buf unsafe.Pointer
err := C.MPI_File_read_ordered_begin(new_fh,
buf,
C.int(count),
C.MPI_Datatype(datatype))
return File(new_fh), buf, int(err)
}
作者:jmptrade
项目:go-mp
//File_write_ordered
//Writes a file at a location specified by a shared file pointer (blocking, collective).
func File_write_ordered(fh File, buffer unsafe.Pointer, count int, datatype Datatype) (Status, int) {
var status C.MPI_Status
err := C.MPI_File_write_ordered(C.MPI_File(fh),
buffer,
C.int(count),
C.MPI_Datatype(datatype),
&status)
return Status(status), int(err)
}
作者:jmptrade
项目:go-mp
//File_write_at_all_begin
//Writes a file at explicitly specified offsets
//beginning part of a split collective routine (nonblocking).
func File_write_at_all_begin(fh File, offset Offset, buf unsafe.Pointer, count int, datatype Datatype) (File, int) {
new_fh := C.MPI_File(fh)
err := C.MPI_File_write_at_all_begin(new_fh,
C.MPI_Offset(offset),
buf,
C.int(count),
C.MPI_Datatype(datatype))
return File(new_fh), int(err)
}
作者:jmptrade
项目:go-mp
//File_read_all
//Reads a file starting at the locations specified by individual file pointers (blocking, collective).
func File_read_all(fh File, count int, datatype Datatype) (unsafe.Pointer, Status, int) {
var buffer unsafe.Pointer
var status C.MPI_Status
err := C.MPI_File_read_all(C.MPI_File(fh),
buffer,
C.int(count),
C.MPI_Datatype(datatype),
&status)
return buffer, Status(status), int(err)
}