kwave  18.07.70
cpu_accel.cpp File Reference
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include "cputest.h"
Include dependency graph for cpu_accel.cpp:

Go to the source code of this file.

Macros

#define lprintf   printf
 

Functions

uint32_t xine_mm_accel (void)
 

Macro Definition Documentation

◆ lprintf

#define lprintf   printf

Definition at line 58 of file cpu_accel.cpp.

Referenced by probe_fast_memcpy(), and rdtsc().

Function Documentation

◆ xine_mm_accel()

uint32_t xine_mm_accel ( void  )

Definition at line 398 of file cpu_accel.cpp.

Referenced by probe_fast_memcpy(), and rdtsc().

399 {
400  static int initialized = 0;
401  static uint32_t accel = 0;
402 
403  if (!initialized) {
404 #ifdef HAVE_MLIB
405 #ifdef MLIB_LAZYLOAD
406  void *hndl;
407 
408  if ((hndl = dlopen("libmlib.so.2", RTLD_LAZY | RTLD_GLOBAL | RTLD_NODELETE)) != NULL) {
409  dlclose(hndl);
410  accel |= MM_ACCEL_MLIB;
411  }
412 #else
413  accel |= MM_ACCEL_MLIB;
414 #endif
415 #endif
416 
417 #if defined(__i386__) || defined(__x86_64__) || (defined(ARCH_PPC) && defined(ENABLE_ALTIVEC)) || (defined(ARCH_SPARC) && defined(ENABLE_VIS))
418  accel |= arch_accel();
419 #endif
420 
421  initialized = 1;
422  }
423 
424  return accel;
425 }
Here is the caller graph for this function: