Sha256: c4a7ced7131eae6cf725933e666751f1a0cd279ce193e558cdce2af63412b443

Contents?: true

Size: 1.25 KB

Versions: 1

Compression:

Stored size: 1.25 KB

Contents

#ifndef CUMO_H
#define CUMO_H

#include "cumo/narray.h"

#if defined(__cplusplus)
extern "C" {
#if 0
} /* satisfy cc-mode */
#endif
#endif

#define CUMO_VERSION "0.4.1"
#define CUMO_VERSION_CODE 41

bool cumo_compatible_mode_enabled_p();
bool cumo_show_warning_enabled_p();
bool cumo_show_warning_once_enabled_p();

#define CUMO_SHOW_WARNING_ONCE( c_str ) \
    { \
        if (cumo_show_warning_enabled_p()) { \
            if (cumo_show_warning_once_enabled_p()) { \
                static bool show_warning = true; \
                if (show_warning) { \
                    fprintf(stderr, (c_str)); \
                    show_warning = false; \
                } \
            } else { \
                fprintf(stderr, (c_str)); \
            } \
        } \
    }

#define CUMO_SHOW_SYNCHRONIZE_FIXME_WARNING_ONCE( func_name, type_name ) \
    CUMO_SHOW_WARNING_ONCE("Warning: FIXME: Method \"" func_name "\" for dtype \"" type_name "\" synchronizes with CPU.\n")

#define CUMO_SHOW_SYNCHRONIZE_WARNING_ONCE( func_name, type_name ) \
    CUMO_SHOW_WARNING_ONCE("Warning: Method \"" func_name "\" for dtype \"" type_name "\" synchronizes with CPU.\n")

#if defined(__cplusplus)
#if 0
{ /* satisfy cc-mode */
#endif
}  /* extern "C" { */
#endif

#endif /* ifndef CUMO_H */

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cumo-0.4.1 ext/cumo/include/cumo.h