Using a STL map to keep in relation the C pointer with the C++ object
isn't that way more expensive that it is supposed to be ? The STL map
is just a hash table, it can be as optimized as you want, it's still
a hash table. How about using exactly the same mechanism as for the
Fortran handler ? It's cheap, it's based on an array, it's thread
save and we just reuse the code already there.
george.
On Dec 30, 2006, at 6:41 PM, brbar...@osl.iu.edu wrote:
Author: brbarret
Date: 2006-12-30 18:41:42 EST (Sat, 30 Dec 2006)
New Revision: 12945
Added:
trunk/ompi/mpi/cxx/datatype.cc
trunk/ompi/mpi/cxx/file.cc
trunk/ompi/mpi/cxx/win.cc
Modified:
trunk/ompi/errhandler/errhandler.c
trunk/ompi/errhandler/errhandler.h
trunk/ompi/mpi/cxx/Makefile.am
trunk/ompi/mpi/cxx/comm.cc
trunk/ompi/mpi/cxx/comm.h
trunk/ompi/mpi/cxx/comm_inln.h
trunk/ompi/mpi/cxx/datatype.h
trunk/ompi/mpi/cxx/datatype_inln.h
trunk/ompi/mpi/cxx/errhandler.h
trunk/ompi/mpi/cxx/file.h
trunk/ompi/mpi/cxx/file_inln.h
trunk/ompi/mpi/cxx/functions.h
trunk/ompi/mpi/cxx/functions_inln.h
trunk/ompi/mpi/cxx/intercepts.cc
trunk/ompi/mpi/cxx/mpicxx.cc
trunk/ompi/mpi/cxx/mpicxx.h
trunk/ompi/mpi/cxx/win.h
trunk/ompi/mpi/cxx/win_inln.h
Log:
A number of MPI-2 compliance fixes for the C++ bindings:
* Added Create_errhandler for MPI::File
* Make errors_throw_exceptions a first-class predefined exception
handler, and make it work for Comm, File, and Win
* Deal with error handlers and attributes for Files, Types, and Wins
like we do with Comms - can't just cast the callbacks from C++
signatures to C signatures. Callbacks will then fire with the
C object, not the C++ object. That's bad.