00001
00017 #if !defined(INC_OSKI_PERM_H) && !defined(OSKI_UNBIND)
00018
00019 #define INC_OSKI_PERM_H
00020
00021 #include <oski/common.h>
00022 #include <oski/mangle.h>
00023 #include <oski/matrix.h>
00024 #include <oski/vecview.h>
00025
00026 #if defined(DO_NAME_MANGLING)
00027
00029 #define oski_permstruct_t MANGLE_(oski_permstruct_t)
00030 #define oski_perm_t MANGLE_(oski_perm_t)
00031 #define const_oski_perm_t MANGLE_(const_oski_perm_t)
00032
00033 #define PERM_IDENTITY MANGLE_(PERM_IDENTITY)
00034
00035 #define oski_IsMatPermuted MANGLE_(oski_IsMatPermuted)
00036 #define oski_ViewPermutedMat MANGLE_(oski_ViewPermutedMat)
00037 #define oski_ViewPermutedMatRowPerm MANGLE_(oski_ViewPermutedMatRowPerm)
00038 #define oski_ViewPermutedMatColPerm MANGLE_(oski_ViewPermutedMatColPerm)
00039 #define oski_PermuteVecView MANGLE_(oski_PermuteVecView)
00040
00041 #endif
00042
00055 typedef struct
00056 {
00057 oski_index_t length;
00058 oski_index_t *perm;
00059 }
00060 oski_permstruct_t;
00061
00063 #define MAKE_PERMSTRUCT_INIT(n,p) {(n), (p)}
00064
00069 typedef oski_permstruct_t *oski_perm_t;
00070
00074 typedef const oski_permstruct_t *const_oski_perm_t;
00075
00080 int oski_IsMatPermuted (const oski_matrix_t A_tunable);
00081
00088 const_oski_matrix_t oski_ViewPermutedMat (const oski_matrix_t A_tunable);
00089
00096 const_oski_perm_t oski_ViewPermutedMatRowPerm (const oski_matrix_t A_tunable);
00097
00104 const_oski_perm_t oski_ViewPermutedMatColPerm (const oski_matrix_t A_tunable);
00105
00112 int oski_PermuteVecView (const oski_perm_t P, oski_matop_t opP,
00113 oski_vecview_t x_view);
00114
00115 extern const oski_perm_t PERM_IDENTITY;
00116
00117 #endif
00118
00119 #if defined(OSKI_UNBIND)
00120 # include <oski/mangle.h>
00121 # include <oski/matrix.h>
00122 # include <oski/vecview.h>
00123 # undef INC_OSKI_PERM_H
00124 # undef oski_permstruct_t
00125 # undef oski_perm_t
00126 # undef const_oski_perm_t
00127 # undef PERM_IDENTITY
00128 # undef oski_IsMatPermuted
00129 # undef oski_ViewPermutedMat
00130 # undef oski_ViewPermutedMatRowPerm
00131 # undef oski_ViewPermutedMatColPerm
00132 # undef oski_PermuteVecView
00133 # undef MAKE_PERMSTRUCT_INIT
00134 #endif
00135
00136