1 /* 2 3 BLIS 4 An object-based framework for developing high-performance BLAS-like 5 libraries. 6 7 Copyright (C) 2014, The University of Texas at Austin 8 9 Redistribution and use in source and binary forms, with or without 10 modification, are permitted provided that the following conditions are 11 met: 12 - Redistributions of source code must retain the above copyright 13 notice, this list of conditions and the following disclaimer. 14 - Redistributions in binary form must reproduce the above copyright 15 notice, this list of conditions and the following disclaimer in the 16 documentation and/or other materials provided with the distribution. 17 - Neither the name(s) of the copyright holder(s) nor the names of its 18 contributors may be used to endorse or promote products derived 19 from this software without specific prior written permission. 20 21 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 33 */ 34 35 #include "bli_part_check.h" 36 37 // -- Matrix partitioning ------------------------------------------------------ 38 39 BLIS_EXPORT_BLIS void bli_acquire_mpart 40 ( 41 dim_t i, 42 dim_t j, 43 dim_t m, 44 dim_t n, 45 obj_t* obj, 46 obj_t* sub_obj 47 ); 48 49 #undef GENPROT 50 #define GENPROT( opname ) \ 51 \ 52 BLIS_EXPORT_BLIS void PASTEMAC0( opname ) \ 53 ( \ 54 subpart_t req_part, \ 55 dim_t i, \ 56 dim_t b, \ 57 obj_t* obj, \ 58 obj_t* sub_obj \ 59 ); 60 61 GENPROT( acquire_mpart_t2b ) 62 GENPROT( acquire_mpart_b2t ) 63 GENPROT( acquire_mpart_l2r ) 64 GENPROT( acquire_mpart_r2l ) 65 GENPROT( acquire_mpart_tl2br ) 66 GENPROT( acquire_mpart_br2tl ) 67 68 69 #undef GENPROT 70 #define GENPROT( opname ) \ 71 \ 72 BLIS_EXPORT_BLIS void PASTEMAC0( opname ) \ 73 ( \ 74 dir_t direct, \ 75 subpart_t req_part, \ 76 dim_t i, \ 77 dim_t b, \ 78 obj_t* obj, \ 79 obj_t* sub_obj \ 80 ); 81 82 GENPROT( acquire_mpart_mdim ) 83 GENPROT( acquire_mpart_ndim ) 84 GENPROT( acquire_mpart_mndim ) 85 86 87 // -- Vector partitioning ------------------------------------------------------ 88 89 #undef GENPROT 90 #define GENPROT( opname ) \ 91 \ 92 BLIS_EXPORT_BLIS void PASTEMAC0( opname ) \ 93 ( \ 94 subpart_t req_part, \ 95 dim_t i, \ 96 dim_t b, \ 97 obj_t* obj, \ 98 obj_t* sub_obj \ 99 ); 100 101 GENPROT( acquire_vpart_f2b ) 102 GENPROT( acquire_vpart_b2f ) 103 104 // -- Scalar acquisition ------------------------------------------------------- 105 106 BLIS_EXPORT_BLIS void bli_acquire_mij 107 ( 108 dim_t i, 109 dim_t j, 110 obj_t* obj, 111 obj_t* sub_obj 112 ); 113 114 BLIS_EXPORT_BLIS void bli_acquire_vi 115 ( 116 dim_t i, 117 obj_t* obj, 118 obj_t* sub_obj 119 ); 120 121