Commit d63f0dc5 authored by MIJIEUX Thomas's avatar MIJIEUX Thomas

Update configuration for emacs indentation and syntax check/auto-completion

parent 481a7701
((nil . ((indent-tabs-mode . nil)
(tab-width . 8)
(show-trailing-whitespace . t)))
(c++-mode . ((c-tab-always-indent . t)
(c-basic-offset . 4)
(c-comment-only-line-offset . 0)
(c-hanging-braces-alist . ((substatement-open after)
(brace-list-open after)
(brace-entry-open)
(defun-open after)
(class-open after)
(inline-open after)
(block-open after)
(block-close . c-snug-do-while)
(statement-case-open after)
(substatement after)))
(c-hanging-colons-alist . ((member-init-intro before)
(inher-intro)
(case-label after)
(label after)
(access-label after)))
(c-hanging-semi&comma-criteria . (c-semi&comma-no-newlines-before-nonblanks))
(c-cleanup-list . (scope-operator
brace-else-brace
brace-elseif-brace
brace-catch-brace
empty-defun-braces
list-close-comma
defun-close-semi))
(c-offsets-alist . ((inexpr-class . +)
(inexpr-statement . +)
(lambda-intro-cont . +)
(inlambda . c-lineup-inexpr-block)
(template-args-cont c-lineup-template-args +)
(incomposition . +)
(inmodule . +)
(innamespace . +)
(inextern-lang . +)
(composition-close . 0)
(module-close . 0)
(namespace-close . 0)
(extern-lang-close . 0)
(composition-open . 0)
(module-open . 0)
(namespace-open . 0)
(extern-lang-open . 0)
(objc-method-call-cont c-lineup-ObjC-method-call-colons c-lineup-ObjC-method-call +)
(objc-method-args-cont . c-lineup-ObjC-method-args)
(objc-method-intro .
[0])
(friend . 0)
(cpp-define-intro c-lineup-cpp-define +)
(cpp-macro-cont . +)
(cpp-macro .
[0])
(inclass . +)
(stream-op . c-lineup-streamop)
(arglist-cont-nonempty c-lineup-gcc-asm-reg c-lineup-arglist)
(arglist-cont c-lineup-gcc-asm-reg 0)
(arglist-intro . +)
(catch-clause . 0)
(else-clause . 0)
(do-while-closure . 0)
(label . 2)
(access-label . -)
(substatement-label . 2)
(substatement . +)
(statement-case-open . 0)
(statement-case-intro . +)
(statement-block-intro . +)
(statement-cont . +)
(statement . 0)
(brace-entry-open . 0)
(brace-list-entry . 0)
(brace-list-intro . +)
(brace-list-close . 0)
(brace-list-open . 0)
(block-close . 0)
(inher-cont . c-lineup-multi-inher)
(inher-intro . +)
(member-init-cont . c-lineup-multi-inher)
(member-init-intro . +)
(annotation-var-cont . +)
(annotation-top-cont . 0)
(topmost-intro-cont . c-lineup-topmost-intro-cont)
(topmost-intro . 0)
(knr-argdecl . 0)
(func-decl-cont . +)
(inline-close . 0)
(inline-open . +)
(class-close . 0)
(class-open . 0)
(defun-block-intro . +)
(defun-close . 0)
(defun-open . 0)
(string . c-lineup-dont-change)
(arglist-close . c-lineup-arglist)
(substatement-open . 0)
(case-label . 0)
(block-open . 0)
(c . 1)
(comment-intro . 0)
(knr-argdecl-intro . -)))
(fill-column . 80)
(flycheck-clang-language-standard . c++11))))
......@@ -2,3 +2,7 @@ build/
data/
*.tar.gz
*.o
GPATH
GRTAGS
GTAGS
.clang_complete
......@@ -78,6 +78,11 @@ endif(LAPACKE_FOUND)
option(FABULOUS_DEBUG_MODE "Set to On to compile with debug info" OFF)
option(FABULOUS_BUILD_SHARED_LIBS "Build shared libraries" OFF)
option(FABULOUS_BUILD_DOC "Set to ON to build the Doxygen documentation " OFF )
option(FABULOUS_LAPACKE_NANCHECK "Set to ON to use top level LAPACKE interface " OFF )
if (FABULOUS_LAPACKE_NANCHECK)
add_definitions( -DFABULOUS_LAPACKE_NANCHECK )
endif (FABULOUS_LAPACKE_NANCHECK)
if(FABULOUS_DEBUG_MODE)
set(
......
#!/usr/bin/env python
#-*- coding: utf-8 -*-
#
# https://github.com/Rip-Rip/clang_complete
#
# Copyright (c) 2010, 2011, 2012, 2013 Xavier Deguillard, Tobias Grosser
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * 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.
# * Neither the name of the copyright holders nor the names of their
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT HOLDERS AND 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.
import sys
CONFIG_NAME = ".clang_complete"
def readConfiguration():
try:
f = open(CONFIG_NAME, "r")
except IOError:
return []
result = []
for line in f.readlines():
strippedLine = line.strip()
if strippedLine:
result.append(strippedLine)
f.close()
return result
def writeConfiguration(lines):
f = open(CONFIG_NAME, "w")
f.writelines(lines)
f.close()
def parseArguments(arguments):
nextIsInclude = False
nextIsDefine = False
nextIsIncludeFile = False
nextIsIsystem = False
includes = []
defines = []
include_file = []
options = []
isystem = []
for arg in arguments:
if nextIsInclude:
includes += [arg]
nextIsInclude = False
elif nextIsDefine:
defines += [arg]
nextIsDefine = False
elif nextIsIncludeFile:
include_file += [arg]
nextIsIncludeFile = False
elif nextIsIsystem:
isystem += [arg]
nextIsIsystem = False
elif arg == "-I":
nextIsInclude = True
elif arg == "-D":
nextIsDefine = True
elif arg[:2] == "-I":
includes += [arg[2:]]
elif arg[:2] == "-D":
defines += [arg[2:]]
elif arg == "-include":
nextIsIncludeFile = True
elif arg == "-isystem":
nextIsIsystem = True
elif arg.startswith('-std='):
options.append(arg)
elif arg == '-ansi':
options.append(arg)
elif arg.startswith('-pedantic'):
options.append(arg)
elif arg.startswith('-W'):
options.append(arg)
result = list(map(lambda x: "-I" + x, includes))
result.extend(map(lambda x: "-D" + x, defines))
result.extend(map(lambda x: "-include " + x, include_file))
result.extend(map(lambda x: "-isystem" + x, isystem))
result.extend(options)
return result
def mergeLists(base, new):
result = list(base)
for newLine in new:
if newLine not in result:
result.append(newLine)
return result
configuration = readConfiguration()
args = parseArguments(sys.argv)
result = mergeLists(configuration, args)
writeConfiguration(map(lambda x: x + "\n", result))
import subprocess
proc = subprocess.Popen(sys.argv[1:])
ret = proc.wait()
if ret is None:
sys.exit(1)
sys.exit(ret)
# vim: set ts=2 sts=2 sw=2 expandtab :
......@@ -10,7 +10,7 @@ namespace fabulous {
/**
* \brief methods that apply on Blocks (QR factorization)
*/
struct Algorithm{
struct Algorithm {
public:
/**
......
......@@ -2,9 +2,11 @@
#define FABULOUS_ARNOLDI_ORTHO_RUHE_HPP
#ifndef FABULOUS_ORTHO_IMPL_INCLUDE
#error "Never include this header directly; include 'Arnoldi_Ortho.hpp' instead"
# error "Never include this header directly; include 'Arnoldi_Ortho.hpp' instead"
#endif
#include "Block.hpp"
#include "Base.hpp"
namespace fabulous {
......
......@@ -18,10 +18,8 @@ namespace fabulous {
/**
* \brief %Arnoldi iterations With incremental QR and Deflated Restarting
*
* Incremental QR (GEQRF, ORMQR) and TRSM kernels are used to solve
* Incremental QR: GEQRF, ORMQR and TRSM kernels are used to solve
* the LeastSquare problem on the projected matrix
*
* \warning This class does NOT support DeflatedRestarting (not implemented)
*/
template<class S> class Arnoldi_QRDR {
public:
......
......@@ -18,7 +18,7 @@ namespace fabulous {
/**
* \brief %Arnoldi iterations With incremental QR
*
* Incremental QR (GEQRF, ORMQR) and TRSM kernels are used to solve
* Incremental QR: GEQRF, ORMQR and TRSM kernels are used to solve
* the LeastSquare problem on the projected matrix
*
* \warning This class does NOT support DeflatedRestarting (not implemented)
......
......@@ -27,19 +27,13 @@ inline void dump_descriptor(const MORSE_desc_t *desc)
"use_mat: %d\n"
"alloc_mat: %d\n"
"register_mat: %d\n",
desc->mb,
desc->nb,
desc->mb, desc->nb,
desc->bsiz,
desc->lm,
desc->ln,
desc->lmt,
desc->lnt,
desc->i,
desc->j,
desc->m,
desc->n,
desc->mt,
desc->nt,
desc->lm, desc->ln,
desc->lmt, desc->lnt,
desc->i, desc->j,
desc->m, desc->n,
desc->mt, desc->nt,
desc->id,
desc->occurences,
desc->use_mat,
......
......@@ -31,10 +31,11 @@ inline std::vector<std::string> split(const std::string &line, char sep = ' ')
std::string token;
std::vector<std::string> res;
while (std::getline(ss, token, sep))
while (std::getline(ss, token, sep)) {
// empty token each time there is several separators following each other :
if (token != "")
res.emplace_back(token);
}
return res;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment