Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Revert "Merge branch 'gh925_ffa_sort'"

This reverts commit 99676a6, reversing
changes made to 285bd0a.

Conflicts:
	examples/benchmarks/sort_ffa.pir
	src/pmc/fixedfloatarray.pmc
  • Loading branch information...
commit 61faaceac0cbaa3a1b8c6153d3392cb6c317283a 1 parent a8b1820
@leto leto authored
View
9 ChangeLog
@@ -1,12 +1,11 @@
2013-01-17 release 5.0.0
- Core
+ Remove duplicate library search path entries, move "." from the beginning to
- the end. This is a non-backward compatible change, but emulating the old
- behavior is possible. [GH #368]
+ the end. [GH #368]
+ Install forgotten runtime include files:
- cloneflags.pasm
- packfile_annotation_keytype.pasm
- packfile_segments.pasm
+ cloneflags.pasm
+ packfile_annotation_keytype.pasm
+ packfile_segments.pasm
+ Install include/parrot/pbcversion.h with the main package, not devel.
+ Install headers for dynpmc files.
+ Install libraries tgc.pbc, NCI/Utils.pbc, OpenGL/Math.pbc, PCT/Dumper.pbc,
View
1  MANIFEST
@@ -507,7 +507,6 @@ examples/benchmarks/primes2_i.pir [examples]
examples/benchmarks/primes_i.pasm [examples]
examples/benchmarks/rand.pir [examples]
examples/benchmarks/sort.pir [examples]
-examples/benchmarks/sort_ffa.pir [examples]
examples/benchmarks/stress.pasm [examples]
examples/benchmarks/stress.pl [examples]
examples/benchmarks/stress.rb [examples]
View
57 examples/benchmarks/sort_ffa.pir
@@ -1,57 +0,0 @@
-# Copyright (C) 2013, Parrot Foundation.
-
-=head1 NAME
-
-examples/benchmarks/sort_ffa.pir - Sort an FixedFloatArray of N floats
-
-=head1 SYNOPSIS
-
- % time ./parrot examples/benchmarks/sort_ffa.pir 100000
-
-Or use the default number of iterations:
-
- % time ./parrot examples/benchmarks/sort.pir
-
-=head1 DESCRIPTION
-
-Sorts an FixedFloatArray of N random integers using builtin sort
-function for FixedFloatArray. The argument N is specified from the
-command line.
-
-=cut
-
-.loadlib 'math_ops'
-
-.sub main :main
- .param pmc argv
- .local int N, i, j
-
- N = argv[1]
- if N < 1 goto USE_DEFAULT_SIZE
- goto USE_DEFINED_SIZE
-
-USE_DEFAULT_SIZE:
- N = 1000000
-
-USE_DEFINED_SIZE:
- $P0 = new ['FixedFloatArray'], N
- i = 0
- j = 0
-
-LOOP:
- j = rand 0, N
- $P0[i] = j
- inc i
- if i < N goto LOOP
-
- $P0.'sort'()
-
-.end
-
-
-# Local Variables:
-# mode: pir
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4 ft=pir:
-
View
66 src/pmc/fixedfloatarray.pmc
@@ -18,17 +18,6 @@ stored FLOATVALs. It uses Float PMCs to do all necessary conversions.
/* HEADERIZER HFILE: none */
/* HEADERIZER BEGIN: static */
-/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-
-PARROT_PURE_FUNCTION
-static int auxcmpfunc(ARGIN(const FLOATVAL *i), ARGIN(const FLOATVAL *j))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-#define ASSERT_ARGS_auxcmpfunc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(i) \
- , PARROT_ASSERT_ARG(j))
-/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: static */
pmclass FixedFloatArray auto_attrs provides array {
@@ -41,35 +30,6 @@ pmclass FixedFloatArray auto_attrs provides array {
=over 4
-=item C<PMC *sort()>
-
-Sort the array and return self.
-
-=cut
-
-*/
-
- METHOD sort(PMC *cmp_func :optional) {
- UINTVAL n;
- INTVAL size;
-
- GET_ATTR_size(INTERP, SELF, size);
- n = (UINTVAL)size;
-
- if (n > 1) {
- FLOATVAL *float_array;
- GET_ATTR_float_array(INTERP, SELF, float_array);
- if (PMC_IS_NULL(cmp_func))
- qsort(float_array, n, sizeof (INTVAL),
- (int (*)(const void *, const void*))auxcmpfunc);
- else
- Parrot_util_quicksort(INTERP, (void**)float_array, n, cmp_func, "NN->N");
- }
- RETURN(PMC *SELF);
- }
-
-/*
-
=item C<void destroy()>
Destroys the array.
@@ -571,32 +531,6 @@ Reverse the contents of the array.
=back
-=head2 Auxiliary functions
-
-=over 4
-
-=item C<static int auxcmpfunc(const FLOATVAL *i, const FLOATVAL *j)>
-
-FLOATVAL compare function for qsort usage.
-
-=back
-
-=cut
-
-*/
-
-PARROT_PURE_FUNCTION
-static int
-auxcmpfunc(ARGIN(const FLOATVAL *i), ARGIN(const FLOATVAL *j))
-{
- ASSERT_ARGS(auxcmpfunc)
- if (*i == *j) return 0;
- if (*i < *j) return -1;
- else return 1;
-}
-
-/*
-
=head1 SEE ALSO
F<docs/pdds/pdd17_basic_types.pod>.
View
20 t/pmc/fixedfloatarray.t
@@ -19,7 +19,7 @@ out-of-bounds test. Checks INT and PMC keys.
.sub main :main
.include 'fp_equality.pasm'
.include 'test_more.pir'
- plan(36)
+ plan(32)
array_size_tests()
element_set_tests()
@@ -32,24 +32,6 @@ out-of-bounds test. Checks INT and PMC keys.
test_new_style_init()
test_invalid_init_tt1509()
test_get_string()
- test_sort()
-.end
-
-.sub test_sort
- $P0 = new ['FixedFloatArray'], 4
- set $P0[0],10.0
- set $P0[1],5.0
- set $P0[2],3.0
- set $P0[3],1.0
- $P0.'sort'()
- $I0 = $P0[0]
- is($I0,1,'sort works')
- $I1 = $P0[1]
- is($I1,3,'sort works')
- $I2 = $P0[2]
- is($I2,5,'sort works')
- $I3 = $P0[3]
- is($I3,10,'sort works')
.end
.sub array_size_tests
Please sign in to comment.
Something went wrong with that request. Please try again.