File: essl_version.cc

package info (click to toggle)
blaspp 2024.10.26-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,636 kB
  • sloc: cpp: 29,332; ansic: 8,448; python: 2,192; xml: 182; perl: 101; makefile: 53; sh: 7
file content (20 lines) | stat: -rw-r--r-- 633 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright (c) 2017-2023, University of Tennessee. All rights reserved.
// SPDX-License-Identifier: BSD-3-Clause
// This program is free software: you can redistribute it and/or modify it under
// the terms of the BSD 3-Clause license. See the accompanying LICENSE file.

#include <stdio.h>
#include <essl.h>

int main()
{
    int v = iessl();
    int version      = int( v / 1000000 );
    int release      = int( (v % 1000000) / 10000 );
    int modification = int( (v % 10000) / 100 );
    int ptf          = v % 100;

    printf( "ESSL_VERSION=%d.%d.%d.%d\n",
            version, release, modification, ptf );
    return 0;
}