text:
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.42000
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace MindTouch.RoslynAnalyzers {
    using System;
    using System.Reflection;

    /// <summary>
    ///   A strongly-typed resource class, for looking up localized strings, etc.
    /// </summary>
    // This class was auto-generated by the StronglyTypedResourceBuilder
    // class via a tool like ResGen or Visual Studio.
    // To add or remove a member, edit your .ResX file then rerun ResGen
    // with the /str option, or rebuild your VS project.
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    internal class Resources {

        private static global::System.Resources.ResourceManager resourceMan;

        private static global::System.Globalization.CultureInfo resourceCulture;

        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        internal Resources() {
        }

        /// <summary>
        ///   Returns the cached ResourceManager instance used by this class.
        /// </summary>
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        internal static global::System.Resources.ResourceManager ResourceManager {
            get {
                if (object.ReferenceEquals(resourceMan, null)) {
                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MindTouch.RoslynAnalyzers.Resources", typeof(Resources).GetTypeInfo().Assembly);
                    resourceMan = temp;
                }
                return resourceMan;
            }
        }

        /// <summary>
        ///   Overrides the current thread's CurrentUICulture property for all
        ///   resource lookups using this strongly typed resource class.
        /// </summary>
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        internal static global::System.Globalization.CultureInfo Culture {
            get {
                return resourceCulture;
            }
            set {
                resourceCulture = value;
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to All cases of enum should be covered in switch statement.
        /// </summary>
        internal static string MindTouchEnumSwitchAnalyzerDescription {
            get {
                return ResourceManager.GetString("MindTouchEnumSwitchAnalyzerDescription", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to switch on enum '{0}' is missing the following members: '{1}'.
        /// </summary>
        internal static string MindTouchEnumSwitchAnalyzerMessageFormat {
            get {
                return ResourceManager.GetString("MindTouchEnumSwitchAnalyzerMessageFormat", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Not at all cases of enum covered in switch statement.
        /// </summary>
        internal static string MindTouchEnumSwitchAnalyzerTitle {
            get {
                return ResourceManager.GetString("MindTouchEnumSwitchAnalyzerTitle", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Collections that are passed as parameters or returned from functions should be materialized.
        /// </summary>
        internal static string MindTouchMaterializedEnumerableAnalyzerDescription {
            get {
                return ResourceManager.GetString("MindTouchMaterializedEnumerableAnalyzerDescription", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Collection may or may not be materialized.
        /// </summary>
        internal static string MindTouchMaterializedEnumerableAnalyzerMessageFormat {
            get {
                return ResourceManager.GetString("MindTouchMaterializedEnumerableAnalyzerMessageFormat", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Unmaterialized collection.
        /// </summary>
        internal static string MindTouchMaterializedEnumerableAnalyzerTitle {
            get {
                return ResourceManager.GetString("MindTouchMaterializedEnumerableAnalyzerTitle", resourceCulture);
            }
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
/*********************************************************************/
/* Copyright 2009, 2010 The University of Texas at Austin.           */
/* All rights reserved.                                              */
/*                                                                   */
/* Redistribution and use in source and binary forms, with or        */
/* without modification, are permitted provided that the following   */
/* conditions are met:                                               */
/*                                                                   */
/*   1. Redistributions of source code must retain the above         */
/*      copyright notice, this list of conditions and the following  */
/*      disclaimer.                                                  */
/*                                                                   */
/*   2. Redistributions in binary form must reproduce the above      */
/*      copyright notice, this list of conditions and the following  */
/*      disclaimer in the documentation and/or other materials       */
/*      provided with the distribution.                              */
/*                                                                   */
/*    THIS  SOFTWARE IS PROVIDED  BY THE  UNIVERSITY OF  TEXAS AT    */
/*    AUSTIN  ``AS IS''  AND ANY  EXPRESS OR  IMPLIED WARRANTIES,    */
/*    INCLUDING, BUT  NOT LIMITED  TO, THE IMPLIED  WARRANTIES OF    */
/*    MERCHANTABILITY  AND FITNESS FOR  A PARTICULAR  PURPOSE ARE    */
/*    DISCLAIMED.  IN  NO EVENT SHALL THE UNIVERSITY  OF TEXAS AT    */
/*    AUSTIN OR CONTRIBUTORS BE  LIABLE FOR ANY DIRECT, INDIRECT,    */
/*    INCIDENTAL,  SPECIAL, EXEMPLARY,  OR  CONSEQUENTIAL DAMAGES    */
/*    (INCLUDING, BUT  NOT LIMITED TO,  PROCUREMENT OF SUBSTITUTE    */
/*    GOODS  OR  SERVICES; LOSS  OF  USE,  DATA,  OR PROFITS;  OR    */
/*    BUSINESS INTERRUPTION) HOWEVER CAUSED  AND ON ANY THEORY OF    */
/*    LIABILITY, WHETHER  IN CONTRACT, STRICT  LIABILITY, OR TORT    */
/*    (INCLUDING NEGLIGENCE OR OTHERWISE)  ARISING IN ANY WAY OUT    */
/*    OF  THE  USE OF  THIS  SOFTWARE,  EVEN  IF ADVISED  OF  THE    */
/*    POSSIBILITY OF SUCH DAMAGE.                                    */
/*                                                                   */
/* The views and conclusions contained in the software and           */
/* documentation are those of the authors and should not be          */
/* interpreted as representing official policies, either expressed   */
/* or implied, of The University of Texas at Austin.                 */
/*********************************************************************/

#ifndef PARAM_H
#define PARAM_H

#ifdef OPTERON

#define SNUMOPT		4
#define DNUMOPT		2

#define GEMM_DEFAULT_OFFSET_A  64
#define GEMM_DEFAULT_OFFSET_B 256
#define GEMM_DEFAULT_ALIGN 0x01ffffUL

#define SGEMM_DEFAULT_UNROLL_N 4
#define DGEMM_DEFAULT_UNROLL_N 4
#define QGEMM_DEFAULT_UNROLL_N 2
#define CGEMM_DEFAULT_UNROLL_N 2
#define ZGEMM_DEFAULT_UNROLL_N 2
#define XGEMM_DEFAULT_UNROLL_N 1

#ifdef ARCH_X86
#define SGEMM_DEFAULT_UNROLL_M 4
#define DGEMM_DEFAULT_UNROLL_M 2
#define QGEMM_DEFAULT_UNROLL_M 2
#define CGEMM_DEFAULT_UNROLL_M 2
#define ZGEMM_DEFAULT_UNROLL_M 1
#define XGEMM_DEFAULT_UNROLL_M 1
#else
#define SGEMM_DEFAULT_UNROLL_M 8
#define DGEMM_DEFAULT_UNROLL_M 4
#define QGEMM_DEFAULT_UNROLL_M 2
#define CGEMM_DEFAULT_UNROLL_M 4
#define ZGEMM_DEFAULT_UNROLL_M 2
#define XGEMM_DEFAULT_UNROLL_M 1
#endif

#define SGEMM_DEFAULT_P sgemm_p
#define DGEMM_DEFAULT_P dgemm_p
#define QGEMM_DEFAULT_P qgemm_p
#define CGEMM_DEFAULT_P cgemm_p
#define ZGEMM_DEFAULT_P zgemm_p
#define XGEMM_DEFAULT_P xgemm_p

#define SGEMM_DEFAULT_R sgemm_r
#define DGEMM_DEFAULT_R dgemm_r
#define QGEMM_DEFAULT_R qgemm_r
#define CGEMM_DEFAULT_R cgemm_r
#define ZGEMM_DEFAULT_R zgemm_r
#define XGEMM_DEFAULT_R xgemm_r

#ifdef ALLOC_HUGETLB

#define SGEMM_DEFAULT_Q 248
#define DGEMM_DEFAULT_Q 248
#define QGEMM_DEFAULT_Q 248
#define CGEMM_DEFAULT_Q 248
#define ZGEMM_DEFAULT_Q 248
#define XGEMM_DEFAULT_Q 248

#else

#define SGEMM_DEFAULT_Q 240
#define DGEMM_DEFAULT_Q 240
#define QGEMM_DEFAULT_Q 240
#define CGEMM_DEFAULT_Q 240
#define ZGEMM_DEFAULT_Q 240
#define XGEMM_DEFAULT_Q 240

#endif

#define SYMV_P	16
#define HAVE_EXCLUSIVE_CACHE

#endif

#if defined(BARCELONA) || defined(SHANGHAI) || defined(BOBCAT)

#define SNUMOPT		8
#define DNUMOPT		4

#define GEMM_DEFAULT_OFFSET_A  64
#define GEMM_DEFAULT_OFFSET_B 832
#define GEMM_DEFAULT_ALIGN 0x0fffUL

#define SGEMM_DEFAULT_UNROLL_N 4
#define DGEMM_DEFAULT_UNROLL_N 4
#define QGEMM_DEFAULT_UNROLL_N 2
#define CGEMM_DEFAULT_UNROLL_N 2
#define ZGEMM_DEFAULT_UNROLL_N 2
#define XGEMM_DEFAULT_UNROLL_N 1

#ifdef ARCH_X86
#define SGEMM_DEFAULT_UNROLL_M 4
#define DGEMM_DEFAULT_UNROLL_M 2
#define QGEMM_DEFAULT_UNROLL_M 2
#define CGEMM_DEFAULT_UNROLL_M 2
#define ZGEMM_DEFAULT_UNROLL_M 1
#define XGEMM_DEFAULT_UNROLL_M 1
#else
#define SGEMM_DEFAULT_UNROLL_M 8
#define DGEMM_DEFAULT_UNROLL_M 4
#define QGEMM_DEFAULT_UNROLL_M 2
#define CGEMM_DEFAULT_UNROLL_M 4
#define ZGEMM_DEFAULT_UNROLL_M 2
#define XGEMM_DEFAULT_UNROLL_M 1
#endif

#if 0
#define SGEMM_DEFAULT_P 496
#define DGEMM_DEFAULT_P 248
#define QGEMM_DEFAULT_P 124
#define CGEMM_DEFAULT_P 248
#define ZGEMM_DEFAULT_P 124
#define XGEMM_DEFAULT_P  62

#define SGEMM_DEFAULT_Q 248
#define DGEMM_DEFAULT_Q 248
#define QGEMM_DEFAULT_Q 248
#define CGEMM_DEFAULT_Q 248
#define ZGEMM_DEFAULT_Q 248
#define XGEMM_DEFAULT_Q 248

#else

#define SGEMM_DEFAULT_P 448
#define DGEMM_DEFAULT_P 224
#define QGEMM_DEFAULT_P 112
#define CGEMM_DEFAULT_P 224
#define ZGEMM_DEFAULT_P 112
#define XGEMM_DEFAULT_P  56

#define SGEMM_DEFAULT_Q 224
#define DGEMM_DEFAULT_Q 224
#define QGEMM_DEFAULT_Q 224
#define CGEMM_DEFAULT_Q 224
#define ZGEMM_DEFAULT_Q 224
#define XGEMM_DEFAULT_Q 224

#endif

#define SGEMM_DEFAULT_R sgemm_r
#define QGEMM_DEFAULT_R qgemm_r
#define DGEMM_DEFAULT_R dgemm_r
#define CGEMM_DEFAULT_R cgemm_r
#define ZGEMM_DEFAULT_R zgemm_r
#define XGEMM_DEFAULT_R xgemm_r

#define SYMV_P	16
#define HAVE_EXCLUSIVE_CACHE

#define GEMM_THREAD gemm_thread_mn

#endif

#ifdef BULLDOZER

#define SNUMOPT		8
#define DNUMOPT		4

#define GEMM_DEFAULT_OFFSET_A  64
#define GEMM_DEFAULT_OFFSET_B 832
#define GEMM_DEFAULT_ALIGN 0x0fffUL

#define QGEMM_DEFAULT_UNROLL_N 2
#define CGEMM_DEFAULT_UNROLL_N 2
#define ZGEMM_DEFAULT_UNROLL_N 2
#define XGEMM_DEFAULT_UNROLL_N 1

#ifdef ARCH_X86
#define SGEMM_DEFAULT_UNROLL_N 4
#define DGEMM_DEFAULT_UNROLL_N 4
#define SGEMM_DEFAULT_UNROLL_M 4
#define DGEMM_DEFAULT_UNROLL_M 2
#define QGEMM_DEFAULT_UNROLL_M 2
#define CGEMM_DEFAULT_UNROLL_M 2
#define ZGEMM_DEFAULT_UNROLL_M 1
#define XGEMM_DEFAULT_UNROLL_M 1
#else
#define SGEMM_DEFAULT_UNROLL_N 2
#define DGEMM_DEFAULT_UNROLL_N 2
#define SGEMM_DEFAULT_UNROLL_M 16
#define DGEMM_DEFAULT_UNROLL_M 8
#define QGEMM_DEFAULT_UNROLL_M 2
#define CGEMM_DEFAULT_UNROLL_M 4
#define ZGEMM_DEFAULT_UNROLL_M 2
#define XGEMM_DEFAULT_UNROLL_M 1
#define CGEMM3M_DEFAULT_UNROLL_N 4
#define CGEMM3M_DEFAULT_UNROLL_M 8
#define ZGEMM3M_DEFAULT_UNROLL_N 4
#define ZGEMM3M_DEFAULT_UNROLL_M 4
#define GEMV_UNROLL 8
#endif

#if defined(ARCH_X86_64)
#define SGEMM_DEFAULT_P 768
#define DGEMM_DEFAULT_P 384
#else
#define SGEMM_DEFAULT_P 448
#define DGEMM_DEFAULT_P 224
#endif
#define QGEMM_DEFAULT_P 112
#define CGEMM_DEFAULT_P 224
#define ZGEMM_DEFAULT_P 112
#define XGEMM_DEFAULT_P  56

#if defined(ARCH_X86_64)
#define SGEMM_DEFAULT_Q 168
#define DGEMM_DEFAULT_Q 168
#else
#define SGEMM_DEFAULT_Q 224
#define DGEMM_DEFAULT_Q 224
#endif
#define QGEMM_DEFAULT_Q 224
#define CGEMM_DEFAULT_Q 224
#define ZGEMM_DEFAULT_Q 224
#define XGEMM_DEFAULT_Q 224

#define SGEMM_DEFAULT_R sgemm_r
#define QGEMM_DEFAULT_R qgemm_r
#define DGEMM_DEFAULT_R dgemm_r
#define CGEMM_DEFAULT_R cgemm_r
#define ZGEMM_DEFAULT_R zgemm_r
#define XGEMM_DEFAULT_R xgemm_r

#define SYMV_P	16
#define HAVE_EXCLUSIVE_CACHE

#define GEMM_THREAD gemm_thread_mn

#endif

#ifdef PILEDRIVER

#define SNUMOPT		8
#define DNUMOPT		4

#define GEMM_DEFAULT_OFFSET_A  64
#define GEMM_DEFAULT_OFFSET_B 832
#define GEMM_DEFAULT_ALIGN 0x0fffUL

#define QGEMM_DEFAULT_UNROLL_N 2
#define CGEMM_DEFAULT_UNROLL_N 2
#define ZGEMM_DEFAULT_UNROLL_N 2
#define XGEMM_DEFAULT_UNROLL_N 1

#ifdef ARCH_X86
#define SGEMM_DEFAULT_UNROLL_N 4
#define DGEMM_DEFAULT_UNROLL_N 4
#define SGEMM_DEFAULT_UNROLL_M 4
#define DGEMM_DEFAULT_UNROLL_M 2
#define QGEMM_DEFAULT_UNROLL_M 2
#define CGEMM_DEFAULT_UNROLL_M 2
#define ZGEMM_DEFAULT_UNROLL_M 1
#define XGEMM_DEFAULT_UNROLL_M 1
#else
#define SGEMM_DEFAULT_UNROLL_N 2
#define DGEMM_DEFAULT_UNROLL_N 2
#define SGEMM_DEFAULT_UNROLL_M 16
#define DGEMM_DEFAULT_UNROLL_M 8
#define QGEMM_DEFAULT_UNROLL_M 2
#define CGEMM_DEFAULT_UNROLL_M 4
#define ZGEMM_DEFAULT_UNROLL_M 2
#define XGEMM_DEFAULT_UNROLL_M 1
#define CGEMM3M_DEFAULT_UNROLL_N 4
#define CGEMM3M_DEFAULT_UNROLL_M 8
#define ZGEMM3M_DEFAULT_UNROLL_N 4
#define ZGEMM3M_DEFAULT_UNROLL_M 4
#define GEMV_UNROLL 8
#endif

#if defined(ARCH_X86_64)
#define SGEMM_DEFAULT_P 768
#define DGEMM_DEFAULT_P 384
#else
#define SGEMM_DEFAULT_P 448
#define DGEMM_DEFAULT_P 224
#endif
#define QGEMM_DEFAULT_P 112
#define CGEMM_DEFAULT_P 224
#define ZGEMM_DEFAULT_P 112
#define XGEMM_DEFAULT_P  56

#if defined(ARCH_X86_64)
#define SGEMM_DEFAULT_Q 168
#define DGEMM_DEFAULT_Q 168
#else
#define SGEMM_DEFAULT_Q 224
#define DGEMM_DEFAULT_Q 224
#endif
#define QGEMM_DEFAULT_Q 224
#define CGEMM_DEFAULT_Q 224
#define ZGEMM_DEFAULT_Q 224
#define XGEMM_DEFAULT_Q 224

#define SGEMM_DEFAULT_R sgemm_r
#define QGEMM_DEFAULT_R qgemm_r
#define DGEMM_DEFAULT_R dgemm_r
#define CGEMM_DEFAULT_R cgemm_r
#define ZGEMM_DEFAULT_R zgemm_r
#define XGEMM_DEFAULT_R xgemm_r

#define SYMV_P	16
#define HAVE_EXCLUSIVE_CACHE

#define GEMM_THREAD gemm_thread_mn

#endif

#ifdef ATHLON

#define SNUMOPT		4
#define DNUMOPT		2

#define GEMM_DEFAULT_OFFSET_A   0
#define GEMM_DEFAULT_OFFSET_B 384
#define GEMM_DEFAULT_ALIGN 0x0ffffUL

#define SGEMM_DEFAULT_UNROLL_N 4
#define DGEMM_DEFAULT_UNROLL_N 4
#define QGEMM_DEFAULT_UNROLL_N 2
#define CGEMM_DEFAULT_UNROLL_N 2
#define ZGEMM_DEFAULT_UNROLL_N 2
#define XGEMM_DEFAULT_UNROLL_N 1

#define SGEMM_DEFAULT_UNROLL_M 2
#define DGEMM_DEFAULT_UNROLL_M 1
#define QGEMM_DEFAULT_UNROLL_M 2
#define CGEMM_DEFAULT_UNROLL_M 1
#define ZGEMM_DEFAULT_UNROLL_M 1
#define XGEMM_DEFAULT_UNROLL_M 1

#define SGEMM_DEFAULT_R sgemm_r
#define DGEMM_DEFAULT_R dgemm_r
#define QGEMM_DEFAULT_R qgemm_r
#define CGEMM_DEFAULT_R cgemm_r
#define ZGEMM_DEFAULT_R zgemm_r
#define XGEMM_DEFAULT_R xgemm_r

#define SGEMM_DEFAULT_P 208
#define DGEMM_DEFAULT_P 104
#define QGEMM_DEFAULT_P  56
#define CGEMM_DEFAULT_P 104
#define ZGEMM_DEFAULT_P  56
#define XGEMM_DEFAULT_P  28

#define SGEMM_DEFAULT_Q 208
#define DGEMM_DEFAULT_Q 208
#define QGEMM_DEFAULT_Q 208
#define CGEMM_DEFAULT_Q 208
#define ZGEMM_DEFAULT_Q 208
#define XGEMM_DEFAULT_Q 208

#define SYMV_P	16
#define HAVE_EXCLUSIVE_CACHE
#endif

#ifdef VIAC3

#define SNUMOPT		2
#define DNUMOPT		1

#define GEMM_DEFAULT_OFFSET_A   0
#define GEMM_DEFAULT_OFFSET_B 256
#define GEMM_DEFAULT_ALIGN 0x0ffffUL

#define SGEMM_DEFAULT_UNROLL_N 4
#define DGEMM_DEFAULT_UNROLL_N 4
#define QGEMM_DEFAULT_UNROLL_N 2
#define CGEMM_DEFAULT_UNROLL_N 2
#define ZGEMM_DEFAULT_UNROLL_N 2
#define XGEMM_DEFAULT_UNROLL_N 1

#define SGEMM_DEFAULT_UNROLL_M 2
#define DGEMM_DEFAULT_UNROLL_M 1
#define QGEMM_DEFAULT_UNROLL_M 2
#define CGEMM_DEFAULT_UNROLL_M 1
#define ZGEMM_DEFAULT_UNROLL_M 1
#define XGEMM_DEFAULT_UNROLL_M 1

#define SGEMM_DEFAULT_R sgemm_r
#define DGEMM_DEFAULT_R dgemm_r
#define QGEMM_DEFAULT_R qgemm_r
#define CGEMM_DEFAULT_R cgemm_r
#define ZGEMM_DEFAULT_R zgemm_r
#define XGEMM_DEFAULT_R xgemm_r

#define SGEMM_DEFAULT_P 128
#define DGEMM_DEFAULT_P 128
#define QGEMM_DEFAULT_P 128
#define CGEMM_DEFAULT_P 128
#define ZGEMM_DEFAULT_P 128
#define XGEMM_DEFAULT_P 128

#define SGEMM_DEFAULT_Q 512
#define DGEMM_DEFAULT_Q 256
#define QGEMM_DEFAULT_Q 256
#define CGEMM_DEFAULT_Q 256
#define ZGEMM_DEFAULT_Q 128
#define XGEMM_DEFAULT_Q 128

#define SYMV_P	16
#endif

#ifdef NANO

#define SNUMOPT		4
#define DNUMOPT		2

#define GEMM_DEFAULT_OFFSET_A  64
#define GEMM_DEFAULT_OFFSET_B 256
#define GEMM_DEFAULT_ALIGN 0x01ffffUL

#ifdef ARCH_X86
#define SGEMM_DEFAULT_UNROLL_N 4
#define DGEMM_DEFAULT_UNROLL_N 4
#define QGEMM_DEFAULT_UNROLL_N 2
#define CGEMM_DEFAULT_UNROLL_N 2
#define ZGEMM_DEFAULT_UNROLL_N 2
#define XGEMM_DEFAULT_UNROLL_N 1

#define SGEMM_DEFAULT_UNROLL_M 4
#define DGEMM_DEFAULT_UNROLL_M 2
#define QGEMM_DEFAULT_UNROLL_M 2
#define CGEMM_DEFAULT_UNROLL_M 2
#define ZGEMM_DEFAULT_UNROLL_M 1
#define XGEMM_DEFAULT_UNROLL_M 1
#else
#define SGEMM_DEFAULT_UNROLL_N 8
#define DGEMM_DEFAULT_UNROLL_N 4
#define QGEMM_DEFAULT_UNROLL_N 2
#define CGEMM_DEFAULT_UNROLL_N 4
#define ZGEMM_DEFAULT_UNROLL_N 2
#define XGEMM_DEFAULT_UNROLL_N 1

#define SGEMM_DEFAULT_UNROLL_M 4
#define DGEMM_DEFAULT_UNROLL_M 4
#define QGEMM_DEFAULT_UNROLL_M 2
#define CGEMM_DEFAULT_UNROLL_M 2
#define ZGEMM_DEFAULT_UNROLL_M 2
#define XGEMM_DEFAULT_UNROLL_M 1
#endif

#define SGEMM_DEFAULT_P 288
#define DGEMM_DEFAULT_P 288
#define QGEMM_DEFAULT_P 288
#define CGEMM_DEFAULT_P 288
#define ZGEMM_DEFAULT_P 288
#define XGEMM_DEFAULT_P 288

#define SGEMM_DEFAULT_R sgemm_r
#define DGEMM_DEFAULT_R dgemm_r
#define QGEMM_DEFAULT_R qgemm_r
#define CGEMM_DEFAULT_R cgemm_r
#define ZGEMM_DEFAULT_R zgemm_r
#define XGEMM_DEFAULT_R xgemm_r

#define SGEMM_DEFAULT_Q 256
#define DGEMM_DEFAULT_Q 128
#define QGEMM_DEFAULT_Q  64
#define CGEMM_DEFAULT_Q 128
#define ZGEMM_DEFAULT_Q  64
#define XGEMM_DEFAULT_Q  32

#define SYMV_P	16
#define HAVE_EXCLUSIVE_CACHE

#endif

#if defined(PENTIUM) || defined(PENTIUM2) || defined(PENTIUM3)

#ifdef HAVE_SSE
#define SNUMOPT		2
#else
#define SNUMOPT		1
#endif
#define DNUMOPT		1

#define GEMM_DEFAULT_OFFSET_A 0
#define GEMM_DEFAULT_OFFSET_B 0
#define GEMM_DEFAULT_ALIGN 0x0ffffUL

#ifdef HAVE_SSE
#define SGEMM_DEFAULT_UNROLL_M 8
#define CGEMM_DEFAULT_UNROLL_M 4
#else
#define SGEMM_DEFAULT_UNROLL_M 4
#define CGEMM_DEFAULT_UNROLL_M 2
#endif
#define DGEMM_DEFAULT_UNROLL_M 2
#define SGEMM_DEFAULT_UNROLL_N 2
#define DGEMM_DEFAULT_UNROLL_N 2
#define QGEMM_DEFAULT_UNROLL_M 2
#define QGEMM_DEFAULT_UNROLL_N 2
#define CGEMM_DEFAULT_UNROLL_N 1
#define ZGEMM_DEFAULT_UNROLL_M 1
#define ZGEMM_DEFAULT_UNROLL_N 1
#define XGEMM_DEFAULT_UNROLL_M 1
#define XGEMM_DEFAULT_UNROLL_N 1

#define SGEMM_DEFAULT_P sgemm_p
#define SGEMM_DEFAULT_Q 256
#define SGEMM_DEFAULT_R sgemm_r

#define DGEMM_DEFAULT_P dgemm_p
#define DGEMM_DEFAULT_Q 256
#define DGEMM_DEFAULT_R dgemm_r

#define QGEMM_DEFAULT_P qgemm_p
#define QGEMM_DEFAULT_Q 256
#define QGEMM_DEFAULT_R qgemm_r

#define CGEMM_DEFAULT_P cgemm_p
#define CGEMM_DEFAULT_Q 256
#define CGEMM_DEFAULT_R cgemm_r

#define ZGEMM_DEFAULT_P zgemm_p
#define ZGEMM_DEFAULT_Q 256
#define ZGEMM_DEFAULT_R zgemm_r

#define XGEMM_DEFAULT_P xgemm_p
#define XGEMM_DEFAULT_Q 256
#define XGEMM_DEFAULT_R xgemm_r

#define SYMV_P	4

#endif

#ifdef PENTIUMM

#define SNUMOPT		2
#define DNUMOPT		1

#define GEMM_DEFAULT_OFFSET_A 0
#define GEMM_DEFAULT_OFFSET_B 0
#define GEMM_DEFAULT_ALIGN 0x0ffffUL

#ifdef CORE_YONAH
#define SGEMM_DEFAULT_UNROLL_M 4
#define SGEMM_DEFAULT_UNROLL_N 4
#define DGEMM_DEFAULT_UNROLL_M 2
#define DGEMM_DEFAULT_UNROLL_N 4
#define QGEMM_DEFAULT_UNROLL_M 2
#define QGEMM_DEFAULT_UNROLL_N 2
#define CGEMM_DEFAULT_UNROLL_M 2
#define CGEMM_DEFAULT_UNROLL_N 2
#define ZGEMM_DEFAULT_UNROLL_M 1
#define ZGEMM_DEFAULT_UNROLL_N 2
#define XGEMM_DEFAULT_UNROLL_M 1
#define XGEMM_DEFAULT_UNROLL_N 1
#else
#define SGEMM_DEFAULT_UNROLL_M 8
#define SGEMM_DEFAULT_UNROLL_N 2
#define DGEMM_DEFAULT_UNROLL_M 2
#define DGEMM_DEFAULT_UNROLL_N 2
#define QGEMM_DEFAULT_UNROLL_M 2
#define QGEMM_DEFAULT_UNROLL_N 2
#define CGEMM_DEFAULT_UNROLL_M 4
#define CGEMM_DEFAULT_UNROLL_N 1
#define ZGEMM_DEFAULT_UNROLL_M 1
#define ZGEMM_DEFAULT_UNROLL_N 1
#define XGEMM_DEFAULT_UNROLL_M 1
#define XGEMM_DEFAULT_UNROLL_N 1

#endif

#define SGEMM_DEFAULT_P sgemm_p
#define SGEMM_DEFAULT_Q 256
#define SGEMM_DEFAULT_R sgemm_r

#define DGEMM_DEFAULT_P dgemm_p
#define DGEMM_DEFAULT_Q 256
#define DGEMM_DEFAULT_R dgemm_r

#define QGEMM_DEFAULT_P qgemm_p
#define QGEMM_DEFAULT_Q 256
#define QGEMM_DEFAULT_R qgemm_r

#define CGEMM_DEFAULT_P cgemm_p
#define CGEMM_DEFAULT_Q 256
#define CGEMM_DEFAULT_R cgemm_r

#define ZGEMM_DEFAULT_P zgemm_p
#define ZGEMM_DEFAULT_Q 256
#define ZGEMM_DEFAULT_R zgemm_r

#define XGEMM_DEFAULT_P xgemm_p
#define XGEMM_DEFAULT_Q 256
#define XGEMM_DEFAULT_R xgemm_r

#define SYMV_P	4
#endif

#ifdef CORE_NORTHWOOD

#define SNUMOPT		4
#define DNUMOPT		2

#define GEMM_DEFAULT_OFFSET_A      0
#define GEMM_DEFAULT_OFFSET_B     32

#define GEMM_DEFAULT_ALIGN 0x0ffffUL

#define SYMV_P	8

#define SGEMM_DEFAULT_UNROLL_M 8
#define DGEMM_DEFAULT_UNROLL_M 4
#define QGEMM_DEFAULT_UNROLL_M 2
#define CGEMM_DEFAULT_UNROLL_M 4
#define ZGEMM_DEFAULT_UNROLL_M 2
#define XGEMM_DEFAULT_UNROLL_M 1

#define SGEMM_DEFAULT_UNROLL_N 2
#define DGEMM_DEFAULT_UNROLL_N 2
#define QGEMM_DEFAULT_UNROLL_N 2
#define CGEMM_DEFAULT_UNROLL_N 1
#define ZGEMM_DEFAULT_UNROLL_N 1
#define XGEMM_DEFAULT_UNROLL_N 1

#define SGEMM_DEFAULT_P sgemm_p
#define SGEMM_DEFAULT_R sgemm_r

#define DGEMM_DEFAULT_P dgemm_p
#define DGEMM_DEFAULT_R dgemm_r

#define QGEMM_DEFAULT_P qgemm_p
#define QGEMM_DEFAULT_R qgemm_r

#define CGEMM_DEFAULT_P cgemm_p
#define CGEMM_DEFAULT_R cgemm_r

#define ZGEMM_DEFAULT_P zgemm_p
#define ZGEMM_DEFAULT_R zgemm_r

#define XGEMM_DEFAULT_P xgemm_p
#define XGEMM_DEFAULT_R xgemm_r

#define SGEMM_DEFAULT_Q 128
#define DGEMM_DEFAULT_Q 128
#define QGEMM_DEFAULT_Q 128
#define CGEMM_DEFAULT_Q 128
#define ZGEMM_DEFAULT_Q 128
#define XGEMM_DEFAULT_Q 128
#endif

#ifdef CORE_PRESCOTT

#define SNUMOPT		4
#define DNUMOPT		2

#ifndef __64BIT__
#define GEMM_DEFAULT_OFFSET_A    128
#define GEMM_DEFAULT_OFFSET_B    192
#else
#define GEMM_DEFAULT_OFFSET_A      0
#define GEMM_DEFAULT_OFFSET_B    256
#endif

#define GEMM_DEFAULT_ALIGN 0x0ffffUL

#define SYMV_P	8

#ifdef ARCH_X86
#define SGEMM_DEFAULT_UNROLL_M 4
#define DGEMM_DEFAULT_UNROLL_M 2
#define QGEMM_DEFAULT_UNROLL_M 2
#define CGEMM_DEFAULT_UNROLL_M 2
#define ZGEMM_DEFAULT_UNROLL_M 1
#define XGEMM_DEFAULT_UNROLL_M 1
#else
#define SGEMM_DEFAULT_UNROLL_M 8
#define DGEMM_DEFAULT_UNROLL_M 4
#define QGEMM_DEFAULT_UNROLL_M 2
#define CGEMM_DEFAULT_UNROLL_M 4
#define ZGEMM_DEFAULT_UNROLL_M 2
#define XGEMM_DEFAULT_UNROLL_M 1
#endif

#define SGEMM_DEFAULT_UNROLL_N 4
#define DGEMM_DEFAULT_UNROLL_N 4
#define QGEMM_DEFAULT_UNROLL_N 2
#define CGEMM_DEFAULT_UNROLL_N 2
#define ZGEMM_DEFAULT_UNROLL_N 2
#define XGEMM_DEFAULT_UNROLL_N 1

#define SGEMM_DEFAULT_P sgemm_p
#define SGEMM_DEFAULT_R sgemm_r

#define DGEMM_DEFAULT_P dgemm_p
#define DGEMM_DEFAULT_R dgemm_r

#define QGEMM_DEFAULT_P qgemm_p
#define QGEMM_DEFAULT_R qgemm_r

#define CGEMM_DEFAULT_P cgemm_p
#define CGEMM_DEFAULT_R cgemm_r

#define ZGEMM_DEFAULT_P zgemm_p
#define ZGEMM_DEFAULT_R zgemm_r

#define XGEMM_DEFAULT_P xgemm_p
#define XGEMM_DEFAULT_R xgemm_r

#define SGEMM_DEFAULT_Q 128
#define DGEMM_DEFAULT_Q 128
#define QGEMM_DEFAULT_Q 128
#define CGEMM_DEFAULT_Q 128
#define ZGEMM_DEFAULT_Q 128
#define XGEMM_DEFAULT_Q 128
#endif

#ifdef CORE2

#define SNUMOPT		8
#define DNUMOPT		4

#define GEMM_DEFAULT_OFFSET_A    448
#define GEMM_DEFAULT_OFFSET_B    128
#define GEMM_DEFAULT_ALIGN 0x03fffUL

#define SYMV_P	8

#define SWITCH_RATIO	4

#ifdef ARCH_X86
#define SGEMM_DEFAULT_UNROLL_M 8
#define DGEMM_DEFAULT_UNROLL_M 4
#define QGEMM_DEFAULT_UNROLL_M 2
#define CGEMM_DEFAULT_UNROLL_M 4
#define ZGEMM_DEFAULT_UNROLL_M 2
#define XGEMM_DEFAULT_UNROLL_M 1

#define SGEMM_DEFAULT_UNROLL_N 2
#define DGEMM_DEFAULT_UNROLL_N 2
#define QGEMM_DEFAULT_UNROLL_N 2
#define CGEMM_DEFAULT_UNROLL_N 1
#define ZGEMM_DEFAULT_UNROLL_N 1
#define XGEMM_DEFAULT_UNROLL_N 1

#define MASK(a, b) ((((a) + (b) - 1) / (b)) * (b))

#else
#define SGEMM_DEFAULT_UNROLL_M 8
#define DGEMM_DEFAULT_UNROLL_M 4
#define QGEMM_DEFAULT_UNROLL_M 2
#define CGEMM_DEFAULT_UNROLL_M 4
#define ZGEMM_DEFAULT_UNROLL_M 2
#define XGEMM_DEFAULT_UNROLL_M 1

#define SGEMM_DEFAULT_UNROLL_N 4
#define DGEMM_DEFAULT_UNROLL_N 4
#define QGEMM_DEFAULT_UNROLL_N 2
#define CGEMM_DEFAULT_UNROLL_N 2
#define ZGEMM_DEFAULT_UNROLL_N 2
#define XGEMM_DEFAULT_UNROLL_N 1
#endif

#define SGEMM_DEFAULT_P sgemm_p
#define SGEMM_DEFAULT_R sgemm_r

#define DGEMM_DEFAULT_P dgemm_p
#define DGEMM_DEFAULT_R dgemm_r

#define QGEMM_DEFAULT_P qgemm_p
#define QGEMM_DEFAULT_R qgemm_r

#define CGEMM_DEFAULT_P cgemm_p
#define CGEMM_DEFAULT_R cgemm_r

#define ZGEMM_DEFAULT_P zgemm_p
#define ZGEMM_DEFAULT_R zgemm_r

#define XGEMM_DEFAULT_P xgemm_p
#define XGEMM_DEFAULT_R xgemm_r

#define SGEMM_DEFAULT_Q 256
#define DGEMM_DEFAULT_Q 256
#define QGEMM_DEFAULT_Q 256
#define CGEMM_DEFAULT_Q 256
#define ZGEMM_DEFAULT_Q 256
#define XGEMM_DEFAULT_Q 256

#endif

#ifdef PENRYN

#define SNUMOPT		8
#define DNUMOPT		4

#define GEMM_DEFAULT_OFFSET_A   128
#define GEMM_DEFAULT_OFFSET_B     0
#define GEMM_DEFAULT_ALIGN 0x03fffUL

#define SYMV_P	8

#define SWITCH_RATIO	4

#ifdef ARCH_X86
#define SGEMM_DEFAULT_UNROLL_M 4
#define DGEMM_DEFAULT_UNROLL_M 2
#define QGEMM_DEFAULT_UNROLL_M 2
#define CGEMM_DEFAULT_UNROLL_M 2
#define ZGEMM_DEFAULT_UNROLL_M 1
#define XGEMM_DEFAULT_UNROLL_M 1

#define SGEMM_DEFAULT_UNROLL_N 4
#define DGEMM_DEFAULT_UNROLL_N 4
#define QGEMM_DEFAULT_UNROLL_N 2
#define CGEMM_DEFAULT_UNROLL_N 2
#define ZGEMM_DEFAULT_UNROLL_N 2
#define XGEMM_DEFAULT_UNROLL_N 1
#else
#define SGEMM_DEFAULT_UNROLL_M 8
#define DGEMM_DEFAULT_UNROLL_M 4
#define QGEMM_DEFAULT_UNROLL_M 2
#define CGEMM_DEFAULT_UNROLL_M 4
#define ZGEMM_DEFAULT_UNROLL_M 2
#define XGEMM_DEFAULT_UNROLL_M 1

#define SGEMM_DEFAULT_UNROLL_N 4
#define DGEMM_DEFAULT_UNROLL_N 4
#define QGEMM_DEFAULT_UNROLL_N 2
#define CGEMM_DEFAULT_UNROLL_N 2
#define ZGEMM_DEFAULT_UNROLL_N 2
#define XGEMM_DEFAULT_UNROLL_N 1
#endif

#define SGEMM_DEFAULT_P sgemm_p
#define SGEMM_DEFAULT_R sgemm_r

#define DGEMM_DEFAULT_P dgemm_p
#define DGEMM_DEFAULT_R dgemm_r

#define QGEMM_DEFAULT_P qgemm_p
#define QGEMM_DEFAULT_R qgemm_r

#define CGEMM_DEFAULT_P cgemm_p
#define CGEMM_DEFAULT_R cgemm_r

#define ZGEMM_DEFAULT_P zgemm_p
#define ZGEMM_DEFAULT_R zgemm_r

#define XGEMM_DEFAULT_P xgemm_p
#define XGEMM_DEFAULT_R xgemm_r

#define SGEMM_DEFAULT_Q 512
#define DGEMM_DEFAULT_Q 256
#define QGEMM_DEFAULT_Q 128
#define CGEMM_DEFAULT_Q 512
#define ZGEMM_DEFAULT_Q 256
#define XGEMM_DEFAULT_Q 128

#define GETRF_FACTOR 0.75
#endif

#ifdef DUNNINGTON

#define SNUMOPT		8
#define DNUMOPT		4

#define GEMM_DEFAULT_OFFSET_A   128
#define GEMM_DEFAULT_OFFSET_B     0
#define GEMM_DEFAULT_ALIGN 0x03fffUL

#define SYMV_P	8

#define SWITCH_RATIO	4

#ifdef ARCH_X86
#define SGEMM_DEFAULT_UNROLL_M 4
#define DGEMM_DEFAULT_UNROLL_M 2
#define QGEMM_DEFAULT_UNROLL_M 2
#define CGEMM_DEFAULT_UNROLL_M 2
#define ZGEMM_DEFAULT_UNROLL_M 1
#define XGEMM_DEFAULT_UNROLL_M 1

#define SGEMM_DEFAULT_UNROLL_N 4
#define DGEMM_DEFAULT_UNROLL_N 4
#define QGEMM_DEFAULT_UNROLL_N 2
#define CGEMM_DEFAULT_UNROLL_N 2
#define ZGEMM_DEFAULT_UNROLL_N 2
#define XGEMM_DEFAULT_UNROLL_N 1
#else
#define SGEMM_DEFAULT_UNROLL_M 8
#define DGEMM_DEFAULT_UNROLL_M 4
#define QGEMM_DEFAULT_UNROLL_M 2
#define CGEMM_DEFAULT_UNROLL_M 4
#define ZGEMM_DEFAULT_UNROLL_M 2
#define XGEMM_DEFAULT_UNROLL_M 1

#define SGEMM_DEFAULT_UNROLL_N 4
#define DGEMM_DEFAULT_UNROLL_N 4
#define QGEMM_DEFAULT_UNROLL_N 2
#define CGEMM_DEFAULT_UNROLL_N 2
#define ZGEMM_DEFAULT_UNROLL_N 2
#define XGEMM_DEFAULT_UNROLL_N 1
#endif

#define SGEMM_DEFAULT_P sgemm_p
#define SGEMM_DEFAULT_R sgemm_r

#define DGEMM_DEFAULT_P dgemm_p
#define DGEMM_DEFAULT_R dgemm_r

#define QGEMM_DEFAULT_P qgemm_p
#define QGEMM_DEFAULT_R qgemm_r

#define CGEMM_DEFAULT_P cgemm_p
#define CGEMM_DEFAULT_R cgemm_r

#define ZGEMM_DEFAULT_P zgemm_p
#define ZGEMM_DEFAULT_R zgemm_r

#define XGEMM_DEFAULT_P xgemm_p
#define XGEMM_DEFAULT_R xgemm_r

#define SGEMM_DEFAULT_Q 768
#define DGEMM_DEFAULT_Q 384
#define QGEMM_DEFAULT_Q 192
#define CGEMM_DEFAULT_Q 768
#define ZGEMM_DEFAULT_Q 384
#define XGEMM_DEFAULT_Q 192

#define GETRF_FACTOR 0.75
#define GEMM_THREAD gemm_thread_mn
#endif

#ifdef NEHALEM

#define SNUMOPT		8
#define DNUMOPT		4

#define GEMM_DEFAULT_OFFSET_A    32
#define GEMM_DEFAULT_OFFSET_B     0
#define GEMM_DEFAULT_ALIGN 0x03fffUL

#define SYMV_P	8

#define SWITCH_RATIO	4

#ifdef ARCH_X86
#define SGEMM_DEFAULT_UNROLL_M 4
#define DGEMM_DEFAULT_UNROLL_M 2
#define QGEMM_DEFAULT_UNROLL_M 2
#define CGEMM_DEFAULT_UNROLL_M 2
#define ZGEMM_DEFAULT_UNROLL_M 1
#define XGEMM_DEFAULT_UNROLL_M 1

#define SGEMM_DEFAULT_UNROLL_N 4
#define DGEMM_DEFAULT_UNROLL_N 4
#define QGEMM_DEFAULT_UNROLL_N 2
#define CGEMM_DEFAULT_UNROLL_N 2
#define ZGEMM_DEFAULT_UNROLL_N 2
#define XGEMM_DEFAULT_UNROLL_N 1
#else
#define SGEMM_DEFAULT_UNROLL_M 4
#define DGEMM_DEFAULT_UNROLL_M 2
#define QGEMM_DEFAULT_UNROLL_M 2
#define CGEMM_DEFAULT_UNROLL_M 2
#define ZGEMM_DEFAULT_UNROLL_M 1
#define XGEMM_DEFAULT_UNROLL_M 1

#define SGEMM_DEFAULT_UNROLL_N 8
#define DGEMM_DEFAULT_UNROLL_N 8
#define QGEMM_DEFAULT_UNROLL_N 2
#define CGEMM_DEFAULT_UNROLL_N 4
#define ZGEMM_DEFAULT_UNROLL_N 4
#define XGEMM_DEFAULT_UNROLL_N 1
#endif

#define SGEMM_DEFAULT_P 504
#define SGEMM_DEFAULT_R sgemm_r

#define DGEMM_DEFAULT_P 504
#define DGEMM_DEFAULT_R dgemm_r

#define QGEMM_DEFAULT_P 504
#define QGEMM_DEFAULT_R qgemm_r

#define CGEMM_DEFAULT_P 252
#define CGEMM_DEFAULT_R cgemm_r

#define ZGEMM_DEFAULT_P 252
#define ZGEMM_DEFAULT_R zgemm_r

#define XGEMM_DEFAULT_P 252
#define XGEMM_DEFAULT_R xgemm_r

#define SGEMM_DEFAULT_Q 512
#define DGEMM_DEFAULT_Q 256
#define QGEMM_DEFAULT_Q 128
#define CGEMM_DEFAULT_Q 512
#define ZGEMM_DEFAULT_Q 256
#define XGEMM_DEFAULT_Q 128

#define GETRF_FACTOR 0.72

#endif

#ifdef SANDYBRIDGE

#define SNUMOPT		8
#define DNUMOPT		4

#define GEMM_DEFAULT_OFFSET_A	  0
#define GEMM_DEFAULT_OFFSET_B     0
#define GEMM_DEFAULT_ALIGN 0x03fffUL

#define SYMV_P	8

#define SWITCH_RATIO	4

#ifdef ARCH_X86
#define SGEMM_DEFAULT_UNROLL_M 4
#define DGEMM_DEFAULT_UNROLL_M 2
#define QGEMM_DEFAULT_UNROLL_M 2
#define CGEMM_DEFAULT_UNROLL_M 2
#define ZGEMM_DEFAULT_UNROLL_M 1
#define XGEMM_DEFAULT_UNROLL_M 1

#define SGEMM_DEFAULT_UNROLL_N 4
#define DGEMM_DEFAULT_UNROLL_N 4
#define QGEMM_DEFAULT_UNROLL_N 2
#define CGEMM_DEFAULT_UNROLL_N 2
#define ZGEMM_DEFAULT_UNROLL_N 2
#define XGEMM_DEFAULT_UNROLL_N 1
#else
#define SGEMM_DEFAULT_UNROLL_M 8
#define DGEMM_DEFAULT_UNROLL_M 8
#define QGEMM_DEFAULT_UNROLL_M 2
#define CGEMM_DEFAULT_UNROLL_M 8
#define ZGEMM_DEFAULT_UNROLL_M 4
#define XGEMM_DEFAULT_UNROLL_M 1

#define SGEMM_DEFAULT_UNROLL_N 8
#define DGEMM_DEFAULT_UNROLL_N 4
#define QGEMM_DEFAULT_UNROLL_N 2
#define CGEMM_DEFAULT_UNROLL_N 4
#define ZGEMM_DEFAULT_UNROLL_N 4
#define XGEMM_DEFAULT_UNROLL_N 1
#endif

#define SGEMM_DEFAULT_P 512
#define SGEMM_DEFAULT_R sgemm_r
//#define SGEMM_DEFAULT_R 1024

#define DGEMM_DEFAULT_P 512
#define DGEMM_DEFAULT_R dgemm_r
//#define DGEMM_DEFAULT_R 1024

#define QGEMM_DEFAULT_P 504
#define QGEMM_DEFAULT_R qgemm_r

#define CGEMM_DEFAULT_P 128
//#define CGEMM_DEFAULT_R cgemm_r
#define CGEMM_DEFAULT_R 1024

#define ZGEMM_DEFAULT_P 512
#define ZGEMM_DEFAULT_R zgemm_r
//#define ZGEMM_DEFAULT_R 1024

#define XGEMM_DEFAULT_P 252
#define XGEMM_DEFAULT_R xgemm_r

#define SGEMM_DEFAULT_Q 256
#define DGEMM_DEFAULT_Q 256
#define QGEMM_DEFAULT_Q 128
#define CGEMM_DEFAULT_Q 256
#define ZGEMM_DEFAULT_Q 192
#define XGEMM_DEFAULT_Q 128

#define GETRF_FACTOR 0.72

#endif

#ifdef ATOM

#define SNUMOPT		2
#define DNUMOPT		1

#define GEMM_DEFAULT_OFFSET_A     64
#define GEMM_DEFAULT_OFFSET_B      0
#define GEMM_DEFAULT_ALIGN 0x0ffffUL

#define SYMV_P	8

#ifdef ARCH_X86
#define SGEMM_DEFAULT_UNROLL_M 4
#define DGEMM_DEFAULT_UNROLL_M 2
#define QGEMM_DEFAULT_UNROLL_M 2
#define CGEMM_DEFAULT_UNROLL_M 2
#define ZGEMM_DEFAULT_UNROLL_M 1
#define XGEMM_DEFAULT_UNROLL_M 1
#else
#define SGEMM_DEFAULT_UNROLL_M 8
#define DGEMM_DEFAULT_UNROLL_M 4
#define QGEMM_DEFAULT_UNROLL_M 2
#define CGEMM_DEFAULT_UNROLL_M 4
#define ZGEMM_DEFAULT_UNROLL_M 2
#define XGEMM_DEFAULT_UNROLL_M 1
#endif

#define SGEMM_DEFAULT_UNROLL_N 4
#define DGEMM_DEFAULT_UNROLL_N 2
#define QGEMM_DEFAULT_UNROLL_N 2
#define CGEMM_DEFAULT_UNROLL_N 2
#define ZGEMM_DEFAULT_UNROLL_N 1
#define XGEMM_DEFAULT_UNROLL_N 1

#define SGEMM_DEFAULT_P sgemm_p
#define SGEMM_DEFAULT_R sgemm_r

#define DGEMM_DEFAULT_P dgemm_p
#define DGEMM_DEFAULT_R dgemm_r

#define QGEMM_DEFAULT_P qgemm_p
#define QGEMM_DEFAULT_R qgemm_r

#define CGEMM_DEFAULT_P cgemm_p
#define CGEMM_DEFAULT_R cgemm_r

#define ZGEMM_DEFAULT_P zgemm_p
#define ZGEMM_DEFAULT_R zgemm_r

#define XGEMM_DEFAULT_P xgemm_p
#define XGEMM_DEFAULT_R xgemm_r

#define SGEMM_DEFAULT_Q 256
#define DGEMM_DEFAULT_Q 256
#define QGEMM_DEFAULT_Q 256
#define CGEMM_DEFAULT_Q 256
#define ZGEMM_DEFAULT_Q 256
#define XGEMM_DEFAULT_Q 256

#endif

#ifdef ITANIUM2

#define SNUMOPT		4
#define DNUMOPT		4

#define GEMM_DEFAULT_OFFSET_A 0
#define GEMM_DEFAULT_OFFSET_B 128
#define GEMM_DEFAULT_ALIGN 0x03fffUL

#define SGEMM_DEFAULT_UNROLL_M 8
#define SGEMM_DEFAULT_UNROLL_N 8
#define DGEMM_DEFAULT_UNROLL_M 8
#define DGEMM_DEFAULT_UNROLL_N 8
#define QGEMM_DEFAULT_UNROLL_M 8
#define QGEMM_DEFAULT_UNROLL_N 8
#define CGEMM_DEFAULT_UNROLL_M 4
#define CGEMM_DEFAULT_UNROLL_N 4
#define ZGEMM_DEFAULT_UNROLL_M 4
#define ZGEMM_DEFAULT_UNROLL_N 4
#define XGEMM_DEFAULT_UNROLL_M 4
#define XGEMM_DEFAULT_UNROLL_N 4

#define SGEMM_DEFAULT_P sgemm_p
#define DGEMM_DEFAULT_P dgemm_p
#define QGEMM_DEFAULT_P qgemm_p
#define CGEMM_DEFAULT_P cgemm_p
#define ZGEMM_DEFAULT_P zgemm_p
#define XGEMM_DEFAULT_P xgemm_p

#define SGEMM_DEFAULT_Q 1024
#define DGEMM_DEFAULT_Q 1024
#define QGEMM_DEFAULT_Q 1024
#define CGEMM_DEFAULT_Q 1024
#define ZGEMM_DEFAULT_Q 1024
#define XGEMM_DEFAULT_Q 1024

#define SGEMM_DEFAULT_R sgemm_r
#define DGEMM_DEFAULT_R dgemm_r
#define QGEMM_DEFAULT_R qgemm_r
#define CGEMM_DEFAULT_R cgemm_r
#define ZGEMM_DEFAULT_R zgemm_r
#define XGEMM_DEFAULT_R xgemm_r

#define SYMV_P	 16

#define GETRF_FACTOR 0.65

#endif

#if defined(EV4) || defined(EV5) || defined(EV6)

#ifdef EV4
#define SNUMOPT		1
#define DNUMOPT		1
#else
#define SNUMOPT		2
#define DNUMOPT		2
#endif

#define GEMM_DEFAULT_OFFSET_A 512
#define GEMM_DEFAULT_OFFSET_B 512
#define GEMM_DEFAULT_ALIGN 0x0ffffUL

#define SGEMM_DEFAULT_UNROLL_M 4
#define SGEMM_DEFAULT_UNROLL_N 4
#define DGEMM_DEFAULT_UNROLL_M 4
#define DGEMM_DEFAULT_UNROLL_N 4
#define CGEMM_DEFAULT_UNROLL_M 2
#define CGEMM_DEFAULT_UNROLL_N 2
#define ZGEMM_DEFAULT_UNROLL_M 2
#define ZGEMM_DEFAULT_UNROLL_N 2

#define SYMV_P	 8

#ifdef EV4
#define SGEMM_DEFAULT_P	 32
#define SGEMM_DEFAULT_Q	112
#define SGEMM_DEFAULT_R	256

#define DGEMM_DEFAULT_P	 32
#define DGEMM_DEFAULT_Q	 56
#define DGEMM_DEFAULT_R	256

#define CGEMM_DEFAULT_P	 32
#define CGEMM_DEFAULT_Q	 64
#define CGEMM_DEFAULT_R	240

#define ZGEMM_DEFAULT_P	 32
#define ZGEMM_DEFAULT_Q	 32
#define ZGEMM_DEFAULT_R	240
#endif

#ifdef EV5
#define SGEMM_DEFAULT_P	 64
#define SGEMM_DEFAULT_Q	256

#define DGEMM_DEFAULT_P	 64
#define DGEMM_DEFAULT_Q	128

#define CGEMM_DEFAULT_P	 64
#define CGEMM_DEFAULT_Q	128

#define ZGEMM_DEFAULT_P	 64
#define ZGEMM_DEFAULT_Q	 64
#endif

#ifdef EV6
#define SGEMM_DEFAULT_P	256
#define SGEMM_DEFAULT_Q	512

#define DGEMM_DEFAULT_P	256
#define DGEMM_DEFAULT_Q	256

#define CGEMM_DEFAULT_P	256
#define CGEMM_DEFAULT_Q	256

#define ZGEMM_DEFAULT_P	128
#define ZGEMM_DEFAULT_Q	256
#endif

#endif

#ifdef CELL

#define SNUMOPT		2
#define DNUMOPT		2

#define GEMM_DEFAULT_OFFSET_A 0
#define GEMM_DEFAULT_OFFSET_B 8192
#define GEMM_DEFAULT_ALIGN 0x0ffffUL

#define SGEMM_DEFAULT_UNROLL_M 16
#define SGEMM_DEFAULT_UNROLL_N 4
#define DGEMM_DEFAULT_UNROLL_M 4
#define DGEMM_DEFAULT_UNROLL_N 4
#define CGEMM_DEFAULT_UNROLL_M 8
#define CGEMM_DEFAULT_UNROLL_N 2
#define ZGEMM_DEFAULT_UNROLL_M 2
#define ZGEMM_DEFAULT_UNROLL_N 2

#define SGEMM_DEFAULT_P 128
#define DGEMM_DEFAULT_P 128
#define CGEMM_DEFAULT_P 128
#define ZGEMM_DEFAULT_P 128

#define SGEMM_DEFAULT_Q  512
#define DGEMM_DEFAULT_Q  256
#define CGEMM_DEFAULT_Q  256
#define ZGEMM_DEFAULT_Q  128

#define SYMV_P	 4
#endif

#ifdef PPCG4
#define GEMM_DEFAULT_OFFSET_A    0
#define GEMM_DEFAULT_OFFSET_B 1024
#define GEMM_DEFAULT_ALIGN 0x0ffffUL

#define SGEMM_DEFAULT_UNROLL_M 16
#define SGEMM_DEFAULT_UNROLL_N 4
#define DGEMM_DEFAULT_UNROLL_M 4
#define DGEMM_DEFAULT_UNROLL_N 4
#define CGEMM_DEFAULT_UNROLL_M 8
#define CGEMM_DEFAULT_UNROLL_N 2
#define ZGEMM_DEFAULT_UNROLL_M 2
#define ZGEMM_DEFAULT_UNROLL_N 2

#define SGEMM_DEFAULT_P 256
#define DGEMM_DEFAULT_P 128
#define CGEMM_DEFAULT_P 128
#define ZGEMM_DEFAULT_P  64

#define SGEMM_DEFAULT_Q 256
#define DGEMM_DEFAULT_Q 256
#define CGEMM_DEFAULT_Q 256
#define ZGEMM_DEFAULT_Q 256

#define SYMV_P	 4
#endif

#ifdef PPC970

#define SNUMOPT		4
#define DNUMOPT		4

#define GEMM_DEFAULT_OFFSET_A 2688
#define GEMM_DEFAULT_OFFSET_B 3072
#define GEMM_DEFAULT_ALIGN 0x03fffUL

#define SGEMM_DEFAULT_UNROLL_M 16
#define SGEMM_DEFAULT_UNROLL_N 4
#define DGEMM_DEFAULT_UNROLL_M 4
#define DGEMM_DEFAULT_UNROLL_N 4
#define CGEMM_DEFAULT_UNROLL_M 8
#define CGEMM_DEFAULT_UNROLL_N 2
#define ZGEMM_DEFAULT_UNROLL_M 2
#define ZGEMM_DEFAULT_UNROLL_N 2

#ifdef OS_LINUX
#if L2_SIZE == 1024976
#define SGEMM_DEFAULT_P 320
#define DGEMM_DEFAULT_P 256
#define CGEMM_DEFAULT_P 256
#define ZGEMM_DEFAULT_P 256
#else
#define SGEMM_DEFAULT_P 176
#define DGEMM_DEFAULT_P 176
#define CGEMM_DEFAULT_P 176
#define ZGEMM_DEFAULT_P 176
#endif
#endif

#define SGEMM_DEFAULT_Q 512
#define DGEMM_DEFAULT_Q 256
#define CGEMM_DEFAULT_Q 256
#define ZGEMM_DEFAULT_Q 128

#define SYMV_P	 4

#endif

#ifdef PPC440

#define SNUMOPT		2
#define DNUMOPT		2

#define GEMM_DEFAULT_OFFSET_A (32 * 0)
#define GEMM_DEFAULT_OFFSET_B (32 * 0)
#define GEMM_DEFAULT_ALIGN 0x0ffffUL

#define SGEMM_DEFAULT_UNROLL_M 4
#define SGEMM_DEFAULT_UNROLL_N 4
#define DGEMM_DEFAULT_UNROLL_M 4
#define DGEMM_DEFAULT_UNROLL_N 4
#define CGEMM_DEFAULT_UNROLL_M 2
#define CGEMM_DEFAULT_UNROLL_N 2
#define ZGEMM_DEFAULT_UNROLL_M 2
#define ZGEMM_DEFAULT_UNROLL_N 2

#define SGEMM_DEFAULT_P 512
#define DGEMM_DEFAULT_P 512
#define CGEMM_DEFAULT_P 512
#define ZGEMM_DEFAULT_P 512

#define SGEMM_DEFAULT_Q 1024
#define DGEMM_DEFAULT_Q  512
#define CGEMM_DEFAULT_Q  512
#define ZGEMM_DEFAULT_Q  256

#define SGEMM_DEFAULT_R SGEMM_DEFAULT_P
#define DGEMM_DEFAULT_R DGEMM_DEFAULT_P
#define CGEMM_DEFAULT_R CGEMM_DEFAULT_P
#define ZGEMM_DEFAULT_R ZGEMM_DEFAULT_P

#define SYMV_P	 4
#endif

#ifdef PPC440FP2

#define SNUMOPT		4
#define DNUMOPT		4

#define GEMM_DEFAULT_OFFSET_A (32 * 0)
#define GEMM_DEFAULT_OFFSET_B (32 * 0)
#define GEMM_DEFAULT_ALIGN 0x0ffffUL

#define SGEMM_DEFAULT_UNROLL_M 8
#define SGEMM_DEFAULT_UNROLL_N 4
#define DGEMM_DEFAULT_UNROLL_M 8
#define DGEMM_DEFAULT_UNROLL_N 4
#define CGEMM_DEFAULT_UNROLL_M 4
#define CGEMM_DEFAULT_UNROLL_N 2
#define ZGEMM_DEFAULT_UNROLL_M 4
#define ZGEMM_DEFAULT_UNROLL_N 2

#define SGEMM_DEFAULT_P 128
#define DGEMM_DEFAULT_P 128
#define CGEMM_DEFAULT_P 128
#define ZGEMM_DEFAULT_P 128
#if 1
#define SGEMM_DEFAULT_Q 4096
#define DGEMM_DEFAULT_Q 3072
#define CGEMM_DEFAULT_Q 2048
#define ZGEMM_DEFAULT_Q 1024
#else
#define SGEMM_DEFAULT_Q  512
#define DGEMM_DEFAULT_Q  256
#define CGEMM_DEFAULT_Q  256
#define ZGEMM_DEFAULT_Q  128
#endif

#define SYMV_P	 4
#endif

#if defined(POWER3) || defined(POWER4) || defined(POWER5)
#define GEMM_DEFAULT_OFFSET_A 0
#define GEMM_DEFAULT_OFFSET_B 2048
#define GEMM_DEFAULT_ALIGN 0x0ffffUL

#define SGEMM_DEFAULT_UNROLL_M 4
#define SGEMM_DEFAULT_UNROLL_N 4
#define DGEMM_DEFAULT_UNROLL_M 4
#define DGEMM_DEFAULT_UNROLL_N 4
#define CGEMM_DEFAULT_UNROLL_M 2
#define CGEMM_DEFAULT_UNROLL_N 2
#define ZGEMM_DEFAULT_UNROLL_M 2
#define ZGEMM_DEFAULT_UNROLL_N 2

#ifdef POWER3

#define SNUMOPT		4
#define DNUMOPT		4

#define SGEMM_DEFAULT_P 256
#define SGEMM_DEFAULT_Q 432
#define SGEMM_DEFAULT_R 1012

#define DGEMM_DEFAULT_P 256
#define DGEMM_DEFAULT_Q 216
#define DGEMM_DEFAULT_R 1012

#define ZGEMM_DEFAULT_P 256
#define ZGEMM_DEFAULT_Q 104
#define ZGEMM_DEFAULT_R 1012
#endif

#if defined(POWER4)
#ifdef ALLOC_HUGETLB
#define SGEMM_DEFAULT_P 184
#define DGEMM_DEFAULT_P 184
#define CGEMM_DEFAULT_P 184
#define ZGEMM_DEFAULT_P 184
#else
#define SGEMM_DEFAULT_P 144
#define DGEMM_DEFAULT_P 144
#define CGEMM_DEFAULT_P 144
#define ZGEMM_DEFAULT_P 144
#endif
#endif

#if defined(POWER5)
#ifdef ALLOC_HUGETLB
#define SGEMM_DEFAULT_P 512
#define DGEMM_DEFAULT_P 256
#define CGEMM_DEFAULT_P 256
#define ZGEMM_DEFAULT_P 128
#else
#define SGEMM_DEFAULT_P 320
#define DGEMM_DEFAULT_P 160
#define CGEMM_DEFAULT_P 160
#define ZGEMM_DEFAULT_P  80
#endif

#define SGEMM_DEFAULT_Q 256
#define CGEMM_DEFAULT_Q 256
#define DGEMM_DEFAULT_Q 256
#define ZGEMM_DEFAULT_Q 256
#endif

#define SYMV_P	 8

#endif

#if defined(POWER6)

#define SNUMOPT		4
#define DNUMOPT		4

#define GEMM_DEFAULT_OFFSET_A  384
#define GEMM_DEFAULT_OFFSET_B 1024
#define GEMM_DEFAULT_ALIGN 0x03fffUL

#define SGEMM_DEFAULT_UNROLL_M 4
#define SGEMM_DEFAULT_UNROLL_N 4
#define DGEMM_DEFAULT_UNROLL_M 4
#define DGEMM_DEFAULT_UNROLL_N 4
#define CGEMM_DEFAULT_UNROLL_M 2
#define CGEMM_DEFAULT_UNROLL_N 4
#define ZGEMM_DEFAULT_UNROLL_M 2
#define ZGEMM_DEFAULT_UNROLL_N 4

#define SGEMM_DEFAULT_P  992
#define DGEMM_DEFAULT_P  480
#define CGEMM_DEFAULT_P  488
#define ZGEMM_DEFAULT_P  248

#define SGEMM_DEFAULT_Q  504
#define DGEMM_DEFAULT_Q  504
#define CGEMM_DEFAULT_Q  400
#define ZGEMM_DEFAULT_Q  400

#define SYMV_P	 8

#endif

#if defined(SPARC) && defined(V7)

#define SNUMOPT		4
#define DNUMOPT		4

#define GEMM_DEFAULT_OFFSET_A 0
#define GEMM_DEFAULT_OFFSET_B 2048
#define GEMM_DEFAULT_ALIGN 0x03fffUL

#define SGEMM_DEFAULT_UNROLL_M 2
#define SGEMM_DEFAULT_UNROLL_N 8
#define DGEMM_DEFAULT_UNROLL_M 2
#define DGEMM_DEFAULT_UNROLL_N 8
#define CGEMM_DEFAULT_UNROLL_M 1
#define CGEMM_DEFAULT_UNROLL_N 4
#define ZGEMM_DEFAULT_UNROLL_M 1
#define ZGEMM_DEFAULT_UNROLL_N 4

#define SGEMM_DEFAULT_P  256
#define DGEMM_DEFAULT_P  256
#define CGEMM_DEFAULT_P  256
#define ZGEMM_DEFAULT_P  256

#define SGEMM_DEFAULT_Q  512
#define DGEMM_DEFAULT_Q  256
#define CGEMM_DEFAULT_Q  256
#define ZGEMM_DEFAULT_Q  128

#define SYMV_P	 8
#define GEMM_THREAD gemm_thread_mn
#endif

#if (defined(SPARC) && defined(V9)) || defined(__sparc_v9__)

#define SNUMOPT		2
#define DNUMOPT		2

#define GEMM_DEFAULT_OFFSET_A 0
#define GEMM_DEFAULT_OFFSET_B 2048
#define GEMM_DEFAULT_ALIGN 0x03fffUL

#define SGEMM_DEFAULT_UNROLL_M 4
#define SGEMM_DEFAULT_UNROLL_N 4
#define DGEMM_DEFAULT_UNROLL_M 4
#define DGEMM_DEFAULT_UNROLL_N 4
#define CGEMM_DEFAULT_UNROLL_M 2
#define CGEMM_DEFAULT_UNROLL_N 2
#define ZGEMM_DEFAULT_UNROLL_M 2
#define ZGEMM_DEFAULT_UNROLL_N 2

#define SGEMM_DEFAULT_P  512
#define DGEMM_DEFAULT_P  512
#define CGEMM_DEFAULT_P  512
#define ZGEMM_DEFAULT_P  512

#define SGEMM_DEFAULT_Q 1024
#define DGEMM_DEFAULT_Q  512
#define CGEMM_DEFAULT_Q  512
#define ZGEMM_DEFAULT_Q  256

#define SYMV_P	 8
#endif

#ifdef SICORTEX

#define SNUMOPT		2
#define DNUMOPT		2

#define GEMM_DEFAULT_OFFSET_A 0
#define GEMM_DEFAULT_OFFSET_B 0
#define GEMM_DEFAULT_ALIGN 0x03fffUL

#define SGEMM_DEFAULT_UNROLL_M  2
#define SGEMM_DEFAULT_UNROLL_N  8
#define DGEMM_DEFAULT_UNROLL_M  2
#define DGEMM_DEFAULT_UNROLL_N  8
#define CGEMM_DEFAULT_UNROLL_M  1
#define CGEMM_DEFAULT_UNROLL_N  4
#define ZGEMM_DEFAULT_UNROLL_M  1
#define ZGEMM_DEFAULT_UNROLL_N  4

#define SGEMM_DEFAULT_P 108
#define DGEMM_DEFAULT_P 112
#define CGEMM_DEFAULT_P 108
#define ZGEMM_DEFAULT_P 112

#define SGEMM_DEFAULT_Q 288
#define DGEMM_DEFAULT_Q 144
#define CGEMM_DEFAULT_Q 144
#define ZGEMM_DEFAULT_Q  72

#define SGEMM_DEFAULT_R 2000
#define DGEMM_DEFAULT_R 2000
#define CGEMM_DEFAULT_R 2000
#define ZGEMM_DEFAULT_R 2000

#define SYMV_P	16
#endif

#ifdef LOONGSON3A
////Copy from SICORTEX
#define SNUMOPT		2
#define DNUMOPT		2

#define GEMM_DEFAULT_OFFSET_A 0
#define GEMM_DEFAULT_OFFSET_B 0
#define GEMM_DEFAULT_ALIGN 0x03fffUL

#define SGEMM_DEFAULT_UNROLL_M  8
#define SGEMM_DEFAULT_UNROLL_N  4

#define DGEMM_DEFAULT_UNROLL_M  4
#define DGEMM_DEFAULT_UNROLL_N  4

#define CGEMM_DEFAULT_UNROLL_M  4
#define CGEMM_DEFAULT_UNROLL_N  2

#define ZGEMM_DEFAULT_UNROLL_M  2
#define ZGEMM_DEFAULT_UNROLL_N  2

#define SGEMM_DEFAULT_P	64
#define DGEMM_DEFAULT_P	44
#define CGEMM_DEFAULT_P 64
#define ZGEMM_DEFAULT_P 32

#define SGEMM_DEFAULT_Q 192
#define DGEMM_DEFAULT_Q 92
#define CGEMM_DEFAULT_Q 128
#define ZGEMM_DEFAULT_Q 80

#define SGEMM_DEFAULT_R 640
#define DGEMM_DEFAULT_R dgemm_r
#define CGEMM_DEFAULT_R 640
#define ZGEMM_DEFAULT_R 640

#define GEMM_OFFSET_A1	0x10000
#define	GEMM_OFFSET_B1	0x100000

#define SYMV_P	16
#endif

#ifdef LOONGSON3B
#define SNUMOPT		2
#define DNUMOPT		2

#define GEMM_DEFAULT_OFFSET_A 0
#define GEMM_DEFAULT_OFFSET_B 0
#define GEMM_DEFAULT_ALIGN 0x03fffUL

#define SGEMM_DEFAULT_UNROLL_M  2
#define SGEMM_DEFAULT_UNROLL_N  2

#define DGEMM_DEFAULT_UNROLL_M  2
#define DGEMM_DEFAULT_UNROLL_N  2

#define CGEMM_DEFAULT_UNROLL_M  2
#define CGEMM_DEFAULT_UNROLL_N  2

#define ZGEMM_DEFAULT_UNROLL_M  2
#define ZGEMM_DEFAULT_UNROLL_N  2

#define SGEMM_DEFAULT_P	64
#define DGEMM_DEFAULT_P	24
#define CGEMM_DEFAULT_P 24
#define ZGEMM_DEFAULT_P 20

#define SGEMM_DEFAULT_Q 192
#define DGEMM_DEFAULT_Q 128
#define CGEMM_DEFAULT_Q 128
#define ZGEMM_DEFAULT_Q 64

#define SGEMM_DEFAULT_R 512
#define DGEMM_DEFAULT_R 512
#define CGEMM_DEFAULT_R 512
#define ZGEMM_DEFAULT_R 512

#define GEMM_OFFSET_A1	0x10000
#define	GEMM_OFFSET_B1	0x100000

#define SYMV_P	16
#endif

#ifdef GENERIC

#define SNUMOPT		2
#define DNUMOPT		2

#define GEMM_DEFAULT_OFFSET_A 0
#define GEMM_DEFAULT_OFFSET_B 0
#define GEMM_DEFAULT_ALIGN 0x0ffffUL

#define SGEMM_DEFAULT_UNROLL_N 4
#define DGEMM_DEFAULT_UNROLL_N 4
#define QGEMM_DEFAULT_UNROLL_N 2
#define CGEMM_DEFAULT_UNROLL_N 2
#define ZGEMM_DEFAULT_UNROLL_N 2
#define XGEMM_DEFAULT_UNROLL_N 1

#ifdef ARCH_X86
#define SGEMM_DEFAULT_UNROLL_M 4
#define DGEMM_DEFAULT_UNROLL_M 2
#define QGEMM_DEFAULT_UNROLL_M 2
#define CGEMM_DEFAULT_UNROLL_M 2
#define ZGEMM_DEFAULT_UNROLL_M 1
#define XGEMM_DEFAULT_UNROLL_M 1
#else
#define SGEMM_DEFAULT_UNROLL_M 8
#define DGEMM_DEFAULT_UNROLL_M 4
#define QGEMM_DEFAULT_UNROLL_M 2
#define CGEMM_DEFAULT_UNROLL_M 4
#define ZGEMM_DEFAULT_UNROLL_M 2
#define XGEMM_DEFAULT_UNROLL_M 1
#endif

#define SGEMM_DEFAULT_P sgemm_p
#define DGEMM_DEFAULT_P dgemm_p
#define QGEMM_DEFAULT_P qgemm_p
#define CGEMM_DEFAULT_P cgemm_p
#define ZGEMM_DEFAULT_P zgemm_p
#define XGEMM_DEFAULT_P xgemm_p

#define SGEMM_DEFAULT_R sgemm_r
#define DGEMM_DEFAULT_R dgemm_r
#define QGEMM_DEFAULT_R qgemm_r
#define CGEMM_DEFAULT_R cgemm_r
#define ZGEMM_DEFAULT_R zgemm_r
#define XGEMM_DEFAULT_R xgemm_r

#define SGEMM_DEFAULT_Q 128
#define DGEMM_DEFAULT_Q 128
#define QGEMM_DEFAULT_Q 128
#define CGEMM_DEFAULT_Q 128
#define ZGEMM_DEFAULT_Q 128
#define XGEMM_DEFAULT_Q 128

#define SYMV_P	16

#endif

#ifndef QGEMM_DEFAULT_UNROLL_M
#define QGEMM_DEFAULT_UNROLL_M 2
#endif

#ifndef QGEMM_DEFAULT_UNROLL_N
#define QGEMM_DEFAULT_UNROLL_N 2
#endif

#ifndef XGEMM_DEFAULT_UNROLL_M
#define XGEMM_DEFAULT_UNROLL_M 2
#endif

#ifndef XGEMM_DEFAULT_UNROLL_N
#define XGEMM_DEFAULT_UNROLL_N 2
#endif

#ifndef HAVE_SSE2
#define SHUFPD_0	shufps	$0x44,
#define SHUFPD_1	shufps	$0x4e,
#define SHUFPD_2	shufps	$0xe4,
#define SHUFPD_3	shufps	$0xee,
#endif

#ifndef SHUFPD_0
#define SHUFPD_0	shufpd	$0,
#endif

#ifndef SHUFPD_1
#define SHUFPD_1	shufpd	$1,
#endif

#ifndef SHUFPD_2
#define SHUFPD_2	shufpd	$2,
#endif

#ifndef SHUFPD_3
#define SHUFPD_3	shufpd	$3,
#endif

#ifndef SHUFPS_39
#define SHUFPS_39	shufps	$0x39,
#endif

#endif


text:
evennia.server.portal.portal
===================================

.. automodule:: evennia.server.portal.portal
   :members:
   :undoc-members:
   :show-inheritance:


text:
"""
[4/21/2014] Challenge #159 [Easy] Rock Paper Scissors Lizard Spock - Part 1 The Basic Game

https://www.reddit.com/r/dailyprogrammer/comments/23lfrf/4212014_challenge_159_easy_rock_paper_scissors/

#Theme Week:
Welcome to my first attempt at a theme week. All week long the challenges will be related to this fascinating advanced
version of the game Rock Paper Scissors. We will explore the depths of this game like none have before.
#Description:
The best way to see this game and understand the rules is to do some basic research.
* [Wikipedia Entry Link] (http://en.wikipedia.org/wiki/Rock-paper-scissors-lizard-Spock)
* [Instructional Video] (https://www.youtube.com/watch?v=iapcKVn7DdY)
The challenge is to implement a basic game of Rock Paper Scissors Lizard Spock (to be called RPSLP for short). Your
game will get the human choice. The computer AI will randomly pick a move. It will compare the results and display the
moves and the out come (who wins or if a tie)
#Input:
Get from the user their move being Rock, Paper Scissors, Lizard, Spock. Design and how you do it is up to you all.
#Output:
Once the human move is obtained have the computer randomly pick their move. Display the moves back to the user and then
give the results.
Again the exact design is up to you as long as the output shows the moves again and the result of the game (who wins or
if a tie).
##Example Output:
    Player Picks: Rock.
    Computer Picks: Spock.

    Spock Vaporizes Rock. Computer Wins!
#For Weds:
As this is a theme challenge. Weds we continue with a more intermediate approach to the game. To plan ahead please
consider in your design some ability to have a human choice be compared to a computer choice or a computer to play
itself as well.
#Extra Challenge:
The game loops and continues to play matches until the user quits or a fixed number of games is played. At the end it
records some basic stats.
* Total Games played
* Computer Wins (Number and percentage)
* Human Wins (Number and percentage)
* Ties (Number and Percentage)
"""

def main():
    pass

if __name__ == "__main__":
    main()


text:
/* eslint-env jest */
jest.unmock('../AccessibleFakeButton');
jest.unmock('../../utils/EventUtils/handleKeyboardAccessibility');

import React from 'react';
import { shallow, mount } from 'enzyme';

import AccessibleFakeButton from '../AccessibleFakeButton';
import { TAB, SPACE, ENTER } from '../../constants/keyCodes';

describe('AccessibleFakeButton', () => {
  it('should apply the correct classNames', () => {
    const fake = shallow(<AccessibleFakeButton />);
    expect(fake.hasClass('md-fake-btn')).toBe(true);
    expect(fake.hasClass('md-pointer--hover')).toBe(true);
  });

  it('should apply the tabbed class name when the button gains focus from tabbing', () => {
    const tabbedClassName = 'class-name-on-tab';
    const fake = shallow(<AccessibleFakeButton tabbedClassName={tabbedClassName} />);
    expect(fake.hasClass(tabbedClassName)).toBe(false);

    fake.simulate('keyUp', { which: TAB, keyCode: TAB });
    expect(fake.hasClass(tabbedClassName)).toBe(true);
  });

  it('should toggle the pressed state when clicked', () => {
    const fake = mount(<AccessibleFakeButton />);
    expect(fake.state('pressed')).toBe(false);

    fake.simulate('click');
    expect(fake.state('pressed')).toBe(true);

    fake.simulate('click');
    expect(fake.state('pressed')).toBe(false);
  });

  it('should set the tabFocused state to true on key up and the key was TAB', () => {
    const fake = shallow(<AccessibleFakeButton />);
    expect(fake.state('tabFocused')).toBe(false);

    fake.simulate('keyUp', { which: SPACE, keyCode: SPACE });
    expect(fake.state('tabFocused')).toBe(false);

    fake.simulate('keyUp', { which: TAB, keyCode: TAB });
    expect(fake.state('tabFocused')).toBe(true);
  });

  it('should trigger the click event when the enter or space key is pressed', () => {
    const onClick = jest.fn();
    const fake = mount(<AccessibleFakeButton onClick={onClick} />);

    fake.simulate('keyDown', { which: ENTER, keyCode: ENTER });
    expect(onClick.mock.calls.length).toBe(1);

    fake.simulate('keyDown', { which: SPACE, keyCode: SPACE });
    expect(onClick.mock.calls.length).toBe(2);
  });

  it('should call the onTabFocus prop onKeyUp and the key was TAB', () => {
    const onTabFocus = jest.fn();
    const fake = mount(<AccessibleFakeButton onTabFocus={onTabFocus} />);

    fake.simulate('keyUp', { which: SPACE, keyCode: SPACE });
    expect(onTabFocus.mock.calls.length).toBe(0);

    fake.simulate('keyUp', { which: TAB, keyCode: TAB });
    expect(onTabFocus.mock.calls.length).toBe(1);
  });

  it('should not trigger the click event when disabled', () => {
    const onClick = jest.fn();
    const fake = shallow(<AccessibleFakeButton onClick={onClick} disabled />);

    fake.simulate('click');
    expect(onClick.mock.calls.length).toBe(0);
  });
});


text:
package com.github.davidmoten.rx.web;

public class Header {
	private final String key;
	private final String value;

	public Header(String key, String value) {
		this.key = key;
		this.value = value;
	}

	public String getKey() {
		return key;
	}

	public String getValue() {
		return value;
	}

}


text:
<<<<<<< HEAD
package main
=======
package nyc311post
>>>>>>> 5b3420b7950e9be7394f6dbeb8c6229058e34a87

import (
	"encoding/json"
	"fmt"
<<<<<<< HEAD
	"net/url"
=======
	"io/ioutil"
	"net/url"
	"path/filepath"
>>>>>>> 5b3420b7950e9be7394f6dbeb8c6229058e34a87
	"strings"
)

// A FullService is a detailed version of a service.
type FullService struct {
	Service
	Url
	LongDescription string     `json:"description"`
	HtmlDescription string     `json:"description_html"`
	Categories      []Category `json:"categories"`
	Actions         []Action   `json:"web_actions"`
	Faqs            []Faq      `json:"faqs"`
}

type FullServices []FullService

type Category struct {
	CategoryName string `json:"category_name"`
}

type Action struct {
	Type  string `json:"type"`
	Label string `json:"label"`
	Url
}

type Faq struct {
	FaqID      string `json:"id"`
	Question   string `json:"questions"`
	Expiration string `json:"expiration"`
	SimpleID   string `json:"simple_id"`
}

type Url struct {
	Path string `json:"url"`
}

// PullFullServiceByID requests the detailed service of a service ID and
// returns a *FullService.
func PullFullServiceByID(id string) (*FullService, error) {
	var s = Service{ID: id}
	return s.PullFull()
}

// NewFullService unmarshalls buf and returns a *FullService.
func NewFullSevice(buf []byte) (f *FullService, err error) {
<<<<<<< HEAD
	var fs []FullService
	err = json.Unmarshal(buf, &fs)
	if err != nil {
		fmt.Println("Error during unmarshall:", err)
		fmt.Println("Raw response:", string(buf))
		fmt.Println("Marshalled response:", fs)
		return nil, err
	}
	return &fs[0], err
=======
	err = json.Unmarshal(buf, &f)
	if err != nil {
		fmt.Println("Error during unmarshall:", err)
	}
	return
>>>>>>> 5b3420b7950e9be7394f6dbeb8c6229058e34a87
}

// NewFullServices unmarshalls buf and returns a FullService.
func NewFullSevices(buf []byte) (f FullServices, err error) {
	err = json.Unmarshal(buf, &f)
	if err != nil {
		fmt.Println("Error during unmarshall:", err)
	}
	return
}

// LoadFullService reads the file fn and returns a *FullService.
<<<<<<< HEAD
func LoadFullService(fn, dir string) (*FullService, error) {
	file, err := Load(fn+".json", dir)
=======
func LoadFullService(fn string) (*FullService, error) {
	file, err := ioutil.ReadFile(fn)
>>>>>>> 5b3420b7950e9be7394f6dbeb8c6229058e34a87
	if err != nil {
		return nil, err
	}

	return NewFullSevice(file)
}

// LoadFullServices reads the file fn and returns a FullServices.
<<<<<<< HEAD
func LoadFullServices(fn, dir string) (FullServices, error) {
	file, err := Load(fn+".json", dir)
=======
func LoadFullServices(fn string) (FullServices, error) {
	file, err := ioutil.ReadFile(fn)
>>>>>>> 5b3420b7950e9be7394f6dbeb8c6229058e34a87
	if err != nil {
		return nil, err
	}

	return NewFullSevices(file)
}

<<<<<<< HEAD
=======
// Save writes the JSON marshalled FullService struct to the filename and
// directory indicated.
func (f *FullService) Save(fn, dir string) {
	JSON, err := json.Marshal(f)
	if err != nil {
		fmt.Println("Error marshalling service:", err)
		return
	}

	fname := strings.Replace(fn, " ", "_", -1)
	err = ioutil.WriteFile(filepath.Join(dir, fname+".json"), JSON, 0777)
}

// Save writes the JSON marshalled FullServices struct to the filename and
// directory indicated.
func (f *FullServices) Save(fn, dir string) {
	JSON, err := json.Marshal(f)
	if err != nil {
		fmt.Println("Error marshalling services:", err)
		return
	}

	fname := strings.Replace(fn, " ", "_", -1)
	err = ioutil.WriteFile(filepath.Join(dir, fname+".json"), JSON, 0777)
}

>>>>>>> 5b3420b7950e9be7394f6dbeb8c6229058e34a87
// SearchForRequests searchs through Service.Actions in each Service and returns
// only Requests that have a url which contain substr.
func (f *FullServices) SearchForRequests(substr string) (Requests, error) {
	var requests Requests
	// uniqueRequest := make(map[string]bool)
<<<<<<< HEAD
	for _, s := range *f {
		r, err := s.SearchForRequest(substr)
		for _, req := range r {
			if err != nil || r == nil {
				fmt.Println("Request:", req.RequestName, "Error:", err)
				continue
			}
			requests = append(requests, *req)
			// // Remove duplicate requests
			// for _, complaint := range complaints {
			// 	if _, ok := uniqueComplaint[complaint.ComplaintName]; ok == false {
			// 		uniqueComplaint[complaint.ComplaintName] = true
			// 		complaintList = append(complaintList, complaint)
			// 	}
			// }
		}
=======
	for i, s := range *f {
		r, err := s.SearchForRequest(substr)
		if err != nil {
			fmt.Println("Request:", i, "Error:", err)
			if r == nil {
				continue
			}
		}
		requests = append(requests, *r)
		// // Remove duplicate requests
		// for _, complaint := range complaints {
		// 	if _, ok := uniqueComplaint[complaint.ComplaintName]; ok == false {
		// 		uniqueComplaint[complaint.ComplaintName] = true
		// 		complaintList = append(complaintList, complaint)
		// 	}
		// }
>>>>>>> 5b3420b7950e9be7394f6dbeb8c6229058e34a87
	}

	return requests, nil
}

// SearchForRequest searchs through Service.Actions and returns only Requests
// that have a url which contain substr.
<<<<<<< HEAD
func (f *FullService) SearchForRequest(substr string) ([]*Request, error) {
	var rs []*Request
	for _, action := range f.Actions {
		var r Request
		actionURL := action.Path

		if strings.Contains(actionURL, substr) {
			parsedURL, err := url.Parse(actionURL)
			if err != nil {
				fmt.Println("Problem parsing url:", actionURL)
				continue
			}
			requestName := parsedURL.Query().Get("serviceName")
			if requestName == "" {
				fmt.Println("Request does not include a serviceName")
				fmt.Println(parsedURL.Query())
				continue
			}
			r.FullService = *f
			r.RequestName = requestName
			r.RequestAction = action
			rs = append(rs, &r)
		}
	}

	return rs, nil
=======
func (f *FullService) SearchForRequest(substr string) (*Request, error) {
	var r *Request
	for _, action := range f.Actions {
		actionUrl := action.Path

		if strings.Contains(actionUrl, substr) == true {
			parsedUrl, err := url.Parse(actionUrl)
			if err != nil {
				fmt.Println("Problem parsing url:", parsedUrl)
				continue
			}
			r.FullService = *f
			r.RequestName = parsedUrl.Query().Get("serviceName")
			r.RequestAction = action
		}
	}

	return r, nil
>>>>>>> 5b3420b7950e9be7394f6dbeb8c6229058e34a87
}


text:
from pyamf.remoting.client import RemotingService

appName = 'MyApp/0.1.0'
gateway = 'http://demo.pyamf.org/gateway/helloworld'
client = RemotingService(gateway, user_agent=appName)
service = client.getService('echo')

print service.echo('Hello World!')


text:
```scss
/// Helfer um innere floats korrekt darzustellen
/// @author Nicolas Gallagher
/// @link http://nicolasgallagher.com/micro-clearfix-hack/ Micro Clearfix
@mixin clearfix {
  &::after {
    content: '';
    display: table;
    clear: both;
  }
}
```

```sass
/// Helfer um innere floats korrekt darzustellen
/// @author Nicolas Gallagher
/// @link http://nicolasgallagher.com/micro-clearfix-hack/ Micro Clearfix
@mixin clearfix
  &::after
    content: ''
    display: table
    clear: both
```


text:
class RenameSitesToAdminSites < ActiveRecord::Migration[5.2]
  def change
    rename_table :sites, :admin_sites
  end
end


text:
HTTP/1.1 400 Bad Request
PGErrorDetail: HTTP%20request%20message%20lacks%20a%20Host%20header%20field.


text:
class Article < ActiveRecord::Base

  before_validation :set_permalink
  translates :title, :intro, :content, :permalink

  belongs_to :category

  has_many :attached_documents

  acts_as_taggable_on :keywords

  include AASM
  aasm_column :state
  aasm_initial_state :pending
  aasm_state :pending, :enter => :unset_all
  aasm_state :published, :enter => :set_published_at
  aasm_state :archived, :enter => :set_archived_at

  aasm_event :publish do
    transitions :from => :pending, :to => :published
  end

  aasm_event :unpublish do
    transitions :from => :published, :to => :pending
  end

  aasm_event :archive do
    transitions :from => :pending, :to => :archived
  end

  aasm_event :unarchive do
    transitions :from => :archived, :to => :pending
  end

  validates_presence_of :title, :message => I18n.t('articles.error_messages.title_cant_be_blank')

  def self.filter(per_page="10", page=1, filter="", state_filter="", keyword="", category_filter="", order="")
    options = { :per_page => per_page, :page => page }

    results = find :all do
      all do
        any do
          title =~ "%#{filter}%"
        end
        unless state_filter.blank?
          state == state_filter
        end
        if category_filter.nil? || category_filter.blank?
        elsif category_filter == "nil"
          category.id.nil?
        else
          category.id == Category.find(category_filter).self_and_descendants.map{|c| c.id }
        end

      end
      order_by "articles." + order
    end

    unless keyword.blank?
      results.collect!{|a| a if a.keyword_list.include? keyword}.compact!
    end

    results.paginate(options)
  end

  def self.tag_list
    self.keyword_counts.sort{|k,y| k.name <=> y.name }
  end

  def translated_languages
    self.globalize_translations.map{|translation|translation.locale.to_s unless translation.title.nil? }.compact!
  end

  def not_translated_languages
    translated = self.translated_languages
    not_translated = SiteSetting.language_codes - translated
    return not_translated
  end

  def intro_with_form(language="fr")
    intro = intro_locale(language)
    intro.gsub!("</textarea>", ERB::Util.h("</textarea>")) unless intro.nil?
    intro
  end

  def content_with_form(language="fr")
    content = content_locale(language)
    content.gsub!("</textarea>", ERB::Util.h("</textarea>")) unless content.nil?
    content
  end

  def self.find_published_tagged_with(tags, options = {})
    conditions = []
    conditions << options[:conditions] if options[:conditions]
    conditions << "published_at IS NOT NULL"

    new_options = { :conditions => conditions.join(" AND "), :order => "published_at desc" }
    new_options.update(options)

    self.find_tagged_with(tags, new_options)
  end

  def self.find_published_in_category(category_permalink)
    results = find :all do
      all do
        state == "published"
        category.permalink == category_permalink
      end
    end
  end

  def self.find_all_published
    results = find :all do
      all do
        state == "published"
      end
    end
  end

  def self.find_published(object)
    results = find :first do
      all do
        id == object
        state == "published"
      end
    end
  end

  def published
    results = self.find :all do
      all do
        state == "published"
      end
    end
  end

  protected

  def set_published_at
    self.published_at = Time.now
    self.save
  end

  def set_archived_at
    self.archived_at = Time.now
    self.save
  end

  def unset_all
    self.published_at = nil
    self.archived_at = nil
    self.save
  end

  def set_permalink
    if self.permalink.blank? || self.title_changed?
      p = self.title.to_url

      articles = ArticleTranslation.find :all do
        permalink =~ "#{p}%"
      end

      articles.reject!{|a| a.id == self.id }
      article_num = articles.map{|a| a.permalink.last.to_i }

      max_num = article_num.sort.last
      max_num = 1 if max_num == 0

      if articles.nil? || articles.size == 0
        self.permalink = p
      else
        self.permalink = p + (max_num + 1).to_s
      end
    end
  end

end


text:
class Database
{
friend std::ostream & operator << (std::ostream & os, const Database & db);

public:
    bool isFull() const { return (num_record_==MAX_RECORD_); }
    size_t size() const { return num_record_; }
    void Show() const { std::cout << (*this); }
    bool Insert(const Student & s);
    bool Import(std::string filename);
    const Database Select(std::string name) const;
    void Export(std::string filename) const;
    Database & operator << (const Student & s);
private:
    static constexpr std::size_t MAX_RECORD_=100;
    Student record_[MAX_RECORD_];
    std::size_t num_record_=0;
    void Reset_() { num_record_=0; }
};

std::ostream & operator << (std::ostream & os, const Database & db);

#endif // DATABASE__


text:
/* === OVERALL Style === */
html, body {
    background: black;
    color: #ddd;
}

a {
    color: DarkRed;
}

a:hover{
    color: Red;
}

/* === HEADER === */
header {
    background: #111;
}

/* === NAVIGATION === */
nav ul li a {
    font-weight: bold;
    font-size: 13px;
}

nav ul li a:hover {
    background: #222;
}

/* === GENERIC === */
.button {
    border: 1px solid DarkRed;
    color: DarkRed;
    background: transparent;
    font-weight: bold;
}

.button:hover {
    border-color: Red;
    color: Red;
}

/* === MAIN CONTENT === */
.game-title {
    text-align: center;
    text-transform: uppercase;
    font-weight: normal;
    letter-spacing: 3px;
    color: OrangeRed;
    font-size: 50px;
}

.map-bg {
    background: url(../images/worldmap.jpg) no-repeat;
    background-size:100%;
    width: 80%;
    height: 100%;
    display: inline-block;
    float: left;
}

.character-screen {
    width: 20%;
    height: 100%;
    background: #333;
    display: inline-block;
    float: right;
}

.env-bg {

}

.env-bg-lvl1 {
    background: url(../images/environment/env-swamp.jpg);
}
.env-bg-lvl2 {
    background: url(../images/environment/env-rain_forest.jpg)
}
.env-bg-lvl3 {
    background: url(../images/environment/env-dark_forest.jpg);
}
.env-bg-lvl4 {
    background: url(../images/environment/env-valley_of_death.jpg);
}
.env-bg-lvl5 {
    background: url(../images/environment/env-volcano.jpg);
}

/* === COMPONENT Themes === */

/* === Modal Colors and Style=== */
.modalDialog > .dialogue-window {
    background: rgba(50, 50, 50, .8);
    color: #ccc;
}

.modalDialog > .dialogue-window p {
    color: DarkOrange;
}


text:
[![saiku-view](http://www.meteorite.bi/images/chart1.jpg)](http://www2.meteorite.bi/saiku-demo/)

A user interface for the analytical tool Saiku.

For more information, see [Saiku](http://www.meteorite.bi).

> You can put the UI on a separate server (apache httpd or simply a webapp in tomcat/webapps e.g).

## Table of Contents
  1. [Setup](#setup)
  	- [Build Instructions](#build-instructions)
  	- [Run UI on Node.js proxy](#run-ui-on-nodejs-proxy)
  	- [LiveReload Browser](#livereload-browser)
  3. [Wiki](#wiki)
  4. [Community](#community)
  5. [Bugs and Feature Requests](#bugs-and-feature-requests)
  6. [Discussion List](#discussion-list)
  7. [Browser Support](#browser-support)
  8. [Team](#team)
  9. [Contributing](#contributing)
  10. [History](#history)
  11. [License](#license)

## Setup

### Build Instructions

* Build using Maven

	- USAGE: mvn TASK1, TASK2, ...

	- Main Tasks:

		+ clean: deletes all the build dirs
		+ package: creates a .zip and .war (for dropping the UI in a java webapp environment) file in target/ that contains the Saiku UI
		+ install: installs the .war file in local Maven repo (eg. ~/.m2)

### Run UI on Node.js proxy

In order to run it locally you'll need a basic server setup.

1. Install [NodeJS](http://nodejs.org/download/), if you don't have it yet.
2. Install local dependencies:

	```sh
	npm install
	```
3. You can simply test and run the UI on a NodeJS proxy server called [server.js](https://github.com/OSBI/saiku-ui/blob/master/server.js), that will utilize a remote backend as source.

	Just run the following command in your command line and then access the UI in
	the browser (by default, it will run at [http://localhost:8080](http://localhost:8080) and proxy requests to try.meteorite.bi:80):

		node server.js [port] [backend_host] [backend_port]
or
	```sh
	npm start
	```

### LiveReload Browser

Install [GruntJS](http://gruntjs.com/):

```sh
npm install -g grunt-cli
```

Automatically reload your browser when files are modified. Enter command:

```sh
grunt watch
```
## Wiki

* [Saiku Wiki](http://wiki.meteorite.bi/display/SAIK/Saiku)

## Community

* [Saiku Community](http://community.meteorite.bi/)

## Bugs and Feature Requests

* [Saiku Jira](http://jira.meteorite.bi/)

## Discussion List

* [Saiku Analytics on Slack](http://chat.meteorite.bi/)
* [Saiku Dev Group](https://groups.google.com/a/saiku.meteorite.bi/forum/#!forum/dev)
* [Saiku User Group](https://groups.google.com/a/saiku.meteorite.bi/forum/#!forum/user)
* [Saiku Forums](http://forums.meteorite.bi/)
* [Stack Overflow](http://stackoverflow.com/questions/tagged/saiku)
* [Freenode IRC - Channel: #saiku](http://webchat.freenode.net/?channels=##saiku)

## Browser Support

We do care about it.

![IE](https://raw.github.com/alrra/browser-logos/master/internet-explorer/internet-explorer_48x48.png) | ![Chrome](https://raw.github.com/alrra/browser-logos/master/chrome/chrome_48x48.png) | ![Firefox](https://raw.github.com/alrra/browser-logos/master/firefox/firefox_48x48.png) | ![Opera](https://raw.github.com/alrra/browser-logos/master/opera/opera_48x48.png) | ![Safari](https://raw.github.com/alrra/browser-logos/master/safari/safari_48x48.png)
--- | --- | --- | --- | --- |
IE 9+ ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ |

## Team

[Saiku UI](http://www.meteorite.bi) is maintained by these people and a bunch of awesome [contributors](https://github.com/OSBI/saiku-ui/graphs/contributors).

[![Tom Barber](https://avatars0.githubusercontent.com/u/103544?v=2&s=70)](https://github.com/buggtb) | [![Paul Stoellberger](https://avatars3.githubusercontent.com/u/454645?v=2&s=70)](https://github.com/pstoellberger) | [![Mark Cahill](https://avatars3.githubusercontent.com/u/200365?v=2&s=70)](https://github.com/thinkjson) | [![Breno Polanski](https://avatars1.githubusercontent.com/u/1894191?v=2&s=70)](https://github.com/brenopolanski) | [![Luis Garcia](https://avatars2.githubusercontent.com/u/2557898?v=2&s=70)](https://github.com/PeterFalken)
--- | --- | --- | --- | --- | --- | --- |
[Tom Barber](https://github.com/buggtb) | [Paul Stoellberger](https://github.com/pstoellberger) | [Mark Cahill](https://github.com/thinkjson) | [Breno Polanski](https://github.com/brenopolanski) | [Luis Garcia](https://github.com/PeterFalken) |

## Contributing

Check [CONTRIBUTING.md](https://github.com/OSBI/saiku-ui/blob/master/CONTRIBUTING.md#contributing) for more details. Some important information:

* To get started, [sign the Contributor License Agreement](https://www.clahub.com/agreements/OSBI/saiku-ui).

* If you find a bug then please report it on [Jira](http://jira.meteorite.bi/secure/Dashboard.jspa) or our [Support Forum](http://forums.meteorite.bi/).

* If you have a feature request, then please get in touch. We'd love to hear from you! Either post to our [forum](http://forums.meteorite.bi/t/saiku-3-and-beyond/9) or email: [info@meteorite.bi](mailto:info@meteorite.bi)

## History

For detailed changelog, check [Releases](https://github.com/OSBI/saiku-ui/releases).

## License

Saiku and the Saiku UI are free software. The UI, contained in this repository,
is available under the terms of the Apache License Version 2. A copy is attached for your convenience.

**[⬆ back to top](#table-of-contents)**


text:
from google.cloud import tasks_v2

def sample_create_task():
    # Create a client
    client = tasks_v2.CloudTasksClient()

    # Initialize request argument(s)
    request = tasks_v2.CreateTaskRequest(
        parent="parent_value",
    )

    # Make the request
    response = client.create_task(request=request)

    # Handle the response
    print(response)

# [END cloudtasks_v2_generated_CloudTasks_CreateTask_sync]


text:
package org.kuali.kra.authorizer;

import org.kuali.kra.infrastructure.KraServiceLocator;
import org.kuali.kra.infrastructure.PermissionConstants;
import org.kuali.kra.service.KcPersonService;
import org.kuali.kra.service.UnitAuthorizationService;
import org.kuali.rice.kim.api.identity.Person;
import org.kuali.rice.kns.document.MaintenanceDocumentBase;
import org.kuali.rice.kns.document.authorization.MaintenanceDocumentAuthorizerBase;
import org.kuali.rice.krad.document.Document;
import org.kuali.rice.krad.exception.AuthorizationException;
import org.kuali.rice.krad.util.GlobalVariables;
import org.kuali.rice.krad.util.KRADConstants;

import java.util.HashSet;
import java.util.Set;

public class UnitMaintenanceDocumentAuthorizer extends MaintenanceDocumentAuthorizerBase {

    private static final String UNIT = "Unit";

    private KcPersonService kcPersonService;
    private UnitAuthorizationService unitAuthorizationService;

    @Override
    public Set<String> getDocumentActions(Document document, Person user, Set<String> documentActions) {
        Set<String> actions = getDocumentActions(document);
        actions = super.getDocumentActions(document, user, actions);
        return actions;
    }

    protected Set<String> getDocumentActions(Document document) {
        Set<String> documentActions = new HashSet<String>();

        String personId = getKcPersonService().getKcPersonByPersonId(GlobalVariables.getUserSession().getPerson().getPrincipalId()).getPersonId();
        boolean hasModifyPermission = getUnitAuthorizationService().hasPermission(personId, "KC-UNT", PermissionConstants.MODIFY_UNIT);
        boolean hasAddPermission = getUnitAuthorizationService().hasPermission(personId, "KC-UNT", PermissionConstants.ADD_UNIT);

        if (hasModifyPermission) {
            documentActions = getDocumentActionsWithModifyPermission(document);
        } else if (hasAddPermission) {
            documentActions = getDocumentActionsWithAddPermission(document);
        } else {
            documentActions = getDocumentActionsWithViewPermission(document);
        }
        return documentActions;
    }

    private Set<String> getDocumentActionsWithModifyPermission(Document document) {
        Set<String> documentActions = new HashSet<String>();
        if (document.getDocumentHeader().getWorkflowDocument().isInitiated() || document.getDocumentHeader().getWorkflowDocument().isSaved()) {
            documentActions.add(KRADConstants.KUALI_ACTION_CAN_EDIT);
            documentActions.add(KRADConstants.KUALI_ACTION_CAN_EDIT_DOCUMENT_OVERVIEW);
            documentActions.add(KRADConstants.KUALI_ACTION_CAN_SAVE);
            documentActions.add(KRADConstants.KUALI_ACTION_CAN_CLOSE);
            documentActions.add(KRADConstants.KUALI_ACTION_CAN_CANCEL);
            documentActions.add(KRADConstants.KUALI_ACTION_CAN_BLANKET_APPROVE);
            documentActions.add(KRADConstants.KUALI_ACTION_CAN_ROUTE);
        } else {
            documentActions.add(KRADConstants.KUALI_ACTION_CAN_RELOAD);
            documentActions.add(KRADConstants.KUALI_ACTION_CAN_CLOSE);
        }
        return documentActions;
    }

    private Set<String> getDocumentActionsWithAddPermission(Document document) {
        Set<String> documentActions = new HashSet<String>();
        String maintenanceAction = ((MaintenanceDocumentBase) document).getNewMaintainableObject().getMaintenanceAction();
        if (document.getDocumentHeader().getWorkflowDocument().isInitiated()) {
            if (maintenanceAction.equals(KRADConstants.MAINTENANCE_COPY_ACTION)) {
                throw new AuthorizationException(GlobalVariables.getUserSession().getPerson().getPrincipalName(), "Copy", UNIT);
            } else {
                documentActions.add(KRADConstants.KUALI_ACTION_CAN_EDIT);
                documentActions.add(KRADConstants.KUALI_ACTION_CAN_EDIT_DOCUMENT_OVERVIEW);
                documentActions.add(KRADConstants.KUALI_ACTION_CAN_SAVE);
                documentActions.add(KRADConstants.KUALI_ACTION_CAN_CLOSE);
                documentActions.add(KRADConstants.KUALI_ACTION_CAN_CANCEL);
                documentActions.add(KRADConstants.KUALI_ACTION_CAN_BLANKET_APPROVE);
                documentActions.add(KRADConstants.KUALI_ACTION_CAN_ROUTE);
            }
        } else {
            documentActions.add(KRADConstants.KUALI_ACTION_CAN_RELOAD);
            documentActions.add(KRADConstants.KUALI_ACTION_CAN_CLOSE);
        }
        return documentActions;
    }

    private Set<String> getDocumentActionsWithViewPermission(Document document) {
        Set<String> documentActions = new HashSet<String>();
        String maintenanceAction = ((MaintenanceDocumentBase) document).getNewMaintainableObject().getMaintenanceAction();
        if (document.getDocumentHeader().getWorkflowDocument().isInitiated()) {
            if (maintenanceAction.equals(KRADConstants.MAINTENANCE_COPY_ACTION)) {
                throw new AuthorizationException(GlobalVariables.getUserSession().getPerson().getPrincipalName(), "Copy", UNIT);
            } else if (maintenanceAction.equals(KRADConstants.MAINTENANCE_NEW_ACTION)) {
                throw new AuthorizationException(GlobalVariables.getUserSession().getPerson().getPrincipalName(), "Create", UNIT);
            } else {
                documentActions.add(KRADConstants.KUALI_ACTION_CAN_RELOAD);
                documentActions.add(KRADConstants.KUALI_ACTION_CAN_CLOSE);
            }
        } else {
            documentActions.add(KRADConstants.KUALI_ACTION_CAN_RELOAD);
            documentActions.add(KRADConstants.KUALI_ACTION_CAN_CLOSE);
        }
        return documentActions;
    }

    public KcPersonService getKcPersonService() {
        if (kcPersonService == null) {
            kcPersonService = KraServiceLocator.getService(KcPersonService.class);
        }
        return kcPersonService;
    }

    public void setKcPersonService(KcPersonService kcPersonService) {
        this.kcPersonService = kcPersonService;
    }

    public UnitAuthorizationService getUnitAuthorizationService() {
        if (unitAuthorizationService == null) {
            unitAuthorizationService = KraServiceLocator.getService(UnitAuthorizationService.class);
        }
        return unitAuthorizationService;
    }

    public void setUnitAuthorizationService(UnitAuthorizationService unitAuthorizationService) {
        this.unitAuthorizationService = unitAuthorizationService;
    }

}


text:
This documentation covers basic-topics to install and use this bundle.

## List of content

* [Installation](installation.md)
* [Routing](routing.md)
* [Overview-Page](overview-page.md)
* [Content-Types](content-types.md)
* [ArticleViewDocument](article-view-document.md)
* [Twig-Extensions](twig-extensions.md)
* [Commands](commands.md)
* [Author](author.md)
* [Article Types](article-types.md)
* [Multi Webspaces](multi-webspaces.md)
* [XLIFF Export / Import](xliff.md)


text:
@class OffCampusHousingPickerViewController;

@protocol OffCampusHousingPickerViewDelegate <NSObject>

-(void)popUpDismissedWithCriteria:(OffCampusHousingListingsCriteria *)criteria;

@end

typedef enum {
    PickerTypeDeposit = 0,
	PickerTypeFallWinter = 1,
	PickerTypeSpringSummer = 2,
} PickerType;

@interface OffCampusHousingPickerViewController : ByuViewController

@property (nonatomic) OffCampusHousingListingsCriteria *criteria;
@property (nonatomic) PickerType pickerType;
@property (nonatomic, weak) id<OffCampusHousingPickerViewDelegate> delegate;

@end


text:
package co.com.codesoftware.server.productos;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;

/**
 *
Clase Java para perfilEntity complex type.
 *
 *
El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase.
 *
 *

 * <complexType name="perfilEntity">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="descripcion" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="estado" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="id" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
 *         <element name="nombre" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="permisos" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "perfilEntity", propOrder = {
    "descripcion",
    "estado",
    "id",
    "nombre",
    "permisos"
})
public class PerfilEntity {

    protected String descripcion;
    protected String estado;
    protected Integer id;
    protected String nombre;
    protected String permisos;

    /**
     * Obtiene el valor de la propiedad descripcion.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getDescripcion() {
        return descripcion;
    }

    /**
     * Define el valor de la propiedad descripcion.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setDescripcion(String value) {
        this.descripcion = value;
    }

    /**
     * Obtiene el valor de la propiedad estado.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getEstado() {
        return estado;
    }

    /**
     * Define el valor de la propiedad estado.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setEstado(String value) {
        this.estado = value;
    }

    /**
     * Obtiene el valor de la propiedad id.
     *
     * @return
     *     possible object is
     *     {@link Integer }
     *
     */
    public Integer getId() {
        return id;
    }

    /**
     * Define el valor de la propiedad id.
     *
     * @param value
     *     allowed object is
     *     {@link Integer }
     *
     */
    public void setId(Integer value) {
        this.id = value;
    }

    /**
     * Obtiene el valor de la propiedad nombre.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getNombre() {
        return nombre;
    }

    /**
     * Define el valor de la propiedad nombre.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setNombre(String value) {
        this.nombre = value;
    }

    /**
     * Obtiene el valor de la propiedad permisos.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getPermisos() {
        return permisos;
    }

    /**
     * Define el valor de la propiedad permisos.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setPermisos(String value) {
        this.permisos = value;
    }

}


text:
package com.google.appruntime.logging;

import java.util.Map;
import java.util.concurrent.Callable;
import java.util.function.BiConsumer;
import java.util.stream.Stream;

/**
 * The context for logging information associated with the current Thread.
 *

 *
This is an implementation of a Mapped Diagnostic Context for use with the java.util.logging
 * framework.
 */
public class LogContext {

    private static final ThreadLocal<LogContext> threadContext = new ThreadLocal<>();

    private final Map<String, Object> values;

    public LogContext(Map<String, Object> values) {
        this.values = values;
    }

    /**
     * Returns the log context associated with the current Thread.
     */
    public static LogContext current() {
        return threadContext.get();
    }

    /**
     * Execute a Runnable in this context. This context will be bound to the current Thread as the
     * Runnable is executing. It will automatically be unbound after execution.
     *
     * @param runnable the Runnable to be executed
     */
    public void execute(Runnable runnable) {
        LogContext parent = current();
        try {
            threadContext.set(this);
            runnable.run();
        } finally {
            if (parent == null) {
                threadContext.remove();
            } else {
                threadContext.set(parent);
            }
        }
    }

    /**
     * Execute a Callable in this context. This context will be bound to the current Thread as the
     * Runnable is executing. It will automatically be unbound after execution.
     *
     * @param callable the Callable to be executed
     */
    public <T> T execute(Callable<T> callable) throws Exception {
        LogContext parent = current();
        try {
            threadContext.set(this);
            return callable.call();
        } finally {
            if (parent == null) {
                threadContext.remove();
            } else {
                threadContext.set(parent);
            }
        }
    }

    /**
     * Returns the value of a context property.
     *
     * @param name the name of the property
     * @param type the type of value expected
     * @param <T>  the type of value expected
     * @return the property's value
     */
    public <T> T get(String name, Class<T> type) {
        return type.cast(values.get(name));
    }

    /**
     * Stream all property values defined in this context.
     */
    public Stream<Map.Entry<String, Object>> stream() {
        return values.entrySet().stream();
    }

    /**
     * Perform an action for each property in this context.
     */
    public void forEach(BiConsumer<String, Object> consumer) {
        stream().forEach(entry -> consumer.accept(entry.getKey(), entry.getValue()));
    }
}


text:
/** @file
 * implementation of object basket
 * @defgroup basket basket functions
 * @{
 */

#include <iom/iom_p.h>

/** gets an iterator to walk threw all objects of a basket.
 * The list includes embedded link(-objects), but no structures.
 */
extern "C" IOM_ITERATOR iom_iteratorobject(IOM_BASKET basket)
{
	return (dbgnew iom_iterator(basket))->getRef();
}

/** gets the next object.
 * Returns 0 if no more objects.
 */
extern "C" IOM_OBJECT iom_nextobject(IOM_ITERATOR iterator)
{
	IomObject ret=iterator->next_object();
	return ret.isNull() ? 0 : ret->getRef();
}

/** create a new object.
 */
extern "C" IOM_OBJECT iom_newobject(IOM_BASKET basket,IOM_TAG type,IOM_OID oid)
{
	IomObject ret=new iom_object();
	ret->setOid(X(oid));
	ret->setTag(ParserHandler::getTagId(type));
	basket->addObject(ret);
	return ret->getRef();
}

/**
 * release handle
 */
extern "C" int iom_releasebasket(IOM_BASKET basket)
{
	if(!basket->freeRef()){
		delete basket;
	}
	return 0;
}

// Basket löschen (Basket aus Datei entfernen)
extern "C" int iom_deletebasket(IOM_BASKET basket);

/** gets OID of a basket.
 *  return value is valid until iom_setbasketoid() or iom_close()
 */
extern "C" IOM_OID iom_getbasketoid(IOM_BASKET basket)
{
	return basket->getOid_c();
}

/** sets OID of a basket.
 */
extern "C" void iom_setbasketoid(IOM_BASKET basket,IOM_OID oid){
	basket->setOid(X(oid));
}

/** gets the consistency of a basket.
 */
extern "C" int iom_getbasketconsistency(IOM_BASKET basket)
{
	return basket->getConsistency();
}

/** sets the consistency of a basket.
 */
extern "C" void iom_setbasketconsistency(IOM_BASKET basket,int consistency)
{
	basket->setConsistency(consistency);
}

/** gets xml element name of a basket.
 *  return value is valid until iom_close() or iom_setbaskettag().
 */
extern "C" IOM_TAG iom_getbaskettag(IOM_BASKET basket)
{
	return basket->getTag_c();
}

/** sets xml element name of a basket.
 */
extern "C" void iom_setbaskettag(IOM_BASKET basket,IOM_TAG topic)
{
	basket->setTag(ParserHandler::getTagId(topic));
}

/** get xmlfile line number of a basket.
 */
extern "C" int iom_getbasketline(IOM_BASKET basket)
{
	return basket->getXMLLineNumber();
}

/** get xmlfile column number of a basket.
 */
extern "C" int iom_getbasketcol(IOM_BASKET basket)
{
	return basket->getXMLColumnNumber();
}

/** gets object with a given OID or 0.
 */
extern "C" IOM_OBJECT iom_getobject(IOM_BASKET basket,IOM_OID oid)
{
	IomObject ret=basket->getObject(X(oid));
	return ret.isNull() ? 0 : ret->getRef();
}

// Objekt in einen anderen Basket verschieben
extern "C" int iom_relocateobject(IOM_BASKET basket,IOM_OBJECT object);

// seit dem letzten Lesen/Schreiben geänderte Objekte
extern "C" IOM_ITERATOR iom_iteratorchgobject(IOM_BASKET basket);
extern "C" IOM_OBJECT iom_nextchgobject(IOM_ITERATOR iterator);

// seit dem letzten Lesen/Schreiben gelöschte Objekte
extern "C" IOM_ITERATOR iom_iteratordelobject(IOM_BASKET basket);
extern "C" IOM_OBJECT iom_nextdelobject(IOM_ITERATOR iterator);

/** @}
 */

iom_basket::iom_basket() :
	file()
	,tag(0)
	,tag_c(0)
	,xmlLine(0)
	,xmlCol(0)
	,consistency(IOM_COMPLETE)
	,kind(IOM_FULL)
	,oid_w(0)
	,oid_c(0)
	,startstate_w(0)
	,startstate_c(0)
	,endstate_w(0)
	,endstate_c(0)
	,topics_w(0)
	,topics_c(0)
	,useCount(0)
{
}

iom_basket::~iom_basket()
{
	if(tag_c)XMLString::release(&tag_c);
	if(oid_c)XMLString::release(&oid_c);
	if(oid_w)XMLString::release(&oid_w);
	if(startstate_c)XMLString::release(&startstate_c);
	if(startstate_w)XMLString::release(&startstate_w);
	if(endstate_c)XMLString::release(&endstate_c);
	if(endstate_w)XMLString::release(&endstate_w);
	if(topics_c)XMLString::release(&topics_c);
	if(topics_w)XMLString::release(&topics_w);
}

void iom_basket::setTag(int tag1)
{
	if(tag_c)tag_c=0;
	tag=tag1;
}
int iom_basket::getTag()
{
	return tag;
}
const char *iom_basket::getTag_c()
{
	if(!tag){
		return 0;
	}
	if(!tag_c){
		const XMLCh *const tag_w=ParserHandler::getTagName(tag);
		tag_c=XMLString::transcode(tag_w);
	}
	return tag_c;
}

void iom_basket::setXMLLineNumber(int line)
{
	xmlLine=line;
}
int iom_basket::getXMLLineNumber()
{
	return xmlLine;
}

void iom_basket::setXMLColumnNumber(int col)
{
	xmlCol=col;
}

int iom_basket::getXMLColumnNumber()
{
	return xmlCol;
}

void iom_basket::setConsistency(int cons)
{
	consistency=cons;
}

int iom_basket::getConsistency()
{
	return consistency;
}

void iom_basket::setKind(int kind1)
{
	kind=kind1;
}

int iom_basket::getKind()
{
	return kind;
}

void iom_basket::setOid(const XMLCh *oid)
{
	if(oid_c)XMLString::release(&oid_c);
	if(oid_w)XMLString::release(&oid_w);
	oid_w=XMLString::replicate(oid);
}
const XMLCh *iom_basket::getOid()
{
	return oid_w;
}
const char *iom_basket::getOid_c()
{
	if(!oid_w){
		return 0;
	}
	if(!oid_c){
		oid_c=XMLString::transcode(oid_w);
	}
	return oid_c;
}

void iom_basket::setStartState(const XMLCh *startstate)
{
	if(startstate_c)XMLString::release(&startstate_c);
	if(startstate_w)XMLString::release(&startstate_w);
	startstate_w=XMLString::replicate(startstate);
}
const XMLCh *iom_basket::getStartState()
{
	return startstate_w;
}
const char *iom_basket::getStartState_c()
{
	if(!startstate_w){
		return 0;
	}
	if(!startstate_c){
		startstate_c=XMLString::transcode(startstate_w);
	}
	return startstate_c;
}

void iom_basket::setEndState(const XMLCh *endstate)
{
	if(endstate_c)XMLString::release(&endstate_c);
	if(endstate_w)XMLString::release(&endstate_w);
	endstate_w=XMLString::replicate(endstate);
}
const XMLCh *iom_basket::getEndState()
{
	return endstate_w;
}
const char *iom_basket::getEndState_c()
{
	if(!endstate_w){
		return 0;
	}
	if(!endstate_c){
		endstate_c=XMLString::transcode(endstate_w);
	}
	return endstate_c;
}

void iom_basket::setTopics(const XMLCh *topics)
{
	if(topics_c)XMLString::release(&topics_c);
	if(topics_w)XMLString::release(&topics_w);
	topics_w=XMLString::replicate(topics);
}
const XMLCh *iom_basket::getTopics()
{
	return topics_w;
}
const char *iom_basket::getTopics_c()
{
	if(!topics_w){
		return 0;
	}
	if(!topics_c){
		topics_c=XMLString::transcode(topics_w);
	}
	return topics_c;
}

void iom_basket::addObject(IomObject object)
{
	objectv.push_back(object);
	object->setBasket(this);
}

IomObject iom_basket::getObject(const XMLCh *oid)
{
	std::vector<IomObject>::iterator it;
	for(it=objectv.begin();it!=objectv.end();it++){
		IomObject obj=*it;
		if(!XMLString::compareString(oid,obj->getOid())){
			return obj;
		}
	}
	return IomObject();
}

IomBasket::IomBasket(struct iom_basket *pointee1)
: pointee(pointee1 ? pointee1->getRef() : 0){
}
IomBasket::IomBasket(const IomBasket& src)
: pointee(src.pointee ? src.pointee->getRef() : 0){
}
IomBasket& IomBasket::operator=(const IomBasket& src){
	if(this!=&src){
		if(pointee && !pointee->freeRef()){
			delete pointee;
		}
		pointee=src.pointee ? src.pointee->getRef() :0;
	}
	return *this;
}
IomBasket::~IomBasket(){
	if(pointee && !pointee->freeRef()){
		delete pointee;
	}
}


text:
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.

define('CLI_SCRIPT', true);
define('ABORT_AFTER_CONFIG', true); // We need just the values from config.php.
define('CACHE_DISABLE_ALL', true); // This prevents reading of existing caches.
define('IGNORE_COMPONENT_CACHE', true);

require(__DIR__.'/../../config.php');
require_once($CFG->libdir.'/clilib.php');

// Now get cli options.
list($options, $unrecognized) = cli_get_params(
    array(
        'file'    => false,
        'rebuild' => false,
        'print'   => false,
        'help'    => false
    ),
    array(
        'h' => 'help'
    )
);

if ($unrecognized) {
    $unrecognized = implode("\n  ", $unrecognized);
    cli_error(get_string('cliunknowoption', 'admin', $unrecognized), 2);
}

if (!$options['rebuild'] and !$options['file'] and !$options['print']) {
    $help =
"Create alternative component cache file

Options:
-h, --help            Print out this help
--rebuild             Rebuild \$CFG->alternative_component_cache file
--file=filepath       Save component cache to file
--print               Print component cache file content

Example:
\$ php admin/cli/rebuild_alternative_component_cache.php --rebuild
";

    echo $help;
    exit(0);
}

error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', 1);

$content = core_component::get_cache_content();

if ($options['print']) {
    echo $content;
    exit(0);
}

if ($options['rebuild']) {
    if (empty($CFG->alternative_component_cache)) {
        fwrite(STDERR, 'config.php does not contain $CFG->alternative_component_cache setting');
        fwrite(STDERR, "\n");
        exit(2);
    }
    $target = $CFG->alternative_component_cache;
} else {
    $target = $options['file'];
}

if (!$target) {
    fwrite(STDERR, "Invalid target file $target");
    fwrite(STDERR, "\n");
    exit(1);
}

$bytes = file_put_contents($target, $content);

if (!$bytes) {
    fwrite(STDERR, "Error writing to $target");
    fwrite(STDERR, "\n");
    exit(1);
}

// Success.
echo "File $target was updated\n";
exit(0);


text:
@interface HYViewController ()<HYRequestDelegate,HYBatchRequestsDelegate>
{
    HYDelegateRequest *_request;
}

@end

@implementation HYViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];

    _request = [[HYDelegateRequest alloc] init];
    _request.delegate = self;
    [_request start];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
}

- (void)batchAPIRequestsDidFinished:(HYBatchRequests *)batchApis
{

}

- (void)requestDidFinished:(HYBaseRequest *)request
              withResponse:(HYNetworkResponse *)response
{

}

- (void)request:(HYBaseRequest *)request
withErrorResponse:(HYNetworkResponse *)response
{

}

@end