gimpcpuaccel.h 2.26 KB
Newer Older
1 2
/* LIBGIMP - The GIMP Library
 * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
3
 *
4
 * This library is free software: you can redistribute it and/or
5 6
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
7
 * version 3 of the License, or (at your option) any later version.
8
 *
9
 * This library is distributed in the hope that it will be useful,
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
13
 *
14
 * You should have received a copy of the GNU Lesser General Public
15
 * License along with this library.  If not, see
16
 * <https://www.gnu.org/licenses/>.
17 18
 */

19 20 21 22
#if !defined (__GIMP_BASE_H_INSIDE__) && !defined (GIMP_BASE_COMPILATION)
#error "Only <libgimpbase/gimpbase.h> can be included directly."
#endif

23 24 25 26 27
#ifndef __GIMP_CPU_ACCEL_H__
#define __GIMP_CPU_ACCEL_H__

G_BEGIN_DECLS

28

29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
/**
 * GimpCpuAccelFlags:
 * @GIMP_CPU_ACCEL_NONE:        None
 * @GIMP_CPU_ACCEL_X86_MMX:     MMX
 * @GIMP_CPU_ACCEL_X86_3DNOW:   3dNow
 * @GIMP_CPU_ACCEL_X86_MMXEXT:  MMXEXT
 * @GIMP_CPU_ACCEL_X86_SSE:     SSE
 * @GIMP_CPU_ACCEL_X86_SSE2:    SSE2
 * @GIMP_CPU_ACCEL_X86_SSE3:    SSE3
 * @GIMP_CPU_ACCEL_X86_SSSE3:   SSSE3
 * @GIMP_CPU_ACCEL_X86_SSE4_1:  SSE4_1
 * @GIMP_CPU_ACCEL_X86_SSE4_2:  SSE4_2
 * @GIMP_CPU_ACCEL_X86_AVX:     AVX
 * @GIMP_CPU_ACCEL_PPC_ALTIVEC: Altivec
 *
 * Types of detectable CPU accelerations
 **/
46 47 48
typedef enum
{
  GIMP_CPU_ACCEL_NONE        = 0x0,
49

50 51 52 53 54 55 56
  /* x86 accelerations */
  GIMP_CPU_ACCEL_X86_MMX     = 0x80000000,
  GIMP_CPU_ACCEL_X86_3DNOW   = 0x40000000,
  GIMP_CPU_ACCEL_X86_MMXEXT  = 0x20000000,
  GIMP_CPU_ACCEL_X86_SSE     = 0x10000000,
  GIMP_CPU_ACCEL_X86_SSE2    = 0x08000000,
  GIMP_CPU_ACCEL_X86_SSE3    = 0x02000000,
57 58 59 60
  GIMP_CPU_ACCEL_X86_SSSE3   = 0x01000000,
  GIMP_CPU_ACCEL_X86_SSE4_1  = 0x00800000,
  GIMP_CPU_ACCEL_X86_SSE4_2  = 0x00400000,
  GIMP_CPU_ACCEL_X86_AVX     = 0x00200000,
61

62 63 64
  /* powerpc accelerations */
  GIMP_CPU_ACCEL_PPC_ALTIVEC = 0x04000000
} GimpCpuAccelFlags;
65 66


67
GimpCpuAccelFlags  gimp_cpu_accel_get_support (void);
68

69

70 71
/* for internal use only */
void               gimp_cpu_accel_set_use     (gboolean use);
72 73


74
G_END_DECLS
75

76
#endif  /* __GIMP_CPU_ACCEL_H__ */