[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [calligra] krita/image: no need to malloc here we can use the constant provided by Vc
From: Matthias Kretz <kretz () kde ! org>
Date: 2013-02-11 9:04:57
Message-ID: 20130211090457.0769EA6091 () git ! kde ! org
[Download RAW message or body]
Git commit 78a2e2dea8b205e78bacda97b705332a03c9f634 by Matthias Kretz.
Committed on 11/02/2013 at 10:03.
Pushed by mkretz into branch 'master'.
no need to malloc here we can use the constant provided by Vc
this time without a vexing parse
M +1 -8 krita/image/kis_brush_mask_applicator_factories.cpp
http://commits.kde.org/calligra/78a2e2dea8b205e78bacda97b705332a03c9f634
diff --git a/krita/image/kis_brush_mask_applicator_factories.cpp \
b/krita/image/kis_brush_mask_applicator_factories.cpp index 249345d..64726f8 100644
--- a/krita/image/kis_brush_mask_applicator_factories.cpp
+++ b/krita/image/kis_brush_mask_applicator_factories.cpp
@@ -66,14 +66,9 @@ FastRowProcessor::process<VC_IMPL>(float* buffer, int width, float \
y, float cosa float sinay_ = sina * y_;
float cosay_ = cosa * y_;
- float *initValues = Vc::malloc<float, Vc::AlignOnVector>(Vc::float_v::Size);
- for(int i = 0; i < Vc::float_v::Size; i++) {
- initValues[i] = (float)i;
- }
-
float* bufferPointer = buffer;
- Vc::float_v currentIndices(initValues);
+ Vc::float_v currentIndices(Vc::int_v::IndexesFromZero());
Vc::float_v increment((float)Vc::float_v::Size);
Vc::float_v vCenterX(centerX);
@@ -115,8 +110,6 @@ FastRowProcessor::process<VC_IMPL>(float* buffer, int width, \
float y, float cosa
bufferPointer += Vc::float_v::Size;
}
-
- Vc::free<float>(initValues);
}
#endif /* defined HAVE_VC */
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic