Commit 38a571f7 authored by Swann Perarnau's avatar Swann Perarnau
Browse files

Merge branch 'more-style-checks' into 'master'

Implement more style checks

See merge request !37
parents 082f7eac a854380c
Pipeline #6853 passed with stages
in 9 minutes and 17 seconds
# not a linux tree, a list of files
--no-tree
--file
# ignore SPDX
--ignore SPDX_LICENSE_TAG
# block comments are broken because of our license header
--ignore BLOCK_COMMENT_STYLE
# better output format for CI
--terse --no-summary
......@@ -2,6 +2,7 @@ variables:
ARGOPKGS : "https://xgitlab.cels.anl.gov/argo/argopkgs/-/archive/master/argopkgs-master.tar.gz"
stages:
- style
- build
make:generic:
......@@ -42,8 +43,13 @@ make:knl:
- knl
repoquality:
stage: build
stage: style
script:
- nix run -f "$ARGOPKGS" repoquality --command repoquality
tags:
- integration
checkpatch:
stage: style
script:
- nix run -f "$ARGOPKGS" checkpatch --command checkpatch.pl src/aml.c include/aml.h
src/*.c
src/*.h
tests/*.c
src/area/*.c
src/dma/*.c
src/scratch/*.c
src/tiling/*.c
src/utils/*.c
include/*.h
include/aml/area/*.h
include/aml/dma/*.h
include/aml/scratch/*.h
include/aml/tiling/*.h
include/aml/utils/*.h
tests/area/*.c
tests/dma/*.c
tests/scratch/*.c
tests/tiling/*.c
tests/utils/*.c
benchmarks/dgemm_mkl.c
benchmarks/dgemm_noprefetch.c
benchmarks/dgemm_prefetch.c
......
......@@ -58,8 +58,8 @@ int aml_finalize(void);
******************************************************************************/
/**
* An AML area is an implementation of memory operations for several type of devices
* through a consistent abstraction.
* An AML area is an implementation of memory operations for several type of
* devices through a consistent abstraction.
* This abstraction is meant to be implemented for several kind of devices,
* i.e the same function calls allocate different kinds of devices depending
* on the area implementation provided.
......@@ -87,7 +87,7 @@ struct aml_area_ops {
*
* Returns a pointer to allocated memory object.
**/
void* (*mmap)(const struct aml_area_data *area_data,
void* (*mmap)(const struct aml_area_data *area_data,
void *ptr,
size_t size);
......@@ -100,7 +100,7 @@ struct aml_area_ops {
*
* Returns AML_AREA_* error code.
**/
int (*munmap)(const struct aml_area_data *area_data,
int (*munmap)(const struct aml_area_data *area_data,
void *ptr,
size_t size);
};
......@@ -156,11 +156,11 @@ struct aml_tiling_ops {
struct aml_tiling_iterator *iterator, int flags);
int (*destroy_iterator)(struct aml_tiling_data *tiling,
struct aml_tiling_iterator *iterator);
int (*tileid)(const struct aml_tiling_data *tiling, va_list);
int (*tileid)(const struct aml_tiling_data *tiling, va_list coords);
size_t (*tilesize)(const struct aml_tiling_data *tiling, int tileid);
void* (*tilestart)(const struct aml_tiling_data *tiling,
const void *ptr, int tileid);
int (*ndims)(const struct aml_tiling_data *tiling, va_list);
int (*ndims)(const struct aml_tiling_data *tiling, va_list results);
};
struct aml_tiling {
......@@ -198,7 +198,7 @@ size_t aml_tiling_tilesize(const struct aml_tiling *tiling, int tileid);
* Returns the address of the start of the tile identified by "tileid", within
* the provided user data structure.
*/
void* aml_tiling_tilestart(const struct aml_tiling *tiling, const void *ptr,
void *aml_tiling_tilestart(const struct aml_tiling *tiling, const void *ptr,
int tileid);
/*
......@@ -512,7 +512,7 @@ int aml_scratch_cancel(struct aml_scratch *scratch,
* "scratch": an initialized scratchpad structure.
* Returns a base pointer to the scratchpad memory buffer.
*/
void* aml_scratch_baseptr(const struct aml_scratch *scratch);
void *aml_scratch_baseptr(const struct aml_scratch *scratch);
/*
* Release a scratch tile for immediate reuse.
......
/*******************************************************************************
* Copyright 2019 UChicago Argonne, LLC.
* (c.f. AUTHORS, LICENSE)
*
* This file is part of the AML project.
* For more info, see https://xgitlab.cels.anl.gov/argo/aml
*
* SPDX-License-Identifier: BSD-3-Clause
*******************************************************************************/
#ifndef AML_BITMAP_H
#define AML_BITMAP_H
......
/*******************************************************************************
* Copyright 2019 UChicago Argonne, LLC.
* (c.f. AUTHORS, LICENSE)
*
* This file is part of the AML project.
* For more info, see https://xgitlab.cels.anl.gov/argo/aml
*
* SPDX-License-Identifier: BSD-3-Clause
*******************************************************************************/
#ifndef AML_ERROR_H
#define AML_ERROR_H
......
/*******************************************************************************
* Copyright 2019 UChicago Argonne, LLC.
* (c.f. AUTHORS, LICENSE)
*
* This file is part of the AML project.
* For more info, see https://xgitlab.cels.anl.gov/argo/aml
*
* SPDX-License-Identifier: BSD-3-Clause
*******************************************************************************/
#ifndef AML_VECTOR_H
#define AML_VECTOR_H
......
......@@ -15,7 +15,7 @@
const int aml_version_major = AML_VERSION_MAJOR;
const int aml_version_minor = AML_VERSION_MINOR;
const int aml_version_patch = AML_VERSION_PATCH;
const char* aml_version_string = AML_VERSION_STRING;
const char *aml_version_string = AML_VERSION_STRING;
int aml_errno;
......
/*******************************************************************************
* Copyright 2019 UChicago Argonne, LLC.
* (c.f. AUTHORS, LICENSE)
*
* This file is part of the AML project.
* For more info, see https://xgitlab.cels.anl.gov/argo/aml
*
* SPDX-License-Identifier: BSD-3-Clause
*******************************************************************************/
#include "aml.h"
#include <string.h>
......
/*******************************************************************************
* Copyright 2019 UChicago Argonne, LLC.
* (c.f. AUTHORS, LICENSE)
*
* This file is part of the AML project.
* For more info, see https://xgitlab.cels.anl.gov/argo/aml
*
* SPDX-License-Identifier: BSD-3-Clause
*******************************************************************************/
#include "aml.h"
#include <stdio.h>
#include "aml/utils/error.h"
static const char* aml_error_strings[-AML_ERROR_MAX] = {
[AML_SUCCESS] =
......
/*******************************************************************************
* Copyright 2019 UChicago Argonne, LLC.
* (c.f. AUTHORS, LICENSE)
*
* This file is part of the AML project.
* For more info, see https://xgitlab.cels.anl.gov/argo/aml
*
* SPDX-License-Identifier: BSD-3-Clause
*******************************************************************************/
#include "aml.h"
#include <assert.h>
......
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