From patchwork Mon Oct 21 10:55:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sanjay Singh Rawat X-Patchwork-Id: 21198 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f72.google.com (mail-oa0-f72.google.com [209.85.219.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EEA3C20356 for ; Mon, 21 Oct 2013 10:55:06 +0000 (UTC) Received: by mail-oa0-f72.google.com with SMTP id m17sf15608546oag.11 for ; Mon, 21 Oct 2013 03:55:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=G96712kdKK3oLamvHsYbWJsGL+Q7ZavANpR9AqQS95Y=; b=QaTfS9J0B+IsFgFkuppkY8vi2+18Z7b1eGRR7W1vGnZMqwF5h+a9C96JuNIY6qh3Sl QrL8BfkBg9EyaGEbIhRM/tdt6lGUqxgrSij9In5udU5zV8w7x+aPzVBa1CP8NDPZpHaX qml9ngDZ3QSYPNYz3Zzac5cLaZSstyfPH7kq+wWHc3Uxv/VbreynWYXvfT8jFE44UnqP BdPYLhaJXAhO9FUMUJl8lLwdn6hBKwy4aKMMYx17LIPXgRcjSzv2o26SKDTtWznuXBV2 bnGLkUPOoI71VSsiQTAfxRAhCWxK6D0h9XAXcOk7DJIjTsTnqoXFi/+34HyK6kNs4YUm D1lQ== X-Received: by 10.182.204.33 with SMTP id kv1mr6105180obc.26.1382352906078; Mon, 21 Oct 2013 03:55:06 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.99.67 with SMTP id eo3ls2002343qeb.41.gmail; Mon, 21 Oct 2013 03:55:06 -0700 (PDT) X-Received: by 10.52.74.100 with SMTP id s4mr478976vdv.35.1382352905907; Mon, 21 Oct 2013 03:55:05 -0700 (PDT) Received: from mail-vb0-f41.google.com (mail-vb0-f41.google.com [209.85.212.41]) by mx.google.com with ESMTPS id ed9si4395200vcb.81.2013.10.21.03.55.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 21 Oct 2013 03:55:05 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.41 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.41; Received: by mail-vb0-f41.google.com with SMTP id w8so2920222vbj.0 for ; Mon, 21 Oct 2013 03:55:05 -0700 (PDT) X-Gm-Message-State: ALoCoQkShhyjPtytyba7Ktes1CSAFULQjHy1NyJZEVCT2bV1hsmznx5PLwLIXDfMM2zfDLDSWXyr X-Received: by 10.58.136.231 with SMTP id qd7mr10070232veb.1.1382352905760; Mon, 21 Oct 2013 03:55:05 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp142784vcz; Mon, 21 Oct 2013 03:55:05 -0700 (PDT) X-Received: by 10.67.30.70 with SMTP id kc6mr17353429pad.32.1382352902013; Mon, 21 Oct 2013 03:55:02 -0700 (PDT) Received: from mail-pd0-f172.google.com (mail-pd0-f172.google.com [209.85.192.172]) by mx.google.com with ESMTPS id ei3si8330877pbc.50.2013.10.21.03.55.01 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 21 Oct 2013 03:55:02 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.172 is neither permitted nor denied by best guess record for domain of sanjay.rawat@linaro.org) client-ip=209.85.192.172; Received: by mail-pd0-f172.google.com with SMTP id z10so8268668pdj.17 for ; Mon, 21 Oct 2013 03:55:01 -0700 (PDT) X-Received: by 10.66.234.193 with SMTP id ug1mr246181pac.92.1382352901521; Mon, 21 Oct 2013 03:55:01 -0700 (PDT) Received: from srawat-Latitude-E6420.LGE.NET ([203.247.149.152]) by mx.google.com with ESMTPSA id nj9sm20136410pbc.13.2013.10.21.03.54.58 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 21 Oct 2013 03:55:01 -0700 (PDT) From: Sanjay Singh Rawat To: powertop@lists.01.org Cc: Sanjay Singh Rawat Subject: [PATCH] resolve error for overloaded function call Date: Mon, 21 Oct 2013 16:25:25 +0530 Message-Id: <1382352925-19974-1-git-send-email-sanjay.rawat@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: sanjay.rawat@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.41 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , - for android receiving compilation error rapl_interface.cpp:195:40: error: call of overloaded 'pow(int, uint64_t)' is ambiguous include/math.h:222:8: note: double pow(double, double). stlport/stlport/stl/_cmath.h:453:24: note: float pow(float, float) Signed-off-by: Sanjay Singh Rawat --- src/cpu/rapl/rapl_interface.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cpu/rapl/rapl_interface.cpp b/src/cpu/rapl/rapl_interface.cpp index 8f236eb..6dd7b26 100644 --- a/src/cpu/rapl/rapl_interface.cpp +++ b/src/cpu/rapl/rapl_interface.cpp @@ -192,7 +192,7 @@ double c_rapl_interface::get_power_unit() return ret; } - return (double) 1/pow(2, value & 0xf); + return (double) 1/pow((double)2, (double)(value & 0xf)); } double c_rapl_interface::get_energy_status_unit() @@ -206,7 +206,7 @@ double c_rapl_interface::get_energy_status_unit() return ret; } - return (double)1/ pow(2, (value & 0x1f00) >> 8); + return (double)1/ pow((double)2, (double)((value & 0x1f00) >> 8)); } double c_rapl_interface::get_time_unit() @@ -220,7 +220,7 @@ double c_rapl_interface::get_time_unit() return ret; } - return (double)1 / pow(2, (value & 0xf0000) >> 16); + return (double)1 / pow((double)2, (double)((value & 0xf0000) >> 16)); } int c_rapl_interface::get_pkg_energy_status(double *status)