grx-tensor 0.1.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/ext/grx/extconf.rb CHANGED
@@ -1,12 +1,7 @@
1
- # extconf.rb
1
+ # frozen_string_literal: true
2
+
2
3
  # =====================================================================
3
- # Script de configuración de la extensión nativa.
4
- # rake-compiler lo ejecuta para generar el Makefile correcto
5
- # según la plataforma del usuario.
6
- #
7
- # Uso:
8
- # bundle exec rake compile → compila para la plataforma actual
9
- # bundle exec rake native gem → empaqueta binarios pre-compilados
4
+ # extconf.rb Configuracion de compilacion estandar de RubyGems
10
5
  # =====================================================================
11
6
 
12
7
  require "mkmf"
@@ -14,18 +9,9 @@ require "mkmf"
14
9
  extension_name = "grx_core"
15
10
 
16
11
  $CFLAGS << " -O3 -ffast-math"
12
+ $CFLAGS << " -fPIC" unless RUBY_PLATFORM =~ /mingw|mswin/
17
13
  $CFLAGS << " -fvisibility=hidden" unless RUBY_PLATFORM =~ /mingw|mswin/
18
14
 
19
- if try_compile("int main(){return 0;}", "-mavx2 -mfma")
20
- $CFLAGS << " -mavx2 -mfma"
21
- puts "GRX: AVX2 + FMA habilitados"
22
- elsif try_compile("int main(){return 0;}", "-msse4.2")
23
- $CFLAGS << " -msse4.2"
24
- puts "GRX: SSE4.2 habilitado"
25
- else
26
- puts "GRX: Sin SIMD — usando implementación escalar"
27
- end
28
-
29
15
  have_library("m") unless RUBY_PLATFORM =~ /mingw|mswin/
30
16
 
31
17
  create_makefile(extension_name)